??? 01/10/07 00:13 Read: times |
#130546 - My error Responding to: ???'s previous message |
Russell Bull said:
Ralph, firstly, I didn't score your question. So please refrain from rambling on - it makes you appear like a person possesed. As for research - there is so much written about interfacing to the LCDs on the internet. Have you read the datasheet on one of these devices? Have you looked at the code from the project you're describing vs the code in the tutorial? Can you see anything common? Put simply, the write to the lcd if it is bus interfaced is something like: mov dptr,#LCD_COMMAND ;address of the LCD on the bus -usually 8000h or suchlike mov a,#COMMAND movx @dptr,a whereas being bit bashed it is something like: clr LCD_WR ;port pin for lcd R/W clr LCD_RS ;port pin for lcd RS mov a,#COMMAND mov P2,a ;assuming the lcd data pins are connected to P2 setb LCD_EN ;port pin for E nop clr LCD_EN As I said, there is a plethora of information and sample code out there, you just have to look for it. I'm surprised you got the LCD to work using switches - the switch bounce usually messes everything up. Also, if you got the LCD to work via switches, you should be well aware of the sequence of signals to operate it - thus writing some code is dead easy. Hi Russell: The only reason I thought you gave me -1 was Your Post started off with words No Research. I thought that's how I received -1 in thread. As far as the 40x2 LCD working with switches their is no problem because I took care of contact bounce on switch for the E strobe pulse using a CD4011 nand gate. I always get one character of the time because this is controlling the D0-D7 data bus. But of course I am not using a microcontroller to control the LCD. I found a lot of examples using C code but none using assembly language on the 89c2051 or 89c4051 part except for c code. I can't even find assembly language examples for similar microcontrollers! Russell I have bet for you give one example off the net using 89c2051 or 89c4051 connected to LCD with example being assembly language. You will find many with c code none with assembly. Or bet for any other member on this site. If any member finds one please post it. Best regards, Ralph Sac |