microcontroller - Edsim51 Always Invalid Label Error -
i'm using edsim51 on macos. i'm getting invalid label - **** keyword errors. read documentation (user's guide , examples pages) still no idea i'm making mistake. i've downloaded example codes edsim's website, it's giving same error official examples.
for example, lcd example taken website:
; put data in ram mov 30h, #'a' mov 31h, #'b' mov 32h, #'c' mov 33h, #0 ; end of data marker ; initialise display ; see instruction set details clr p1.3 ; clear rs - indicates instructions being sent module ; function set clr p1.7 ; | clr p1.6 ; | setb p1.5 ; | clr p1.4 ; | high nibble set setb p1.2 ; | clr p1.2 ; | negative edge on e call delay ; wait bf clear ; function set sent first time - tells module go 4-bit mode ; why function set high nibble sent twice? see 4-bit operation on pages 39 , 42 of hd44780.pdf. setb p1.2 ; | clr p1.2 ; | negative edge on e ; same function set high nibble sent second time setb p1.7 ; low nibble set (only p1.7 needed changed) setb p1.2 ; | clr p1.2 ; | negative edge on e ; function set low nibble sent call delay ; wait bf clear ; entry mode set ; set increment no shift clr p1.7 ; | clr p1.6 ; | clr p1.5 ; | clr p1.4 ; | high nibble set setb p1.2 ; | clr p1.2 ; | negative edge on e setb p1.6 ; | setb p1.5 ; |low nibble set setb p1.2 ; | clr p1.2 ; | negative edge on e call delay ; wait bf clear ; display on/off control ; display turned on, cursor turned on , blinking turned on clr p1.7 ; | clr p1.6 ; | clr p1.5 ; | clr p1.4 ; | high nibble set setb p1.2 ; | clr p1.2 ; | negative edge on e setb p1.7 ; | setb p1.6 ; | setb p1.5 ; | setb p1.4 ; | low nibble set setb p1.2 ; | clr p1.2 ; | negative edge on e call delay ; wait bf clear ; send data setb p1.3 ; clear rs - indicates data being sent module mov r1, #30h ; data sent lcd stored in 8051 ram, starting @ location 30h loop: mov a, @r1 ; move data pointed r1 jz finish ; if 0, end of data has been reached - jump out of loop call sendcharacter ; send data in lcd module inc r1 ; point next piece of data jmp loop ; repeat finish: jmp $ sendcharacter: mov c, acc.7 ; | mov p1.7, c ; | mov c, acc.6 ; | mov p1.6, c ; | mov c, acc.5 ; | mov p1.5, c ; | mov c, acc.4 ; | mov p1.4, c ; | high nibble set setb p1.2 ; | clr p1.2 ; | negative edge on e mov c, acc.3 ; | mov p1.7, c ; | mov c, acc.2 ; | mov p1.6, c ; | mov c, acc.1 ; | mov p1.5, c ; | mov c, acc.0 ; | mov p1.4, c ; | low nibble set setb p1.2 ; | clr p1.2 ; | negative edge on e call delay ; wait bf clear delay: mov r0, #50 djnz r0, $ ret
**and error : ** invalid label - fİnİsh keyword
can please tell me i'm missing?
Comments
Post a Comment