A seven segment display can be used to display numbers. Eight LEDs are used for most seven segment displays as shown below, allowing decimal points to be displayed as well.
Using a seven segment display requires specialized circuits to control and refresh the segment matrix. This increases in complexity with each digit added. In the interest of convenience and simplicity, we have developed an easy to use seven segment display called the CSG module.
As you can see above, the front has a 4 digit seven segment display and the back has two I2C connections. After connecting the CSG to a Cubloc, you can use the commands in the following table to easily and quickly display the numbers you want.
You will need to use the Set I2C command before using any of the command below.
|CSGDec SlaveAdr, Data||Output decimal value||CSGDec 0, 1|
|CSGHex SlaveAdr, Data||Output hex as decimal value||CSGHex 0, 1|
|CSGNPut SlaveAdr,Digit, Data||Control digit places||CSGNPut 0, 0, 8|
|CSGXPut SlaveAdr,Digit, Data||Control digit places and output data as binary number||CSGXPut 0, 0, 9|
The I2C slave address can be set using the DIP switches on the back of the CSG module. A total of 4 addresses can be set per I2C line pair.
To display more than 4 digits, use 2 CSG modules as shown below and set different slave addresses for each.