SPLat Logo

Xwire OBLCD

NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

Xwire OBLCD

Any SPLat controller with a character LCD (not touchscreen) can act as a Xwire Slave user interface.  In this mode, text on the Slave's LCD actually comes from the Xwire Master regardless of whether the master has an LCD or not.  This is the key ingredient for the UI216 & UI420 whereby they could be connected to a CC18 Xwire Master to act as displays with buttons.

How does this magic work?  It's all done via Xwire address 249.  OBLCD text is broadcast to address 249 and every Xwire slave will always receive LCD data at this address, even though the real slave address will be different.  So you could have multiple Xwire Slaves, all will display the same OBLCD text.  Button presses are reported individually by each Slave.

Nothing is ever received from address 249 as it's one direction, Master to Slave(s) only.  Other I/O points on the slave may be handled via SEXI if your master controller is a 32 bit model.

Cursor Control

The master is able to send cursor control and position to the slave using addresses 80 thru 83.  The meaning of these is as follows:

AddressFunction
80 LCD type
81 Cursor control, ie, on or blinking
82 Row
83 Column

Programming

Xwire Master

To your Xwire Master table, you only need to add entries for the LCD buffer as follows:

XwireMster   pXwireMaster20x4
.. more code ..

NVEM0

pXwireMaster20x4
.. other slave buffers ..

;LCD=249, FirstChar, NofChars (max 32), Zero, Zero
NV0Byte 249, 0, 32, 0, 0 ;LCD chars 0 thru 31
NV0Byte 249, 32, 32, 0, 0 ;LCD chars 32 thru 63
NV0Byte 249, 64, 16, 0, 0 ;LCD chars 64 thru 79
NV0Byte 249, 81, 3, 0, 0 ;LCD cursor info

;EndOfTable=255
NV0Byte 255 ;End of Master Xwire table

 

pXwireMaster16x2
.. other slave buffers ..

;LCD=249, FirstChar, NofChars (max 32), Zero, Zero
NV0Byte 249, 0, 32, 0, 0 ;LCD chars 0 thru 31
NV0Byte 249, 81, 3, 0, 0 ;LCD cursor info
;EndOfTable=255
NV0Byte 255 ;End of Master Xwire table

 

Xwire Slave

Just start Xwire.  Any LCD text will automatically appear.