Computer Systems Experiments 12 | Blinking LED with BJT

Series: Computer Systems Experiments

Computer Systems Experiments 12 | Blinking LED with BJT

In this case, we are going to reuse the code of the blinking LED. However, instead of powering the LED directly with the GPIO 21 pin, we connect the GPIO 21 to the base pin of the BJT (2N3904). Thus, we can design a circuit like the following diagram,

The code we are going to reuse is called blink.s and here, we can directly use the assembled machine code blink.bin . You can find this code from my repo. Then we can type the following command transmit this file,

$ rpi-install.py blink.bin

Now, the BJT is acting as a digital switch in our circuit. Congratulations!