SmartGPU2-LCD480X320Touch-CommandSet
SMART GPU 2 3.5” TOUCH
Command Set
Vizic Technologies ©2014 129
2.11.3 Write Bytes to EEPROM Buffer –57hex – ‘W’ ascii
Commands (host)
6 bytes + N bytes: Bytes To Write
1.- 0x45 (hex), E (ascii). *EEPROM command.
2.- 0x57 (hex), W (ascii).
3.- EEPROM RAM Buffer Address High Byte.
4.- EEPROM RAM Buffer Address Low Byte.
5.- Bytes To Write High Byte.
6.- Bytes To Write Low Byte.
7-N – Data Bytes.
Responses (device)
SWB(2 bytes) + ACK/NAK(1 byte).
1.-SWB(Successfully Written Bytes) High byte.
2.-SWB(Successfully Written Bytes) Low byte.
3.-0x4F (hex), O (ascii) – success ACK or
0x46 (hex), F (ascii) – fail NAK.
Description
This Command Writes Data to the EEPROM
RAM Buffer starting from the EEPROM RAM
Buffer Address(0-2047) and writing the Bytes To
Write parameter, this could be from 1-2048 bytes.
After the command succeeded, Successfully
Written bytes should be checked to detect the
amount of valid written data bytes. In case of
Successfully Written bytes < Bytes to Write, it
means the EEPROM RAM Buffer address pointer
overflowed position 2047.
Note that EEPROM RAM Buffer Address +
Bytes to Write parameters must always be less
than or equal to 2048 bytes, if the sum of those
parameters is more than 2048 bytes, command
will fail.
During Read, Write, Erase, Compare, etc.
EEPROM Functions/Commands, user may not
call any other command rather than EEPROM
commands, as the EEPROM RAM Buffer data is
only valid during calls to EEPROM only functions,
if any other function/command different than
EEPROM related is called, EEPROM RAM Buffer
will be discarded and data in it will be lost.
Example (sent commands)
Example 1:
<45,57,00,0A,00,32,(data)> Write 100(dec) Bytes
to the EEPROM RAM Buffer starting from Address
10(dec).
All data is in hex.