This PDF describes the most PIN effecient way to control LEDs, assuming that only one LED at a time needs to be ON. The instructions are for· PIC microcontroller but should work for BS also.
Just one question. Can BS's pins be set specifically as input or output?

http://ww1.microchip.com/downloads/en/AppNotes/91029a.pdf

allanlane5

02-08-2005, 03:22 AM

Yes, you either use the INPUT and OUTPUT statement for that, or the DIRs variable.

The BS2 has a PIC 16C54 at its heart, and uses the PIC pins as its I/O drivers.