On Tue, 23 Dec 2008 14:30:32 -0500, "solarwind" said: > Hey all, > > I'm planning out my development board (veroboard). It will have uart > connection via PICKIT2, ICSP, switches and LEDs. I want to connect 8 > LEDs to the pins on a certain port. However, I need that port for the > LCD module as well. I want to be able to physically connect both the > LEDs and the LCD module to the same port but chose which one I want to > use. I want to switch between the LEDs and the LCD somehow. What's the > best way to do this? Why not just connect both the LEDS and the LCD at the same time? As long as you don't pull the LCD's EN pin high, you can wiggle the LEDs all you want on the other pins and the LCD will ignore it. When you do operations on the LCD you will see a little shimmer on the LEDs but if it's just your development system you know why they shimmer so it isn't a "problem" like it would appear to an end user. You can use them both at the same time, just remember the state you want the LEDs to be in, and after driving the LCD, return the port to that state. If you really want to use all 8 pins of a port for LEDs, use a pin from a different port for LCD EN. I did this, and also used the same pins for keyboard input, and also switch input, for a total of four functions from the same pins. Look at the code here if you are interested(it's old and for a 16F84 but it's good code, and in PICC): http://bobblick.com/techref/projects/lcdterm/lcdterm.html Cheers, Bob -- http://www.fastmail.fm - Choose from over 50 domains or use your own -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist