Hello everyone,
I am attempting to drive an LCM-1602C LCD with an AVR ATTiny48. I am using my own code to interface with the LCD's HD44780 controller. The attached picture shows a working setup, in which the LCD will initialize and display
R1: "hello, world!"
R2: "HELLO, WORLD!"
However, if I move the LED array or the 10k resistor attached to it's cathodes, some of the commands fail. For instance, if I move the LED array one space to the right, I get
R1: "ello,worl!"
R2: "EO,WOR!"
If I remove the 10K resistor attached to the LED array's cathodes, I get something like (it sometimes differs by a few characters)
R1: "hello,world!ELLO"
R2: (enabled, but blank)
If I remove the LED array altogether, I get
R1: "eowo!EOWO!"
R2: (uninitialized)
I am struggling to figure out why the LED array is affecting the LCD controller at all. From my limited circuits knowledge (little more than Ohm's Law and Kirchoff's Laws), I expect the only significant result of including the LED array to be an additional ~10mA draw on the breadboard power supply per active LED. Removing the 10k on the LED array's cathodes should be equivalent to removing the LED array itself, as the result in both cases is an open circuit that cannot draw any current. However, the LCD output described above makes it clear that removing the 10k is not equivalent to removing the LED array.
Here are a few facts that may be of interest:
I have a multimeter, but no oscilloscope. I will glady post my code or perform additional tests upon request. Thank you very much for reading this, and please let me know if you have any ideas about what might be causing this unexpected behavior, or suggestions as to what I should try next.
I am attempting to drive an LCM-1602C LCD with an AVR ATTiny48. I am using my own code to interface with the LCD's HD44780 controller. The attached picture shows a working setup, in which the LCD will initialize and display
R1: "hello, world!"
R2: "HELLO, WORLD!"
However, if I move the LED array or the 10k resistor attached to it's cathodes, some of the commands fail. For instance, if I move the LED array one space to the right, I get
R1: "ello,worl!"
R2: "EO,WOR!"
If I remove the 10K resistor attached to the LED array's cathodes, I get something like (it sometimes differs by a few characters)
R1: "hello,world!ELLO"
R2: (enabled, but blank)
If I remove the LED array altogether, I get
R1: "eowo!EOWO!"
R2: (uninitialized)
I am struggling to figure out why the LED array is affecting the LCD controller at all. From my limited circuits knowledge (little more than Ohm's Law and Kirchoff's Laws), I expect the only significant result of including the LED array to be an additional ~10mA draw on the breadboard power supply per active LED. Removing the 10k on the LED array's cathodes should be equivalent to removing the LED array itself, as the result in both cases is an open circuit that cannot draw any current. However, the LCD output described above makes it clear that removing the 10k is not equivalent to removing the LED array.
Here are a few facts that may be of interest:
- The LCD works properly when driven by an Arduino, without the LED array present.
- The breadboard power supply is the following: 9v, 650mA wallwart -> 100uF cap -> 5v regulator -> 10uF cap.
- I'm using an AVR ATtiny48 @ 1Mhz, with default fuse settings. I also tested this with an ATmega48 using the same settings, and got the same results. All of the ports being used have a 10k pulldown resistor.
- Changing the value of the resistor connected to the LED array's cathode prevents some characters from showing up. At 220Ω, 'D' is only present ~50% of the time. At 1MΩ, 'H' and 'D' never show up.
I have a multimeter, but no oscilloscope. I will glady post my code or perform additional tests upon request. Thank you very much for reading this, and please let me know if you have any ideas about what might be causing this unexpected behavior, or suggestions as to what I should try next.