Data transfer function is pretty necessary for TFT LCD module. Recently, one of our customers asked for a new feature: monochrome data transfer. In his application, monochrome image data needs to be transferred from LCD display of the aquarium computer to TFT LCD module for remote control. He prints 244 pixels in each line, for 64 lines. Old command for data transfer is ok for this requirement, but it is very slow because the user has to transfer for each line more than 500 Bytes, which takes 40ms at 115200 baud rate. Each printed point needs 2 bytes for the color, but actually there are only 2 colors: background and foreground. So it is very beneficial to have a command which allows the transfer of monochrome picture data (patterns). To solve the problem, the feature is developed.
There are some important points to consider when creating the new command for transferring monochrome data. It should be possible that the count of transferred pixels is not always a multiple of 8 (8, 16, 24 ?, e.g. if the user prints 122 and 244 pixels, it is not enough to count the transferred bytes of monochrome data (bit masks).
There shall be 2 solutions for this:
a) the amount of pixels to be printed have to be transmitted also after coordinates
b) create 2 different commands: one command prints the set bits with foreground color, the other with background color, the clear bits do not have any affect (transparent)
When the user wants a specific color under the line of monochrome data, the user can use the line-command before sending the monochrome data to TFT LCD module.
没有评论:
发表评论