CL01 Intelligent Controller Users Manual

CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
CL01 Intelligent Controller Users Manual
Revision B
CL01
Intelligent Controller Version 1.4
(For IS-Dev Kit-7 and IS-Dev Kit-7D)
NKK SWITCHES
7850 E. Gelding Drive
Scottsdale, AZ 85260
Toll Free 1-877-2BUYNKK (877-228-9655)
Phone 480-991-0942
Fax 480-998-1435
e-mail <[email protected]>
All Rights Reserved Worldwide
NKK Switches makes no warranty for the use of these products and assumes no responsibility for any errors,
which may appear in this document, nor does it make a commitment to update the information contained herein.
Smart Switch is trademark of NKK Switches.
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 1 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
TABLE OF CONTENTS
Table of Contents ..........................................................................................................2
1. General Controller Features ...................................................................................3
2. Compatible Dev Kits and Logic Boards.................................................................3
3. Operational Overview..............................................................................................4
4. Operational Details ...................................................................................................7
5. Communication Protocol .........................................................................................11
6. Hardware ...................................................................................................................19
7. Key Terms & Definitions..........................................................................................24
8. Firmware problems ..................................................................................................24
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 2 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
1. General Controller Features
The CL01 Version 1.4 controls two OLED (64x48) SmartSwitches or two OLED (52x36) SmartDisplays. The
firmware can be customized based on customer requirements. Below are current features:
•
•
•
•
•
•
•
•
•
•
•
•
Controls two OLED (64x48) SmartSwitches or two OLED (52x36) SmartDisplays
Serial communication via RS232 (57.6K, 1 start bit, 8 bit , 1 stop bit)
On board microSD Flash that can hold up to 65,536 images
Optional audio feedback while switch is pressed.
Program responses to switch-actions events and timer-expire events.
User programmable for images, attributes and set-ups.
Command the controller to display images in real time.
Direct communication from host to the OLED modules.
Set the type of activity reports from the controller to host.
Brightness settings to extend OLED life.
Reports switch activity and timer expiration via serial port.
Stand alone operation or real time control by host.
2. Compatible Dev Kits and Logic Boards
The following is a list of Dev Kits with a CL01 controller.
• IS-Dev Kit-7 for two OLED (64x48) SmartSwitches
• IS-Dev Kit-7D for two OLED (52x36) SmartDisplays
The following is a list of compatible Logic Boards and switches.
• IS-L02L1 Logic Board for two OLED (64x48) SmartSwitches
• IS-L02P1 Logic Board for two OLED (52x36) SmartDisplays
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 3 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
3. Operational Overview
Power-up Sequence:
Upon power up, the controller checks the position of the Mode Select Switch and adjusts the image size
accordingly. The “Switch” position will show the full image while the “Display” position will display only the
middle 52 pixels of the top 36 lines of the image.
OLED Brightness Adjustment Mode:
The controller will then allow the brightness of the two OLED modules to be adjusted. Press the left hand
switch to make both OLED modules dimmer. Press the right hand switch to make both OLED modules brighter.
The brightness can be one of 16 levels between 0 and F where F is the maximum brightness. At the F level the
OLED has a rated life of 15,000 hours. The dimmer the level is set the longer the life of the OLED.
Main Operational Mode:
After a few seconds of user inactivity the controller will move into the main operations mode where the switch
on the left displays the image at the user’s first preset address. The right hand switch will display the image at
the user’s second preset address. The controller will then respond to a switch actuation or a timer expiration as
set by the attributes.
Addresses:
The controller associates one address to the left switch and one address to the right switch. Each switch will
display the image at their associated addresses. The addresses are in hexadecimal. The controller handles the
addresses as a group of addresses with associated images and attributes within user defined loops. Each loop has
a starter address and an ending address. The function of the attributes for each address is to tell the controller
where to point to next either when the switch associated with that particular address is pressed or when a timer
expires. There are three types of attributes:
• Attributes SW1 and SW2 are the Action Addresses. In the starting address the Action Addresses tell the
controller what addresses to point to when the switch associated with that particular address is pressed. In
the ending address the Action Addresses tell the controller what addresses to point to when the loop has
ended.
• The end address, EP1, sets the ending address for the loop.
• T1 and T2 are timers that are multiplied together to set the length of time to stay at one address before
moving to the next address within the loop.
The only addresses that need attributes within the loop are the first and last addresses.
Illustration 1 shows the starting and ending addresses for “Switch A” which is associated with address 0001H.
Switch A could be the left or right switch.
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 4 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
Illustration 1, Start and Ending Addresses for Switch A
…
Start Image
Address
…
0001
…
Ending Image
…
0003
…
…
Actions Addresses
SW1
SW2
…
…
Left switch’s
Right switch’s
future address
future address
when switch A
when switch A
is pressed.
is pressed.
…
…
Left switch’s
Right switch’s
future address
future address
when end of
when end of
loop
loop
…
…
EP1
…
Ending
Address
(0003)
T1
…
milliseconds
T2
…
milliseconds
…
Don’t
care
…
Don’t
care
…
Don’t
care
…
…
…
Illustration 2 shows a simple loop where images at addresses 0041H through 0057H are shown in sequence for
two seconds each and will loop continuously until the switch associated with that particular address is pressed
or the loop ends. When that switch is pressed the controller will set the left hand switch to address 0001H and
the right hand switch to address 006AH. If the loop ends before the switch is pressed the left switch will go to
address 0059H and the right switch will go to address 005AH.
Illustration 2, Simple Image Loop
…
Start Image
Next Image
…
Next Image
Ending Image
…
Address
…
0041
0042
…
0056
0057
…
Actions Addresses
SW1
SW2
…
…
0001
006A
0000
0000
…
…
0000
0000
0059
005A
…
…
EP1
…
0057
0000
…
0000
0000
…
T1
…
7D
00
…
00
00
…
T2
…
14
00
…
00
00
…
If SW1 and/or SW2 for the ending addresses are 0000H the loop will start again. Loops can overlap where, for
instance, the left switch starts at address 0001H and ends at 0005H while the right switch starts at 0002H and
ends at 0006H. The two loops will not interfere with each other.
Timers Operation:
Each switch has an independent timer; timer1 and timer2. Each timer value is the product of the two user
defined variables T1 and T2 of the attributes. The formula for the timer value in millisecond is:
The timer value in ms= (T1)x(T2)
Each of these variables can have a value between 01H to FFH (1 to 255). The timer for a given switch will
be disabled if the T1 value is set to zero. For T2 the zero value is defined as 256. Pressing either switch will
reset the timers for both switches. Holding down either switch will prevent both timers from running. The
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 5 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
controller takes 35ms to send a image to each OLED for a maximum of 28 images per second on one
OLED.
Attribute Block:
An attribute is handled as a block of 8 bytes.
Byte
1
2
3
4
5
6
7
8
Description
High byte of action address for
OLEDModule #1.
Low byte of action address for
OLEDModule #1.
High byte of action address for
OLEDModule #2.
Low byte of action address for
OLEDModule #2.
High byte of end address.
Low byte of end address.
Timer B
Timer A
Image Block:
An image is handled as a block of 6144 bytes. Each pixel requires two bytes in the 565 format as shown
below.
B7
B6
B5
B4
B3
G2
G1
G0
G7
G6
G5
R4
R3
R2
R1
R0
The current version of the controller can only handle 64x48 format images. The OLED switches show the full
image while the OLED displays will only show the middle 52 pixels of the top 36 lines of the image. The image
is handled from top left to bottom right as shown below.
Byte
1-128
129-256
•
•
•
5889-6016
6017-6144
Description
First line of image
Second line of image
47th line of image
48th line of image
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 6 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
4. Operational Details
Power-Up Sequence (Steps 1,2,3)
Upon power-up or reset, controller performs the following steps:
Step 1: Check the status of Mode Select Switch for mode of operation. Initialize according to selected mode.
Step 2: Display dim and bright on the two switches and allow for adjustments of the brightness. There are 16
brightness levels (0 to F). When the internal timer is expired, the controller proceeds to Step 3. Every time a
switch is pressed, the timer gets reset. If a switch is held depressed the timer does not run. Switch activity are
not reported to host.
Step 3: Transmit 11H to host via RS232. Check the microSD for set up value. If set up values are
programmed, get the start address for switch 1, start address for switch 2 and the flag byte. If the set up values
are not programmed use the default values: start address for switch 1 = current address for switch 1 = 0001H,
start address for switch 2 = current address for switch 2 = 0010H and flag byte = 80H.
Step 4:
A. If attributes for start address of switch 1 are programmed, get the attribute for switch 1.
B. If attributes for start address of switch 1 are not programmed, use the default: Switch 1 Action
address for switch 1 = 0000H, switch 1 action address for switch 2 = 0000H, end address for
switch 1 = 0010H Timer2 for switch 1=00H timer1 for switch 1= 0AH.
C. If attributes for start address of switch 2 are programmed, get the attribute for switch 2.
D. If attributes for start address of switch 2 are not programmed, use the default: Switch 2 action
address for switch 1 = 0000H, switch 2 action address for switch 2 = 0000H, end address for
switch 2 = 0020H Timer2 for switch 2=00H timer1 for switch 2= 0DH,
Step 5: Send the pictures from microSD to OLED module according to start addresses.
Main Operational Mode
Step 6:
A.
B.
C.
D.
E.
F.
G.
If the switch 1 is pressed, process it. (see details below)
If the switch 2 is pressed, process it. (see details below)
If the timer for switch 1 is expired, process it. (see details below)
If the timer for switch 2 is expired, process it. (see details below)
If the switch 1 is released: Transmit B1H to host if flag is enabled.
If the switch 2 is released: Transmit B2H to host if flag is enabled.
If there is update flag for switch 1 is set, process it.
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 7 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
H. If there is update flag for switch 2 is set, process it.
I. Checks the host communication buffer for data. If there is data, process them. (For detail see
Communication Protocol)
J. Go to step 6 A.
Detailed Explanation of Operation Step 6
Step 6A: If switch 1 is pressed then:
1. Transmit 81H to host if flag is enabled.
2. If switch 1 action address for switch 1 is not equal zero and the attribute for the location is
programmed then:
a. Start address for switch 1 = switch 1 action address for switch 1.
b. Current address for switch 1 = switch 1 action address for switch 1.
c. Get the attributes and put the values for switch 1 action address for switch 1, switch 1 action
address for switch 2, end address for switch 1 and timers for switch 1.
d. Set update flag for switch 1.
3. If switch 1 action address for switch 1 is equal zero or the attribute for the location is not
programmed then take no action.
4. If switch 1 action address for switch 2 is not equal zero and the attribute for the location is
programmed then:
a. Start address for switch 2 = switch 1 action address for switch 2.
b. Current address for switch 2 = switch 1 action address for switch 2.
c. Get the attributes and put the values for switch 2 action address for switch 1, switch 2 action
address for switch 2, end address for switch 2 and timers for switch 2.
d. Set update flag for switch 2.
5. If switch 1 action address for switch 2 is equal zero or the attribute for the location is not
programmed then take no action.
Step 6B: If switch 2 is pressed then:
1. Transmit 82H to host if flag is enabled.
2. If switch 2 action address for switch 1 is not equal zero and the attribute for the location is
programmed then:
a. Start address for switch 1 = switch 2 action address for switch 1.
b. Current address for switch 1 = switch 2 action address for switch 1.
c. Get the attributes and put the values for switch 1 action address for switch 1, switch 1 action
address for switch 2, end address for switch 1 and timers for switch 1.
d. Set update flag for switch 1.
3. If switch 2 action address for switch 1 is equal zero or the attribute for the location is not
programmed then take no action.
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 8 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
4. If switch 2 action address for switch 2 is not equal zero and the attribute for the location is
programmed then:
e. Start address for switch 2 = switch 2 action address for switch 2.
f. Current address for switch 2 = switch 2 action address for switch 2.
g. Get the attributes and put the values for switch 2 action address for switch 1, switch 2 action
address for switch 2, end address for switch 2 and timers for switch 2.
h. Set update flag for switch 2.
5. If switch 2 action address for switch 2 is equal zero or the attribute for the location is not
programmed then take no action.
Step 6C: If timer for switch 1 expires then:
1. Transmit 83H to host if flag is enabled.
2. Increment current address for switch 1.
3. If current address for switch 1 is not equal ((end address for switch 1) +1) then:
i. Transmit FDH and current address for switch 1 to host if flag is enabled.
j. Set update flag for switch 1.
4. If current address for switch 1 is equal ((end address for switch 1) +1) then:
k. Read the Attributes for end address location.
i. If end location action address for switch 1 is equal zero then put current address = start
address and set update flag for switch 1.
ii. If end location action address for switch 1 is not equal zero then:
1. Start address for switch 1 = end address action address for switch 1.
2. Current address for switch 1 = end address action address for switch 1.
3. Get the attributes and put the values for switch 1 action address for switch 1,
switch 1 action address for switch 2, end address for switch 1 and timers for
switch 1.
4. Set update flag for switch 1.
iii. If end location action address for switch 2 is equal zero then take no action.
iv. If end location action address for switch 2 is not equal zero then:
1. Start address for switch 2 = end address action address for switch 2.
2. Current address for switch 2 = end address action address for switch 2.
3. Get the attributes and put the values for switch 2 action address for switch1,
switch 2 action address for switch 2, end address for switch 2 and timers for
switch 2.
4. Set update flag for switch 2.
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 9 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
Step 6D: If timer for switch 2 is expired then:
1. Transmit 84H to host if flag is enabled.
2. Increment current address for switch 2.
3. If current address for switch 2 is not equal ((end address for switch 2) +1) then:
l. Transmit FEH and current address for switch 2 to host if flag is enabled.
m. Set update flag for switch 2.
4. If current address for switch 2 is equal ((end address for switch 2) +1) then:
n. Read the attributes for end address location for switch 2.
o. If end location action address for switch 2 is equal zero then put current address for switch 2 =
start address for switch 2 and set update flag for switch 2.
p. If end location action address for switch 2 is not equal zero then:
i. Start address for switch 2 = end address action address for switch 2.
ii. Current address for switch 2 = end address action address for switch 2.
iii. Get the attributes and put the values for switch 2 action address for switch 1, switch 2
action address for switch 2, end address for switch 2 and timers for switch 2.
iv. Set update flag for switch 2.
q. If end location action address for switch 1 is equal zero then take no action.
r. If end location action address for switch 1 is not equal zero then:
i. Start address for switch 1 = end location action address for switch 1.
ii. Current address for switch 1 = end location action address for switch 1.
iii. Get the attributes and put the values for switch 1 action address for switch 1, switch 1
action address for switch 2, end address for switch 1 and timers for switch 1.
iv. Set update flag for switch 1.
Step 6E: If the switch 1 is released: Transmit B1H to host if flag is enabled.
Step 6F: If the switch 2 is released: Transmit B2H to host if flag is enabled.
Step 6G:
1.
2.
3.
If update flag for switch 1 is set then:
Clear the switch 1 update flag.
Transmit FDH and current address for switch 1 to host if flag is enabled.
Send the picture from microSD to OLED module 1 according to current address for switch 1.
Step 6H: If update flag for switch 2 is set then:
1. Clear the switch 2 update flag.
2. Transmit FEH and current address for switch 2 to host if flag is enabled.
Send the picture from microSD to OLED module 2 according to current address for switch 2.
Step 6I: Checks the host communication buffer for data. If there is data, process them. (For detail see
Communication Protocol)
Step 6J: Go to step 6A.
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 10 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
5. Communication Protocol
The controller communicates with the host by serial communication via RS232 (57.6K, 1 start bit, 8 bit, 1
stop bit). The controller receives the data via an interrupt routine that places the data on the circular receive
buffer. If there is a communication problem between microcontroller and the microSD flash, the controller
will transmit 6FH to host for each communication failure. When the controller detects data in the circular
receive buffer, at Step 6I, it reads one byte and executes the following:
A. If the byte is a command, the controller transmits a 61H and executes the subroutine for the command
and upon completion of command the controller transmits 79H. All of the commands are explained in
detail in this section.
B. If the byte is not a command, it is ignored.
When the controller executes a subroutine and expects additional information:
A. A timer is set. If the expected data byte is not received in 64ms, the controller transmits 6CH 6EH and
terminates the routine.
B. If the byte value is not acceptable (invalid range, option, etc.), the controller transmits 6EH and
terminates the routine.
Commands are one byte in the range of 20H to 2FH and 01H and are transmitted in hex format. The proper
format for all command options and data is specified for each command.
Commands to the controller
Command to reboot the controller
The command reboots the controller to power-up state.
command format:
transmit format:
24H
(xxH)
Command to check communication
The command is used to check if the controller is on-line.
command format:
transmit format:
01H
(xxH)
The controller transmits back 61H to the host.
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 11 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
Command to download setup data
The command downloads an attribute block to the EEPROM location.
command format:
transmit format:
2AH
(xxH)
[00H]
(xxAH)
[00H]
(xxAH)
[55H]
(xxAH)
[flag]
(xxAH)
[address1]
(xxAH)
[address2 ]
(xxAH)
[reserved]
(xxAH)
[flag] is one byte sent in ASCII HEX format. (Detail below)
[address 1] is two bytes with value of 0001H to FFFFH sent in ASCII HEX format. This is the address for the
image that switch 1 displays upon power up/reboot.
[address 2] is two bytes with value of 0001H to FFFFH sent in ASCII HEX format. This is the address for the
image that switch 2 displays upon power up/reboot.
[reserved] is two bytes sent in ASCII HEX format. This is for future use. Customer could use the last byte for
storing the data version.
This set up data can be read using the attribute upload command.
The controller disables the timers and switch execution upon receiving this command. However, the switches
are still scanned and reported. They are enabled upon reboot/power up or by command from host.
Flag Byte
Default value=80H
Bit Enable
Value
B0
0
Buzzer
B1
0
61H flag
B2
0
79H flag
Flag
B3
B4
0
0
Switch release report flag
6EH flag
B5
B6
B7
0
0
0
Timers expire report flag
Switch press report flag
Address change report flag
Controller action when flag is set
Beeper sound for switch press
61H is transmitted in response to command.
79H is transmitted upon completion of
command.
Switch release are reported
6CH/6EH is transmitted if there is any error
during communication to host.
Timers expiration are reported
Switch presses are reported
Newest address is reported for each switch
Example: 2A30303030 3535 3830 30303031 30303146 30303030 sets all the flags on, points left switch to
address 0001H and right switch to address 001FH. The flag takes affect when the controller is reset.
Command to download an image
This command downloads an image from the host to the EEPROM location.
command format: 28H [address] [image]
transmit format: (xxH) (xxAH) (xxAH)
[address] is two bytes with value of 0001H to FFFFH sent as ASCII HEX format.
[image] is 6144 bytes transmit in ASCII HEX format.
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 12 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
The controller disables the timers and switch execution upon receiving this command. However, the switches
are still scanned and reported. They are enabled upon reboot/power up or by command from host.
Command to upload an image
This command uploads an image from the microSD location to the host.
command format: 29H [address]
transmit format: (xxH) (xxAH)
[address] is two bytes with value of 0001H to FFFFH sent as ASCII HEX format.
The controller transmits back the image (6144 bytes) in HEX format.
The controller disables the timers and switch execution upon receiving this command. However, the switches
are still scanned and reported. They are enabled upon reboot/power up or by command from host.
Command to download attribute block
This command downloads an attribute block from the host to the EEPROM location.
command format: 2AH [address] [attribute block]
transmit format: (xxH) (xxAH)
(xxAH)
[address] is two bytes with value of 0001H to FFFFH sent as ASCII HEX format.
[attribute block] is eight bytes transmit in ASCII HEX format.
The address and attribute block are saved at this address. When the controller reads the attribute block it
compares the requested address to the saved address and if they do not match controller knows that the
attribute block is not programmed and ignores it.
The controller disables the timers and switch execution upon receiving this command. However, the switches
are still scanned and reported. They are enabled upon reboot/power up or by command from host.
Command to upload an attribute block
This command uploads an attribute block from the EEPROM location to the host.
command format: 2BH [address]
transmit format: (xxH) (xxAH)
[address] is two bytes with value of 0001H to FFFFH sent as ASCII HEX format.
The controller transmits back the saved address and [Attribute block] in hex format.
The controller disables the timers and switch execution upon receiving this command. However, the switches
are still scanned and reported. They are enabled upon reboot/power up or by command from host.
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 13 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
Command to display image on left switch at the requested address
This command displays an image on left switch at the requested address.
command format: 2EH 31H [address]
transmit format: (xxH) (xxH) (xxAH)
[address] is two bytes with value of 0001H to FFFFH sent as ASCII HEX format.
Example: 2E 31 30303445 displays the image stored at address 004EH.
Command to display image on right switch at the requested address
This command displays an image on left switch at the requested address.
command format: 2EH 32H [address]
transmit format: (xxH) (xxH) (xxAH)
[address] is two bytes with value of 0001H to FFFFH sent as ASCII HEX format.
Example: 2E 32 30313034 displays the image stored at address 0104H.
Command to increment address on left switch
This command displays an image on left switch at the address+1.
command format: 2EH 33H
transmit format: (xxH) (xxH)
Example: Start at address 00A1H. Send 2E 33 and the left switch displays the image stored at address 00A2H.
Send 2E 33 again and the left switch displays the image stored at address 00A3H.
Command to increment address on right switch
This command displays an image on right switch at the address+1.
command format: 2EH 34H
transmit format: (xxH) (xxH)
Example: Start at address 0F09H. Send 2E 34 and the right switch displays the image stored at address
0F0AH. Send 2E 34 again and the right switch displays the image stored at address 0F0BH.
Command to decrement address on left switch
This command displays an image on left switch at the address-1.
command format: 2EH 35H
transmit format: (xxH) (xxH)
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 14 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
Example: Start at address 1004H. Send 2E 35 and the left switch displays the image stored at address 1003H.
Send 2E 35 again and the left switch displays the image stored at address 1002H.
Command to decrement address on right switch
This command displays an image on right switch at the address-1.
command format: 2EH 36H
transmit format: (xxH) (xxH)
Example: Start at address 2345H. Send 2E 36 and the right switch displays the image stored at address
2344H. Send 2E 36 again and the right switch displays the image stored at address 2343H.
Command to query controller for mode, controller, and firmware version
This command queries the controller for the mode as set by the Mode Select Switch, the controller
name, and the firmware version installed.
command format: 26H 52H 58H
transmit format: (xxH) (xxH) (xxH)
Example: The command is sent. The controller responds with the following:
61
61H
34
[mode]
43 4C 30 31
[Controller name]
12
[version]
79
79H
[mode] one byte. 33H indicating OLED module mode or 34H indicating OLED display mode.
[Controller name] 4 bytes. 43H 4CH 30H 31H (CL01)
[version] one byte. 12H (version 1.2)
Command to query controller for firmware version
This command queries the controller for the firmware version installed.
command format: 26H 15H
transmit format: (xxH) (xxH)
Example: The command is sent. The controller responds with the following:
61
61H
12
[version]
[version] one byte. 12H (version 1.2)
Note: version 1.2 does not send 79H. It will be corrected in the next version.
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 15 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
Command for temporarily setting the timers
This command sets both the left and right switch timers.
command format: 26H 51H 55H [left timer] [right timer]
transmit format: (xxH) (xxH) (xxH)
(xxH)
(xxH)
[left timer] timer for left switch. Two bytes send in HEX format.
[right timer] timer for right switch. Two bytes send in HEX format.
The command sets the timers with the given values and activates them. If either switch is pressed or the timers
expire the values are lost. These values are over written by the values stored on the microSD flash in the
current address.
This command is useful for determining the best values for animations or movies.
Command to disable the timers and switch execution
This command disables the timers and switch execution.
command format: 26H 51H 5AH
transmit format: (xxH) (xxH) (xxH)
The controller disables the timers and switch execution upon receiving this command. However, the switches
are still scanned and reported. They are enabled upon reboot/power up or by command from host.
Command to enable the timers and switch execution
This command enables the timers and switch execution.
command format: 26H 51H 65H
transmit format: (xxH) (xxH) (xxH)
The controller enables the timers and switch execution upon receiving this command.
Command to turn the switch display off
This command turns off the OLED module display.
command format: 26H 51H 69H
transmit format: (xxH) (xxH) (xxH)
Command to turn the switch display on
This command turns on the OLED module display.
command format: 26H 51H 66H
transmit format: (xxH) (xxH) (xxH)
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 16 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
Command to dim switch display
This command dims the OLED module display.
command format: 26H 51H 71H
transmit format: (xxH) (xxH) (xxH)
Command to turn the OLED voltage off
This command turns off the 16V supply to the OLED module.
command format: 26H 51H 74H
transmit format: (xxH) (xxH) (xxH)
Command to turn the OLED voltage on
This command turns on the 16V supply to the OLED module.
command format: 26H 51H 75H
transmit format: (xxH) (xxH) (xxH)
Note: This command should only be used when the OLED displays are in the off mode.
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 17 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
Commands to download information directly to OLED modules
Note: Care must be taken using these commands. The OLED modules could get damaged if they are
initialized with a value exceeding the specifications. Please check the OLED modules data sheet and
application notes before using commands.
Command to download data directly to OLED modules
This command downloads data directly from the host to the OLED module.
command format: 2FH 53H [number] [data]
transmit format: (xxH) (xxH) (xxAH) (xxAH)
[number] is one byte sent in ASCII HEX format (01H to 80H). This is the number of data bytes (1 to 128
bytes).
[data] is 1 to 128 bytes sent in ASCII HEX format.
The controller sends the [data] to both OLED modules as data.
Command to download a command directly to OLED modules
This command downloads a command from the host to the OLED module.
command format: 2FH 47H [number] [data]
transmit format: (xxH) (xxH) (xxAH) (xxAH)
[number] is one byte sent in ASCII HEX format (01H to 80H). This is the number of data bytes (1 to 128
bytes).
[data] is 1 to 128 bytes sent in ASCII HEX format.
The controller sends the [data] to both OLED modules as a command.
Command to download a command directly to OLED modules (special)
This command turns off the OLED module, downloads a command from the host to the OLED module,
and turns it back on.
command format: 2FH 49H [number] [data]
transmit format: (xxH) (xxH) (xxAH) (xxAH)
[number] is one byte sent in ASCII HEX format (01H to 80H). This is the number of data bytes (1 to 128
bytes).
[data] is 1 to 128 bytes sent in ASCII HEX format.
The controller turns off the OLED display switches, sends the [data] to both switches as a command and then
turns on the OLED display switches.
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 18 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
6. Hardware
Controls Overview
The Mode Select Switch has two settings; “Switch” is for the OLED (64x48) switches and “Display” is for the
OLED (52x36) displays.
The Connector is for the installation of the Logic Boards onto the controller. One pin is keyed to reduce miss
mates.
Note: Improper installation of the Logic Boards could damage either/both the Logic Board and
controller.
The Batt/PWR switch has three positions: battery, off, line power.
Buzzer Volume adjusts the volume of the buzzer that activates when a button is pushed.
The 9V DC Power jack mates with a 2.5mm cylinder power connector. Center positive.
The RS232 Connector links the controller to the host.
1
RS232
2
GND
3
TX
4
RX
5
GND
6
Note: To turn off the controller, press both switches at the same time until the switches are off then
turn off the Batt/PWR switch. This step must be followed to comply with OLED power off
requirement.
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 19 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
Controller Schematic
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 20 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
Two OLED SmartSwitch logic board
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 21 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
Two OLED SmartDisplay logic board
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 22 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
Container size
Board photo
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 23 of 24
0110
CL01 Intelligent Controller Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
7. Key Terms & Definitions
OLED module
NKK Switches’ OLED SmartSwitches and SmartDisplays.
Host
Any computer, terminal, or other device that can communicate over the
RS232 line.
Controller
A PCB assembly that controls one or more logic boards and the switches
associated with them. It communicates with a host over the RS232 line.
Logic Board
A PCB assembly with “glue logic” for mounting switches. It is controlled by a
controller.
Byte
An eight bit hex value ranging from 00H to FFH (Decimal 0 to 255). The bit
format of a byte is: (B7 B6 B5 B4 B3 B2 B1 B0) where B7 is most significant
and bit B0 is least significant bit.
Nibble/Hex digit
A four bit value ranging from 0H to FH. A byte consists of two nibbles.
ASCII
A byte value representing a symbol.
Communication
Format
There are two formats to transmit a byte:
1. Hex format - A hex byte is transmitted without any change to it. [xxH] will
be used to denote this.
All commands and some data are sent by using this format.
2. ASCII HEX format - Each nibble of the byte is converted to ASCII code
and sent as a byte. [xxAH] will be used to denote this.
For example, the hex byte 5AH is transmitted in two bytes, 35H and 41H.
The ASCII value for 5 is 35H and the ASCII value for A is 41H.
All addresses and most data are sent using this format.
Address
A two byte value ranging from 0001H to FFFFH representing the 65536
memory locations for pictures and attributes on microSD flash.
8. Firmware issues
The problems found in the most current version are listed below and get resolved in the following version.
Version V1.4
No firmware issues at this time.
CL01 Intelligent Controller Users Manual B.doc
Toll Free 1.877.2BUYNKK (877.228.9655) • Phone 480.991.0942 • Fax 480.998.1435
www.nkkswitches.com • Email [email protected]
Page 24 of 24
0110