SPLat Logo

Communication Control Block elements

NOTICE: We are updating our website. For product enquiries and orders please contact us directly.
NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

Communication Control Block elements

This is a legacy method of configuring the serial port.  Use Open_Serial instead.

However, "under the hood" Open_Serial actually creates a CCB.  A CCB takes this form (this is an example for a MODBUS slave):


;(in your code)
aCOMSetCCB COM485,MBpSlaveCCB ;start modbus
;..other code ..


;NVEM0 data
NVEM0

MBpSlaveCCB
NV0Byte 1 ; 0 protocol, 1 = MODBUS slave
NV0Byte 0 ; 1 device address (will be set by the ComDevAddr instruction)
NV0Byte 0 ; 2 comms profile 8,n,1
NV0Byte 5 ; 3 5 = 9600
NV0Byte 0 ; 4 ** not used **
NV0Byte 0 ; 5 ** not used **
NV0Byte 0 ; 6 ** not used **
NV0Byte 0 ; 7 ** not used **
NV0Byte 0 ; 8 ** not used **
NV0Byte 0 ; 9 inter message gap
NV0Byte 0 ; 10 message timeout time
NV0Byte 0 ; 11 retry count (unused)
NV0Byte 0 ; 12 Permitted RAM write start address
NV0Byte 0 ; 13 Permitted RAM write end address (both = 0 all permitted, both = 255 none permitted)
NV0Byte 255 ; 14 Permitted OUTPUT write start number
NV0Byte 255 ; 15 Permitted OUTPUT write end number (both = 0 all permitted, both = 255 none permitted)
NV0Byte 0 ; 16 ** not used **
NV0Byte 0 ; 17 ** not used **
NV0Byte 0 ; 18 ** not used **
NV0Byte 0 ; 19 ** not used **

 Note that everything from byte 12 (Permitted RAM write start address) on is ignored by 8-bit code: Everything is Read-Write in 8-bit devices.