I may not be able to answer your question directly but I will try to give you some directions.
You can actually use the Goldelox Serial Command Set Reference Manual
http://www.4dsystems.com.au/product/..._IDE/downloads
in conjunction with the Goldelox Serial Arduino library files as a learning guide. The library files that we are interested in are
Goldelox_Serial_4DLib.h
and
Goldelox_Serial_4DLib.cpp
You can find these files in the folder where you install your Arduino libraries. In my PC the files are here:
C:\Users\4d-doff\Documents\Arduino\libraries\Goldelox_Serial_4DLib
Let us try to analyze the library function Put Character or putCH. On page 13 of the SPE manual, it says that the stream of bytes sent to the display for the putCH function is composed of four bytes:
cmd(MSB), cmd(LSB), character(MSB), character(LSB)
The first two bytes are the command bytes, which are 0xFF (most significant byte) and 0xFE (least significant byte). There are two more bytes. In the given example these are 0x00 (MSB) and 0x39 (LSB). It further says,
This will send the character ‘9’ (0x00, 0x39) to the display.
No if you open the file Goldelox_Serial_4DLib.h and search for the library function "putCH", you will see the function prototype:
void putCH(word wordChar) ;
This function returns nothing and expects a word as an argument. If you look further for the definition of putCH() in Goldelox_Serial_4DLib.cpp, you will see the following:
void Goldelox_Serial_4DLib : : putCH(word WordChar)
{
_virtualPort->print((char)(F_putCH >> 8)) ;
_virtualPort->print((char)(F_putCH)) ;
_virtualPort->print((char)(WordChar >> 8)) ;
_virtualPort->print((char)(WordChar)) ;
GetAck() ;
}
This routine essentially sends to the display four bytes, the sequence of which is described earlier in the manual. As you may have guessed, F_putCH is a constant with the value "0xFFFE".
So to make the display show the character '9', we write,
Display.putCH('9');
or any of the following:
Display.putCH(0x39);
Display.putCH(0x0039);
Display.putCH(0xFF39); // MSB is irrelevant
Display.putCH(57);
We can now see the logic in Mark's post:
Display.putCH('x');
Display.putCH(0x78);
Display.putCH(120);
Display.putCH(0xff78);
And now, if the library functions (commands) allow ASCII, hexadecimal or decimal variables, where is that information documented?
Now there is an app note that explains the basics of interfacing a Goldelox display module (SPE mode) to an Arduino host:
http://www.4dsystems.com.au/appnote/4D-AN-00092/
Pages 8 and 9 can perhaps answer your question ..."sent from the Arduino to the display require the "Display." prefix....".
Hopefully this helps and regards.
Leave a comment: