Binary to Hex 7-Segment Arduino

In this post I’ll show you how to build a simple Binary to Hexadecimal converter using common cathode 7-Segment display and Arduino Mega compatible Iduino Mega R3 board. Similar devices should also work ,however I did not test it. The circuit has 4 binary inputs (Input Bit 0 – 3) and 7 outputs, one I/O for every segment of the 7-Segment display. You can add a set of micro switches or connect the inputs directly to “0” – GND or “1” – 5V available on the Iduino board and set the input combinations from “0000” to “1111”. As the response to a binary input the circuit will produce 7-Segment display code by showing the following characters: 0,1…9, number 10 in binary and above will be shown by hexadecimal digits: A,b,C,d,E,F. You can download the code here. Design schematic diagram is available in the next figure. The code consist of a standard set of Arduino functions like digitalWrite(),digitalRead… and does not require additional include files or libraries. Hopefully this makes it easier to understand and modify the code if necessary. I’ve also added a short video showing circuit operation.