LCD extra pin use?

Status
Not open for further replies.

MrMikey83

New Member
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.

Any suggestions?
~Mike
 

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?.
 
Thats what I thought, but for some reason when i try to read off this pin, the LCD display stops working. Strange.
~Mike
 
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
 
MrMikey83 said:
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.

Makes the AVR sound rather an inferior processor?.

A mid-range PIC only has 35 instructions, yet manages to access single pins (read or write) without such messing about.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…