On my ATmega32, I have an LCD connected to Port C. PC0-PC2 and PC4-PC7 are used for this, leaving PC3 open. Can I use this I/O pin for another function or is it unavailable while the LCD is being used?
OK, it figures that I would have problems after etching a PCB and trying to use this pin.
Well, when I tested it, I used it as an output and it worked fine. Without thinking about it, I made the PCB so that it would be an input. Well, when I try to read from it, my LCD display doesn't show anything.
OK, it figures that I would have problems after etching a PCB and trying to use this pin.
Well, when I tested it, I used it as an output and it worked fine. Without thinking about it, I made the PCB so that it would be an input. Well, when I try to read from it, my LCD display doesn't show anything.
I can't help with AVR as I don't use them, but certainly with a PIC there's no problem doing that - each pin can be individually read or written with simple single instructions. I see no reason for the AVR being any different?.
Got it. I found a page that explained the problem...
**broken link removed**
In fact, several of the LCD pins can be used as IO pins in between LCD write sequences. You just have to save the PORT and DDR value, use the port, then set them back after your done.
Hopefully this will help anyone else with the same problem in the future.
~Mike
In fact, several of the LCD pins can be used as IO pins in between LCD write sequences. You just have to save the PORT and DDR value, use the port, then set them back after your done.