Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/05/03 11:21
Read: times


 
#56120 - RE: What's wrong with this LCD program?
Responding to: ???'s previous message
Oh! Why do we persist?

Has Ofir checked the timing on his lcd interface code or the hardware????

We re-iterate: check the timing on the lcd code - the hitachi lcd controller (and it's derivatives) are hopelessly slow - read the spex. If you have the lcd mapped as a memory device on an 8051 much over 6mhz, it probably won't work. You have to bit bash the control to the display and add NOP's in critical places - setup and hold times are not to be ignored.

try this:
mov a,#'t'
acall WRITE_TEXT
mov a,#'e'
acall WRITE_TEXT
mov a,#'s'
acall WRITE_TEXT
mov a,#'t'
acall WRITE_TEXT

if this doesn't work neither will the looped code.

for the looped code I normally use null terminated strings like 'C'

like this....

mov dptr,#hello_str
lcall pstring

hello_str
db "hello there",0 ;note null terminator

pstring:

clr a
movc a,@a+dptr
jz ps_exit
lcall wr_lcd_data ;my name to write to lcd data reg
inc dptr
sjmp pstring
ps_exit:
ret

How much more hand holding do you need? Do you want
the code I use to bit bash an lcd in 4 bit mode?

I'd hate to think of the cost of the collective brain power wasted trying to help someone who really doesn't seem to want to help themselves. If I had to wait for an internet response to these little problems that crop up in my day to day work I wouldn't get much done. There's loads of example code littered thoughout the web - look at the microchip site for example code -you have to convert to 8051 from PIC but that's not too hard. I've used many times a binary to bcd conversion routine that was gleaned from a PIC app note.

Do I sound preachy????

Shaggy says 'It wasn't me'
Ofir says 'It doesn't work'





List of 28 messages in thread
TopicAuthorDate
What's wrong with this LCD program?            01/01/70 00:00      
   RE: What's wrong with this LCD program?            01/01/70 00:00      
      RE: What\\\\\\\\\\\\\\\'s wrong with this LCD prog            01/01/70 00:00      
         RE: What\\\\\\\\\\\\\\\'s wrong with this LCD prog            01/01/70 00:00      
         RE: What\\\\\\\\\\\\\\\'s wrong with this LCD prog            01/01/70 00:00      
            RE: What\\\\\\\\\\\\\\\'s wrong with this LCD prog            01/01/70 00:00      
               RE: What\\\\\\\\\\\\\\\'s wrong with this LCD prog            01/01/70 00:00      
                  RE: What\\\\\\\\\\\\\\\'s wrong with this LCD prog            01/01/70 00:00      
      RE: What's wrong with this LCD program?            01/01/70 00:00      
         RE: What's wrong with this LCD program?            01/01/70 00:00      
            RE: What's wrong with this LCD program?            01/01/70 00:00      
               RE: What's wrong with this LCD program?            01/01/70 00:00      
                  RE: What's wrong with this LCD program?            01/01/70 00:00      
                     RE: What's wrong with this LCD program?            01/01/70 00:00      
                        RE: What's wrong with this LCD program?            01/01/70 00:00      
                           RE: What's wrong with this LCD program?            01/01/70 00:00      
                              RE: What's wrong with this LCD program?            01/01/70 00:00      
                                 RE: What's wrong with this LCD program?            01/01/70 00:00      
                                    RE: What's wrong with this LCD program?            01/01/70 00:00      
   RE: What\\\\\\\'s wrong with this LCD program?            01/01/70 00:00      
      RE: What\\\\\\\'s wrong with this LCD pr            01/01/70 00:00      
         RE: What\\\\\\\'s wrong with this LCD pr            01/01/70 00:00      
         RE: What\\\\\\\'s wrong with this LCD pr            01/01/70 00:00      
   RE: What's wrong with this LCD program?            01/01/70 00:00      
      RE: 15What's wrong with this LCD program            01/01/70 00:00      
      RE: What's wrong with this LCD program?            01/01/70 00:00      
         RE: What\'s wrong with this LCD program?            01/01/70 00:00      
      RE: What's wrong with this LCD program?            01/01/70 00:00      

Back to Subject List