4 leds / 4 switches
4 leds / 4 switches - 8 bits
Fig. 1 4 leds / 4 switches board
Description:
This board is a small board with 4 inputs as buttons and 4 outputs as leds.
The 4 lower bits of the 8 bits bus are the leds outputs, the 4 upper bits the inputs.
The board can be powered by 1.8 to 5V processor board.
Specifications:
Input voltage2.5 to 5V
Function4 inputs / 4 outputs
Interface8 bits
Schematic:
The schematic is extremely simple. The 4 lower bits of the port drives a led through a resistor.The resistor used depends on the led and power supply. I selected 3mm low current red leds, with a 1.6V drop across them, and went for 1.5k resistors, which will give between 0.6 and 2.3 mA in the leds. The leds selected are given for 1mA typically.
The 4 upper bits are pulled high by resistors, and the buttons pull the corresponding bit low when pressed. C1 and R10 filter the power supply.
Fig. 2 4 leds / 4 switches schematic
Construction:
The PCB fits on a small single sided board. All components are on the top side.
Fig. 3 4 leds / 4 switches layout
Once all the components are soldered, the board is ready. Keep the switches for last.
Pads 1 to 4 can be drilled to 3mm to fix the board, or put spacers.
| 4 leds / 4 switches Component list |
|---|
|
R1, R2, R3, R4: 10 k |
How to use / Testing:
To check the board, you need a processor board running tutorial 11 - I2C extension.
Files and links:
Eagle PCB and schematics files for 4 leds / 4 switches.PDFs of PCB, layout and schematics of 4 leds / 4 switches.
PIC Tutorials 11 with 4 leds / 4 switches.

