IS-Dev Kit-1 Users Manual

IS-Dev Kit-1 Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
IS-Dev Kit-1 Users Manual
Revision A
IS-Dev Kit-1 Version 1.1
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.
IS-Dev Kit-1 Users Manual A.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 15
0110
IS-Dev Kit-1 Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
TABLE OF CONTENTS
Table of Contents .........................................................................................................2
1. General Features .......................................................................................................3
2. Key Terms & Definitions..........................................................................................4
3. Overview....................................................................................................................7
4. Communication Protocol .........................................................................................9
5. Hardware ...................................................................................................................12
6. Firmware problems ..................................................................................................15
IS-Dev Kit-1 Users Manual A.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 15
0110
IS-Dev Kit-1 Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
1. General Features
The IS-Dev Kit-1 Version 1.1 controls one LCD 36x24 SmartDisplay with a resolution of 36x24 pixels and
two illuminated JB pushbuttons. The controller for the IS-Dev Kit-1 is the IS-S0151.
Below are the current features:
•
•
•
•
•
•
•
Serial communication via RS232
Flash EEPROM for 255 images and attribute locations rated for 100,000 write cycle.
Audio feedback while switch is pressed.
Adjustable backlight brightness.
User defined off duration for blinking backlighting.
User defined on/off ratio for blinking backlighting.
Controller board firmware can be customized based on customer requirements.
Switch-action report from the controller to the host:
•
•
•
•
•
Switch one closure is reported as 81H.
Switch two closure is reported as 82H.
Switch one release is reported as B1H.
Switch two release is reported as B2H.
Timer expire is reported as 83H.
Stand alone operation features:
•
The controller can be programmed one time with images and set-ups. Then the controller can go
through various menus as programmed via switch actions and timer expires.
Real-time operation features:
•
•
•
•
Download what image location data the LCD module should display.
Download characters and controller will create graphic data using 5x7 font for any switch.
Download characters and controller will create graphic data using 7x10 font for any switch.
Change backlight color on LCD display and the JB switches.
IS-Dev Kit-1 Users Manual A.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 15
0110
IS-Dev Kit-1 Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
2. Key Terms & Definitions
LCD Module
NKK Switches SmartSwitch / SmartDisplay
Host
Any computer, terminal, or other device that can communicate over 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 sent by using this format.
2. ASCII 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 pointers, all addresses and most data are sent using this format.
Pointer
One byte. There is a pointer for each LCD Module. The value of a pointer is
a virtual address that refers to the 255 storage locations in the EEPROM (01H
to FFH). Each location has image data LED data, and attribute data. The
controller finds the actual address from this virtual address and uses the data
for the LCD modules.
IS-Dev Kit-1 Users Manual A.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 15
0110
IS-Dev Kit-1 Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
Attribute block
A block of 6 bytes.
Byte
Description
1
Pointer for LCD Module when
switch 1 is pressed.
2
Pointer for LCD Module when
switch 2 is pressed
3
Pointer for LCD Module when
the timer is expired.
4
JB LED code data for switch 1
and 2.
5
Value for TIMER 1
6
Value for TIMER 2
When switch 1 is pressed the attributes are executed as follows:
--- if the value of byte 1 of the attribute is not equal zero , The Legend block and attribute
block from the EEPROM is transferred to internal RAM for switch 1. If the byte 5 of the new
attribute block is equal zero then the timer is turned off. If the value of byte 5 is not equal zero
then the value of byte 5 is put in TIMER 1 and value of byte six is put in TIMER 2 and timer is
turned on.
When the switch #2 is pressed the attributes are executed as follows:
--- if the value of byte 2 of the attribute is not equal zero , The Legend block and attribute
block from the EEPROM is transferred to internal RAM for switch 1. If the byte 5 of the new
attribute block is equal zero then the timer is turned off. If the value of byte 5 is not equal zero
then the value of byte 5 is put in TIMER 1 and value of byte six is put in TIMER 2 and timer is
turned on.
When the timer is expired the attributes are executed as follows:
--- if the value of byte 3 of the attribute is not equal zero , The Legend block and attribute
block from the EEPROM is transferred to internal RAM for switch 1. If the byte 5 of the new
attribute block is equal zero then the timer is turned off. If the value of byte 5 is not equal zero
then the value of byte 5 is put in TIMER 1 and value of byte 6 is put in TIMER 2 and timer is
turned on.
The timer value in second = (TIMER 1)x(TIMER 2)x(0.0369)
TIMER 2 = 0 count as 256.
IS-Dev Kit-1 Users Manual A.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 15
0110
IS-Dev Kit-1 Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
Legend Block
A block of 121 bytes. It contains image data and LED codes.
Byte
1-5
6-10
•
•
•
116-120
121
LED Code
Description
First line of image
Second line of image
24th line of image
LED code
A single byte with the following format:
B4, B5, B6, B7 are not used
B3=0 ==> No action
B3=1 ==> Turn the LED #2 off on blink cycle
B2=0 ==> No action
B2=1 ==> Turn the LED #1 off on blink cycle
B1=0 ==> LED #1 backlighting off
B1=1 ==> LED #1 backlighting on
B0=0 ==> LED #2 backlighting off
B0=1 ==> LED #2 backlighting on
NOTE: LED #1 is connected to pin8 of the IS indicator.
LED #2 is connected to pin2 of the IS indicator.
To get the combined color, both LED #1 & LED #2 must be set to On.
JB LED Code
A single byte with the following format:
B4, B5, B6, B7 are not used
B3=0 ==> Turn the LED of switch #2 off during off cycle
B3=1 ==> Turn the LED of switch #2 on during off cycle
B2=0 ==> Turn the LED of switch #1 off during off cycle
B2=1 ==> Turn the LED of switch #1 on during off cycle
B1=0 ==> Turn the LED of switch #2 off during on cycle
B1=1 ==> Turn the LED of switch #2 on during on cycle
IS-Dev Kit-1 Users Manual A.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 15
0110
IS-Dev Kit-1 Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
B0=0 ==> Turn the LED of switch #1 off during on cycle
B0=1 ==> Turn the LED of switch #1 on during on cycle
NOTE: Switch #1 and Switch#2 refer to JB series switches.
3. Overview
The IS-Dev Kit-1 has a flash EEPROM that can hold up to 255 images and attributes. The EEPROM is
rated for 100,000 write cycle.
These images and Attributes can be downloaded to the IS-Dev Kit-1 via RS232 communication.
The IS-Dev Kit-1 has internal RAM to hold the data for an image and attributes. These data are used to
refresh the LCD display and backlighting.
Upon switch presses, timer expire or command from host the data can be read from any location of
EEPROM to internal RAM.
Host also can change the data on the internal RAM directly.
The switch activity and timer expires are reported via RS232.
Power-Up (Steps 1,2,3)
Upon power-up or reset, controller performs the following steps:
Step 1: Check if the RAM has been programmed. Compare the check string to EEPROM string.
A. If the strings are not the same, the EEPRM is virgin and its data is not acceptable. Step 2 will be
executed. (first time)
B. If the strings are the same, the data from RAM is acceptable. Step 2 is omitted and Step 3 is
executed.
Step 2: Write all the default initialize values to EEPROM as follows:
A.
Put “D ULED” as the Image for location one.
B.
Put "Blank Font Memory" as the picture for location 2.
C.
Put LED backlighting code on for location 1, 2.
D.
Put “00H 00H 02H 0FH 10H 10H” as attribute for location #1.
E.
Put “00H 00H 00H 00H 00H 00H” as attribute for location #2.
F.
Write the virgin check string.
Step 3
A.
B.
Initialize and load the data from location 1 of EEPROM to internal RAM.
Initialize UART.
IS-Dev Kit-1 Users Manual A.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 15
0110
IS-Dev Kit-1 Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
Operation
Step 4:
A. If the switch one is pressed: Transmit 81H to host, if the data is from location 1 then adjust down
the backlight brightness else execute the attribute.
B. If the switch two is pressed: Transmit 82H to host, if the data is from location 2 then adjust up the
backlight brightness else execute the attribute.
C. If the timer is expired: Transmit 83H to host and execute the timer attribute.
D. If the switch one is released: Transmit B1H to host.
E. If the switch one is released: Transmit B2H to host.
F. Checks the host communication buffer for data. If there is data, process them.
G. Go to step 4, section A.
IS-Dev Kit-1 Users Manual A.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 15
0110
IS-Dev Kit-1 Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
4. Communication Protocol
The controller communicates with the host serially. The Controller receives the data via an interrupt routine
that places the data on the circular receive buffer.
When the Controller detects data in the circular receive buffer (Step 4 section F), it reads one byte and
executes the following:
A. If the byte is a command, the controller transmits a 61H and it 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 ignores the byte.
When the controller executes a subroutine and expects additional information:
A. A timer is set. If the expected data byte is not received in 50 ms, the controller transmits 6EH,
terminates the routine.
B. If the byte value is not acceptable (invalid range, option, etc.), the controller transmits 6EH, 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.
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.
Command to download a Legend block
This command downloads a Legend Block from the host to the EEPROM location.
command format: 28H [Address] [Legend Block]
transmit format: (xxH) (xxAH)
(xxAH)
IS-Dev Kit-1 Users Manual A.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 15
0110
IS-Dev Kit-1 Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
[Address] is one byte with value of 01H to FFH and must be sent in ASCII HEX format.
[Legend Block] is 125 bytes and must be sent in ASCII HEX format.
The LCD/LED code is not transferred to LCD/LED code refresh block.
Command to download Attribute data to a specified Address
This command downloads the Attribute data to a specified Address.
command format: 2AH [Address] [Attribute block]
transmit format: (xxH) (xxAH)
(xxAH)
[Address] is one byte with value of 01H to FFH and must be sent in ASCII HEX format.
[Attribute block] is 16 bytes of Addresses and must be sent in ASCII HEX format.
Command to Download Pointers
command format: 2DH [00H] [Pointer]
transmit format: (xxH) (xxH) (xxAH)
Upon receiving this command, the controller transfers the data from EEPROM to internal RAM according to
the pointer. If the pointer value is zero, no transfer takes place.
Command to Download LED codes
command format: 2CH [00H] [LED code] [JB LED code]
transmit format: (xxH) (xxH)
(xxAH)
(xxAH)
Upon receiving this command, The LED backlights will be according to the LED codes.
Command to Download ASCII string (7x10 fonts)
command format: 22H [06H] [code] [ASCII string]
transmit format: (xxH) (xxH) (xxAH)
(xxH)
[30H]
(xxH)
[code] is a byte with B0 to B3 of LED code as lower nibble and B0 to B3 of JB LED code as higher
nibble.
[ASCII string] is 8 characters. The controller will make two lines of 4 characters using the 7x10 fonts.
Command to Download ASCII string (5x7 fonts)
command format: 22H [07H] [code] [ASCII string]
transmit format: (xxH) (xxH) (xxAH)
(xxH)
[30H]
(xxH)
[code] is a byte with B0 to B3 of LED code as lower nibble and B0 to B3 of JB LED code as higher nibble.
IS-Dev Kit-1 Users Manual A.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 15
0110
IS-Dev Kit-1 Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
[ASCII string] is 18 characters. The controller will make three lines of 6 characters using the 5x7 fonts.
Command to write the data version
command format: 22H [04H] [data version]
transmit format: (xxH) (xxH)
(xxAH)
[data version] is a byte. It is for the user to indicate the version of the data in EEPROM.
Command to read the data version
command format: 22H [05H]
transmit format: (xxH) (xxH)
Upon receiving this command, the controller transmits the data version in XXH format to host.
Command to transfer the RAM Legend block data to EEPROM.
command format: 22H [02H] [pointer]
transmit format: (xxH) (xxH) (xxAH)
Upon receiving this command, the controller transfers the data for Legend block being displayed on LCD
display to the EEPROM location as indicated by pointer.
Command to Download SET UP values
command format: 22H [01H] [85H] [SET UPS]
transmit format: (xxH) (xxH) (xxH) (xxAH)
[SET UPS] are 4 bytes as follow:
Byte 1 is flags format is below. (default 0BH)
Byte 2 is Brightness level value must be between 00H to 07H. (default 07H)
Byte 3 is off duration for backlight blinking. (default 60H)
Byte 4 is the ratio of ON/OFF in backlight blinking. (default 03H)
IS-Dev Kit-1 Users Manual A.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 15
0110
IS-Dev Kit-1 Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
Flags
Bit
Enable
Value
B0
1
B1
1
B2
1
Beeper
Attribute switch
Pointer
B3
B4
B5
B6
B7
Attribute Timer
Reserved
Reserved
Reserved
Reserved
1
Flag
Controller action when flag is set
Controller beep when any switch is presses.
Execute the attribute upon switch press
Transmit the location pointer upon switch or timer
activity
Execute the attribute upon timer expire
5. Hardware
•
•
•
•
•
•
•
•
Controls 1 NKK SmartDisplay and two JB switches.
The LCD indicator and JB switches are mounted on the back of the controller board.
The LCD indicator is centered on the controller board.
The JB switch #1 is on the left side of the indicator. (center to center distance of .7”)
The JB switch #2 is on the right side of the indicator. (center to center distance of .7”)
Serial communication via RS232.
EE-PROM for 255 image locations.
5 Analog/digital plus 2 digital auxiliary ports.
Dimension: Board size: 3.04” x 1.18” (WxH)
Power Requirement: 9V (can run on 12 volts) Max 150mA
Mounting holes: Four
Hole size: 0.125”
Distance from edge of the board: 0.150
Distance from top/bottom of the board: 0.100
IS-Dev Kit-1 Users Manual A.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 15
0110
IS-Dev Kit-1 Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
Connectors: Four
J3 Auxiliary Port:
10x1 header .1”x.1” spacing.
Pin
1
3
5
7
9
Function
GND
AN3
AN1
RB7
RB6
Pin
2
4
6
8
10
Function
AN4
AN2
AN0
GND
GND
This port has 7 lines of Input/output. No firmware has been written for this port. Five of these lines can be
analog. These lines are connected to the micro controller port pins.
We will add firmware upon request.
J1A
J1
Power connector: Power Jack 2.5 mm male. Center positive.
Alternative power connector: 2 pin header .1” spacing. Pin1 GND, pin2 +9V
J2
Communication: RJ11
1
RS232
2
GND
3
TX
4
RX
5
GND
6
Adjustment:
POT1: LCD viewing angle/contrast adjustment.
POT2: Beeper volume adjustment.
Switches:
This controller has 1 socket for the display. The JB switches are soldered.
IS-Dev Kit-1 Users Manual A.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 15
0110
IS-Dev Kit-1 Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
IS-S0151 Controller Schematic
IS-Dev Kit-1 Users Manual A.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 15
0110
IS-Dev Kit-1 Users Manual
7850 East Gelding Drive • Scottsdale, AZ 85260-3420
6. Firmware Problems
This section lists the problems with each version of the firmware which must be resolved on the next version.
Version 1.0
• The LED code for the second switch in commands ASCII string download does not work properly.
Version 1.1
• No firmware issues at this time.
IS-Dev Kit-1 Users Manual A.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 15
0110