When I asked on the forum, about the controller on the LCD module, Rick Seiden also provided a link to Matt Hawkin's blog entry "16x2 LCD Module Control Using Python". Matt provided a set of wiring connections between the display and the Pi to go along with his Python code. I have used the same connections, but with a couple of exceptions. I mention this because the connections to the Pi are part of the python code. Mickey Skyler's Adafruit tutorial "Drive a 16x2 LCD with the Raspberry Pi" uses a different pin combination. So if you download Mickey's Adafrut_CharLCD python module, use his pin-outs.
The only differences I have with Rick's connection are:
1. Since my reflective display does not have a backlight, I have no connections to LCD pins 15 and 16.
2. I have a 10K potentiometer connected so that I can adjust the contrast. The potentiometer has three pins in a row. One outer pin connects to 5v, and the other outer pin connects to GND. The middle pin connects to pin 3 of the LCD Display.
When I talk to my Raspberry Pi, I am sitting at my desktop and the Pi is not in view. Therefore, I have installed a momentary switch on the breadboard (has a "4" printed on it). This allows me to pause a running python program to allow me to walk over to the Pi and resume the program. One of the two contacts of the switch connects to GND. The other connects to two places: to one end of a 10K resistor, and the other to GPIO 10 (Pin pin 19). The other end of the resistor connects to 3.3v.
I just glanced up at the photograph above and realized that I was wrong. That 10K resistor does not connect to 3.3v. IT CONNECTS TO 5v. That means, unless I push the switch, I am applying 5V to GPIO 10. That's supposed to blow up the processor chip on the Pi. But, I have run the Pi for hours and hours with 5v to that pin. The saving factor must be that I am connecting the 5v to the processor pin through a rather large resistor, 10K, so the current drawn by the pin's protection circuit will be low. There will still be some heat generated, but, apparently, not been enough to blow the chip. If I had connected a 5v output from the display to a GPIO pin, that would be another matter. That 5v would have come from a much lower source resistance, so the current through the processor's protection circuit would be much greater, causing more heating, and probable chip failure. The problem has now been corrected.
Next post will be the python code for the 16x2 LCD display module.
No comments:
Post a Comment