|
|
Controlling the display with serial commands
With the serial platform firmware you can control the display with simple serial commands and the commanding device can be a computer or just a little microcontroller. When using a computer to control the display you can use either just a normal terminal program (on any OS) to send the commands manually or on Windows you can use 4D Serial Commander that has all the buttons for different functions for easy testing.
The user manual for the display module lists and explains all the commands you can use.

4D Serial Commander

Testing out 4D Serial Commander
If using a terminal program, just set the baud rate you want (from 300 baud to 256K baud) as the module has automatic sensing for the baud speed on initialization. The other magic words for configuration are 8 bits, 1 stop bit and no parity. The initialization is done by simply sending a 'U' character (0x55 in hex) and the module then tunes at the same baud rate for further instructions. Every time the module completely receives a right command that it understands it replies with an ACK (acknowledged, command understood), which is 0x06 in hex. Then if the command is wrong, the module replies with a NAK (not acknowledged, command not understood), which is 0x15 in hex.
A simple talk with the module to draw a red circle with 16 pixel radius in the middle of the screen:
U = User, M = Module Commands in hex ------------------------- U: 0x55 // Initialize M: 0x06 // ACK U: 0x45 // Clear screen M: 0x06 // ACK U: 0x43 // Draw a circle U: 0x30 // X coordinate, 0x30 hex = 48 decimal U: 0x20 // Y coordinate, 0x20 hex = 32 decimal U: 0x10 // Radius, 0x10 hex = 16 decimal U: 0xF8 // The MSB contains color part RRRRRGGG, binary 11111000 (full red) = 0xF8 hex U: 0x00 // The LSB contains color part GGGBBBBB, so no need to put anything here, 0x00 M: 0x06 // ACK -------------------------
| | Pages: 1 2 3 4 5 6 7 8 9 10 11 12 | |


Content in english!
Sisältö suomeksi!
