@@ -90,12 +90,12 @@ typedef struct {
9090Next, add the following code to ` chip_init ` (after the line that defines ` chip ` ):
9191``` C
9292chip->segment_pins[0 ] = pin_init(" SEG_A" , OUTPUT_HIGH);
93- chip->segment_pins[0 ] = pin_init(" SEG_B" , OUTPUT_HIGH);
94- chip->segment_pins[0 ] = pin_init(" SEG_C" , OUTPUT_HIGH);
95- chip->segment_pins[0 ] = pin_init(" SEG_D" , OUTPUT_HIGH);
96- chip->segment_pins[0 ] = pin_init(" SEG_E" , OUTPUT_HIGH);
97- chip->segment_pins[0 ] = pin_init(" SEG_F" , OUTPUT_HIGH);
98- chip->segment_pins[0 ] = pin_init(" SEG_G" , OUTPUT_HIGH);
93+ chip->segment_pins[1 ] = pin_init(" SEG_B" , OUTPUT_HIGH);
94+ chip->segment_pins[2 ] = pin_init(" SEG_C" , OUTPUT_HIGH);
95+ chip->segment_pins[3 ] = pin_init(" SEG_D" , OUTPUT_HIGH);
96+ chip->segment_pins[4 ] = pin_init(" SEG_E" , OUTPUT_HIGH);
97+ chip->segment_pins[5 ] = pin_init(" SEG_F" , OUTPUT_HIGH);
98+ chip->segment_pins[6 ] = pin_init(" SEG_G" , OUTPUT_HIGH);
9999```
100100
101101The code initializes each of the segment pins as an output, and sets the initial value to digital high. The 7-segment
@@ -259,4 +259,4 @@ tutorial:
259259 compiles the chips and creates a release whenever you push a tag.
260260
261261 Here's an [example for a Wokwi project](https://wokwi.com/projects/350946636543820370) that uses this chip. Note the
262- "dependencies" section in `diagram.json` - it tells Wokwi where to look for the chip implementation on GitHub.
262+ "dependencies" section in `diagram.json` - it tells Wokwi where to look for the chip implementation on GitHub.
0 commit comments