A great Arduino library to communicate with the DSP-16S04H 16 segment 4 digit 2.3" display from Embedded Adventures
The Arduino sample sketches show the minimum functions necessary to drive the DSP-16S04H display.
The first function to call, which clears the data buffers and starts the I2C bus.
dsp16s04h.init();
A test function is included in the display's firmware. This can be executed using the function, which will toggle the test_mode flag in the display's firmware.
void test();
Print up to 4 characters on the display
void print(char *str)
void print(String str)
Drive the segments individually. Adds the 16-bit raw data to the data_buffer in the library (digits shifted from left to right) and sends it to the firmware to display. Check the datasheet for the mapping of bits to segments.
void putRaw(uns16 data)
Turn on/off the dot at position position
void setDot(uns8 position);
void clearDot(uns8 position);
To adjust the display brightness
void setBrightness(uns8 level)
Clear the display and turn off all segments
void clearDisplay();
- Arduino Uno/compatible
- I2C (A4/A5)
- ESP8266 Module (ESP7 and ESP12)
- I2C (IO4/IO5)
- ESP32 Module
- I2C (IO21/IO22)
- SAMD21-based board compatibility
- include UART Serial interface
A bug has been found in the older displays in which an "8" was not being displayed correctly. The hex file included in this repository is an updated version of the firmware with that bug fixed. Please click here to download the Screamer bootloader, which is used for updating the firmware on your display if it exhibits the behavior. Follow the steps below to update the firmware. Besides the Screamer bootloader, you will also need a USB-TTL Serial cable to connect between your computer and the DSP16S04H.
- Open the Screamer bootloader and change the "Comm:" to the COM port your USB-TTL Serial cable is connected to. This can be found by checking "Device Manager"
- Make sure speed is set to "115200" and Oscillator is set to "48"
- Click on "Open" and find the firmware hex file in this repository.
- Download the firmware to the DSP16S04H.