Site icon Microcontroller Based Projects

Arduino Base Converter with 4×4 Keypad and I2C LCD

Arduino-Base-Converter-with-4x4-Keypad-and-I2C-LCD-20X4-Featured-Image

Arduino hexadecimal to binary Base Converter is a simple design that can be built using 4×4 Keypad and I2C LCD display module. Arduino MEGA board was chosen as a target device. This circuit will wait for a single digit to be entered and then convert it to a binary representation outputting 8 bit to the display. 20×4 I2C LCD display was used but any other compatible devices should also work. More information regarding interfacing I2C Display and Arduino is available at this link. The keypad value is received by a keypad.getKey() library function and then by using a shifting binary mask to extract the correct bits are send them to the LCD module.

Additional info can be found in the attached sketch. Do not forget to add required 3 Arduino libraries: Keypad.h, Wire.h and LiquidCrystal_I2C.h. Pay attention to display address, it may differ from the default setting of 0x27. Next figure shows the schematic diagram.

This project can be easily modified for converting a 2 digit hexadecimal number by calling a conversion function 2 times and combining the result with OR logic operator. Other bases can also be added using the same logic. For example converting from binary or decimal representation.  Here you can see a short video showing the converter in action.

Exit mobile version