Project Description
Main Project Image
The project owner hasn't added main project image yet.
Project description
This board connects to an 8-bit 5V bus and converts the digital bus value to seven segment hexadecimal display in software on the microcontroller.
On my Arduino, the software is
// The lookup table converts the four-bit input to the seven segment display. The MSB is segment a and the LSB is segment f.
char lookup_table[16] = {0x7E, 0x30, 0x6D, 0x79, 0x33, 0x5B, 0x5F, 0x70, 0x7F, 0x7B, 0x77, 0x1F, 0x0D, 0x3D, 0x4F, 0x47};
void setup() {
DDRB = B00000000; // 8 bit input (digit 1 high nybble, digit 2 low nybble)
PORTB = B11111111; // With pull up resistors
DDRD = B11111111; // Outputs for digit 1 (a-f MSB to LSB) and segment a digit 2 (LSB)
DDRC = B00111111; // Remaining 6 segments of digit 2 (b-f)
}
void loop() {
int digit1_in = (PINB & 0xF0) >> 4;
int digit2_in = (PINB & 0x0F);
int digit2_segments = lookup_table[digit2_in];
PORTD = (lookup_table[digit1_in] << 1 & 0xFE) + ((digit2_segments & 0x7F) >> 6);
PORTC = digit2_segments & 0x3F;
}
Gallery
The project owner hasn't added any images yet.
Design Files
Embed Code
Component (8)
Qty
Description
![](https://upverter.com/static/renders/components/883/883449acfb94b6c7_48x48.png)
Resistor
R14, R9, R1, R6, R3, R15, R13, R5, R8, R10, R2, R4, R12, R11, R7
15
Generic Resistor (330)
![](https://upverter.com/static/renders/components/61c/61c000d4bc325863_48x48.png)
Capacitor
C2
1
Generic Capacitor (1µF)
![](https://upverter.com/static/renders/components/1ab/1ab3bf2f3377baca_48x48.png)
AVR ISP Surface Mount
J2
1
No description
![](https://upverter.com/static/renders/components/6f2/6f28e47df0a6b822_48x48.png)
Capacitor
C1
1
Generic Capacitor (1µF)