| ??? 03/19/03 14:35 Read: times |
#41854 - RE: 16 x 2 LCD display Responding to: ???'s previous message |
dpl and dph are the low and high bytes of DPTR.
The call'Your routine' means the code for sending a byte to lcd in your case: WRITE_TEXT: SETB EN SETB RS MOV dataport,A CLR EN LCALL WAIT_LCD RET If works well. You can use this routine for the serial port or other device simply changing this lcall for other. For example for serial ... lcall serial ... serial: jnb ti,! mov sbuf,aƧ ret (Or something similar) When you use a lcall instruction the 8052 put the value of the PC in the stack, then if you get this value (the pops) you can know where is stored the string (the db). After reading the string you store again the new value of PC (the pushes) and do a ret for jumping to this adress (ret pops the PC from the stack and jump to this location) I hope this helps |



