??? 09/08/09 06:05 Modified: 09/08/09 06:46 Read: times |
#168792 - How fast is your 8051? Responding to: ???'s previous message |
Your code looks pretty straightforward for driving the LCD in 8 bit mode with a fixed delay for each character written.
A regular 12 clocker 8051 running at 12MHz will have a 2000ns EN pulse. You only need a 500ns pulse. However a 6 clocker at 24 MHz is 500ns. Anything faster starts to violate the data sheet timing. So calculate your particular timing and add NOPs if required. There is nothing wrong with fixed delays per character, but you only need 37us for any regular data or control. And 1400us for a CLR or RTN control. So to be on the safe side, allow 2000us for CLR/RET and 50us otherwise. It is very unlikely that you have a duff character generator. David. |
Topic | Author | Date |
hd44780 16x2 lcd some letters display as other letters | 01/01/70 00:00 | |
How fast is your 8051? | 01/01/70 00:00 | |
speed | 01/01/70 00:00 | |
incomplete init, or some hardware issue | 01/01/70 00:00 | |
Looks like short between D0 and GND | 01/01/70 00:00 | |
Pullup on D0 P0 | 01/01/70 00:00 | |
Debug Tip: Always look for patterns! | 01/01/70 00:00 | |
Oscilloscope | 01/01/70 00:00 | |
will check D0 | 01/01/70 00:00 | |
It could simply be open ... | 01/01/70 00:00 | |
the analysis is fine... | 01/01/70 00:00 | |
It's easier if he has one ...![]() | 01/01/70 00:00 |