For All firmware version higher than V7.0(with flash chip) and V6.2(without flash chip):
In order to backward compatible with small matrix of screens, the graphic coordinate and line length, circle ratio should be sent to display like this:
<=254 , 1 byte format
>=255 and <495, 2 bytes format, first byte always 255, 2nd byte is (value-255)
>=495, 3 bytes format, 1st byte always 255, 2nd byte is (240+(int)value/256), 3rd byte is (value%256)
The maximum value will be (255-240)*256+255=4095.
Here is the example of C code:
void write(byte data); //send a byte of data to communication port:UART,I2C or SPI)
void write2B(unsigned int v) { //for all screen include 4.3"
if (v < 255) //<=254
write(v);
else { //>=255
write(255);
if((v-255)<240) //>=255 and <495
write(v - 255);
else //>=495
{
write(240+(int)(v/256));
write(v%256);
}
}
}
For display without flash chip(V6.0,V6.1 only):
- For writing any data to MCU (splash screen, user fonts…): If didn’t use the latest Digole’s Arduino or C library, please erase the memory by using regular “FLMER”(flash memory erase) command and wait the erasing completed (usually delay(1000) to wait 1second) prior to write data.
- 4.3” large display module alway use 2 bytes integrated format as position(Producted before Jul-7th 2023). use:
#define _Screen_Over_511_
if using Arduino Library.
The firmware after Jul-7th 2023, use this compatible codes to send x/y position that value over 495 (this way makes it compatible with all older Digole serial displays,see the top of page)
Download links:
Arduino C libarary V7 (Aug 10th 2023, Fixed ESP8266 I2C read1() bug)
C libarary V7 (un-test)
C libarary V6.x
Online emulator