CLCD User Manual CLCD
CLCD-216 & 420 Comfile CLCD Display Module
On the back of the CLCD, a control board is attached. This control board receives CuNET (I2C) or RS232C signal and prints on the CLCD.
DIP S/W
CUNET RS232 5V RS232
CLCD can communicate using I2C or RS232. There are two RS232 connectors, one for 3pin 5V level signals and the other for 4 pin +/- 12V
level signals.
X
_R
5V D
D
D
C
A
L
GN
GN
5V
RX
5V
GN
N/
SC
SD
5V
CUNET RS232 5V RS232
Use the DIP switch to set the I2C slave address. The 4th DIP switch is not used.
DIP Switch RS232 Baud rate I2C Slave
Address
1 2 3
ON
2400 0
1 2 3
ON
4800 1
1 2 3
ON
9600 2
1 2 3
ON
19200 3
1 2 3
ON
28800 4
1 2 3
ON
38400 5
Comfile Technology Inc. CLCD User Manual pg. 1
[Link] (888)9CUBLOC Fax (650) 638-1360
CLCD User Manual CLCD
1 2 3
ON
57600 6
1 2 3
ON
115200 7
One of CUNET(I2C) or RS232 communication can be used. If both are connected, please make sure when one of them is working, other is
not.
The following is CLCD byte code:
Command Example Bytes Execution Explanation
If received data is not a command, the CLCD
(hex) Time
ESC ’ C’ 1B 43 2 15mS Clear screen. A 15ms will display it on the screen.
delay must be given
after this command. When connecting RS232, maximum baud
ESC ‘S’ 1B 53 2 Cursor ON (Default) rate settings for 12V(4 pin) level is 38400bps.
ESC ‘s’ 1B 73 2 Cursor OFF
For 5V level (3 pin), up to 115200bps can be
ESC ‘B’ 1B 42 2 Backlight ON (Default)
ESC ‘b’ 1B 62 2 Backlight OFF used.
ESC ‘H’ 1B 48 2 LOCATE 0,0
ESC ‘L’ X 1B 4C xx yy 4 100 uS Change the position of The following is an example code when using
Y the cursor. the CB280 to connect to the CLCD module
ESC 1B 44 Code 11 Character code 8
through CUNET protocol. When you
‘D’ 8byte 8bytes through 15 is 8 custom
characters that the user execute this program, CLCD will display
is free to create and increment of numbers.
use. This command
will store the bitmap in
this custom character
memory area.
Code : 8-15 Character
code
1 01 1 Move to beginning of
row 1
2 02 1 Move to beginning of
row 2
3 03 1 Move to beginning of
row 3
4 04 1 Move to beginning of
row 4
Comfile Technology Inc. CLCD User Manual pg. 2
[Link] (888)9CUBLOC Fax (650) 638-1360
CLCD User Manual CLCD
The following is an example code when using the CB280 to connect to the CLCD module through CUNET protocol. When you execute this
program, CLCD will display increment of numbers.
* The slave address of CLCD and SET DISPLAY command should match.
Const Device = Cb280
Set Display 2,0,0,50 ' Set the SLAVE ADDRESS to 0 by manipulating the DIP switch.
Dim i As Integer
i=0
Delay 100 ' Delay for start up of CLCD
Cls
Delay 200 ' Delay for initializing and clearing CLCD
Csroff
Locate 5,2
Print "Start!!!"
Delay 500
Cls
Delay 100
Do
Incr i
Locate 0,0
Print "COMFILE"
Locate 0,1
Print "CUBLOC ",Dec i
Delay 100
Loop
Comfile Technology Inc. CLCD User Manual pg. 3
[Link] (888)9CUBLOC Fax (650) 638-1360
CLCD User Manual CLCD
The following is an example code when using the CB280 to connect to the CLCD module through raw I2C protocol. When you execute this
program, CLCD will display increment of numbers.
The slave address of CLCD and SET DISPLAY command should match.
Const Device = cb280
Dim ct As Integer
ct=0
Set I2c 9,8
I2cstart
‘Set Slave address to 0 and Write Operation I2C
If I2cwrite(&h70) = 1 Then Goto ERR
'Clear Screen
If I2cwrite(&h1b) = 1 Then Goto ERR
If I2cwrite(&h43) = 1 Then Goto ERR
'Turn off cursor
If I2cwrite(&h1b) = 1 Then Goto ERR
If I2cwrite(&h73) = 1 Then Goto ERR
I2cstop
Do
Delay 100
I2cstart
If I2cwrite(&h70) = 1 Then Goto ERR
'Locate 0,0
If I2cwrite(&h1b) = 1 Then Goto ERR
If I2cwrite(&h48) = 1 Then Goto ERR
'Print counter value
If I2cwrite(Asc(Dec ct)) = 1 Then Goto ERR
I2cstop
Delay 500
'increment counter value by 1
Incr ct
Loop
ERR:
Debug "ERROR!"
Return
Comfile Technology Inc. CLCD User Manual pg. 4
[Link] (888)9CUBLOC Fax (650) 638-1360
CLCD User Manual CLCD
The following is an example code when using the CB220 to connect to the CLCD module through RS232 protocol. When you execute this
program, the CLCD will display increment of numbers.
The baud rate of CLCD and SET DISPLAY command should match. Otherwise you will get garbage values on the LCD when trying to
print to it.
Const Device = CB220
'Make sure to set all the DIP switches on
'the back of the CLCD to ON
‘Connect P11 (TX) of CB220 to RX pin of the CLCD.
'Set Display to CLCD/CVFD, 115200 bps, and 128 bytes of buffer
Set Display 2,1,115200,128
Dim ct As Long
ct=0
Do
Locate 0,0
Print Dec ct
Incr ct
Loop
*Make sure GND is shared among the power supply for the display and the CB220, otherwise you will get garbage values on the LCD.
*The internal regulator of CB220 does not have enough power to the CB220, you will need a separate power supply or regulator to power
the LCD.
Comfile Technology Inc. CLCD User Manual pg. 5
[Link] (888)9CUBLOC Fax (650) 638-1360