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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/08/09 16:39
Read: times


 
#168802 - It could simply be open ...
Responding to: ???'s previous message
If you've got no pullups on P0, then whatever was on P0 during the previous cycle will have as much effect on the result as what you're presently sending. If it was a zero, it will tend to remain a zero. This is probably CMOS hardware, and, not knowing which MCU you're using, I'd guess that if your MCU is CMOS, and your LCD is CMOS, which it probably is, then pullups are absolutely necessary for you to track down this bugaboo. CMOS will sit at whatever level it had initially, often zero, until stray charge changes it to a one, after which it will become zero if it's written to a zero, until it accumulates enough charge to become a one again. That might never happen if you're using P0.

To increase your confidence, you might write a string of different values all of which have a one in the P0.0 position. The port will drive the P0.0 line high, and that will persist for a considerable time, until the charge leaks off or until it's driven to a zero. Then, likewise, write a string of characters, all having a zero in the P0.0 position. If those with all zeroes are all correct, and only the ones with one in the lsb, you have a valuable clue, perhaps more useful than simply finding that P0.0 is not shorted to GND. If, then, you write a string to the LCD that has precisely alternating ones and zeroes in the lsb, and only the ones are missing, well, you have your answer, don't you?

Take a look at your MCU's P0 behavior in the datasheet. I think you'll find that it drives the port high with a strong pullup during the write cycle when ones are written to the port. but once that cycle is over, it no longer does that. Check to see what it does. Normally there's a weak pullup on the other ports, but P0 goes open-drain at the end of the write cycle. The charge may be leaking off quickly enough that, by the time you get around to writing the 'E' clock, the lsb is back to zero.

RE









List of 12 messages in thread
TopicAuthorDate
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      

Back to Subject List