nkk SWITCHES IS-Dev Kit-2 Switches User Manual

June 5, 2024
nkk SWITCHES

nkk SWITCHES IS-Dev Kit-2 Switches

General Features

The IS-Dev Kit-2 Version 1.1 controls two LCD 36×24 SmartSwitches with a resolution of 36×24 pixels. The controller for the IS-Dev Kit-2 is the IS-S0203.
Below are 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.
  • 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 each LCD module should display.
  •  Download characters and controller will create graphic data using 5×7 font for any switch.
  •  Download characters and controller will create graphic data using 7×10 font for any switch.
  • Change the backlight color on any LCD module.

Key Terms & Definitions

  • LCD Module Host  NKK Switches SmartSwitch / SmartDisplayAny computer, terminal, or another 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 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.
  • Attribute block A block of 6 bytes.
Byte Description
1 Pointer for LCD Module #1 when

switch is pressed.

2| Pointer for LCD Module #2

when switch is pressed

3| Pointer for LCD Module #1 when

the timer is expired.

4| Pointer for LCD Module #2 when

the timer is expired.

5| Value for TIMER 1
6| Value for TIMER 2

When a switch 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.
  •  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 2.

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.
  •  if the value of byte 4 of the attribute is not equal zero , The Legend block and attribute block from the EEPROM is transferred to internal RAM for switch 2.

The timer value in second = (TIMER 1)x(TIMER 2)x(0.0369) TIMER 2 = 0 count as 256.

Legend Block A block of 121 bytes. It contains image data and LED codes.

Byte Description
1-5 First line of image
6-10 Second line of image
116-120 24th line of image
121 LED code

A single byte with the following format:B4, B5, B6, B7 are not used

NOTE:
LED #1 is connected to pin3 of the Smart switch. LED #2 is connected to pin13 of the Smart switch. To get the combined color, both LED #1 & LED #2 must be set to On.

Overview

The IS-Dev Kit-1 has a flash EEPROM that can hold up to 255 images and attributes. The EEPROM is rated for a 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 two images and attributes. These data are used to refresh the LCD displays and backlighting. Upon switch presses, timer expired or command from host the data can be read from any location of EEPROM to internal RAM. The 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, the controller performs the following steps:

Step 1:
Check if the RAM has been programmed. Compare the check string to the EEPROM string.

  •  If the strings are not the same, the EEPRM is virgin and its data is not acceptable. Step 2 will be executed. (first time)
  •  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:

  • Put “LED DOWN” as the image for location one.
  • Put “LED UP” as the image for location two.
  •  Put “Blank Font Memory” as the image for location three.
  •  Put LED #1 backlighting on for location 1, 2 and 3.
  •  Put “00H 00H 03H 03H 10H 10H” as attribute for location #1.
  • Put “00H 00H 00H 00H 00H 00H” as attribute for location #2 and #3.
  • Write the virgin check string.

Step 3

  •  Initialize and load the data from location 1 and 2 of EEPROM to internal RAM for switch #1 and #2 respectfully.
  • initialize UART.

Step 4

  •  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. Put LED#1 on for switch 1.
  • If 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. Put LED#1 on for switch 2.
  •  If the timer is expired: Transmit 83H to host and execute the timer attribute.
  •  If the switch one is released: Transmit B1H to host. Put LED color according to data on switch one.
  •  If the switch one is released: Transmit B2H to host. Put LED color according to data on switch two.
  • Checks the host communication buffer for data. If there is data, process them.
  •  Go to step 4 section A

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:

  • 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.
  • If the byte is not a command, it ignores the byte.

When the controller executes a subroutine and expects additional information:

  • A timer is set. If the expected data byte is not received in 50 ms, the controller transmits 6EH, and terminates the routine.
  • 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. Command to reboot the controller The command reboots the controller to a power-up state.

  • command format:24H
  • transmit format:  (xxH)

Command to check communication The command is used to check if the controller is online

  • command format: 01H
  • transmit format:(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)

[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

  • 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 for switch 1] [Pointer for switch 2]
  • transmit format: (xxH) (xxH) (xxAH) (xxAH)

Upon receiving this command, the controller transfers the data from EEPROM to internal RAM according to the pointers. If the pointer value is zero, no transfer takes place.
Command to Download LED codes

  • command format: 2CH [00H] [LED for switch 1] [LEDfor switch 2]
  • 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 (7×10 fonts) [code] is a LED code with B4=0 indicate data is for switch #1 or B4=1 indicate data is for switch #2. [ASCII string] is 8 characters. The controller will make two lines of 4 characters using the 7×10 fonts.

Command to Download ASCII string (5×7 fonts)
[code] is a LED code with B4=0 indicate data is for switch #1 or B4=1 indicate data is for switch #2. [ASCII string] is 18 characters. The controller will make three lines of 6 characters using the 5×7 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 read the FIRMWARE version

  • command format: 22H [15H]
  • transmit format: (xxH) (xxH)

Upon receiving this command, the controller transmits the FIRMWARE version in XXH format to host.

  • 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 switch #1 to the EEPROM location as indicated by pointer.

Command to transfer the RAM Legend block data for switch #2 to EEPROM

  • command format: 22H [03H] [pointer]
  • transmit format: (xxH) (xxH) (xxAH)

Upon receiving this command, the controller transfers the data for Legend block being displayed on switch #2 to the EEPROM location as indicated by pointer.

Hardware

  • Controls 2 NKK SmartSwitches.
  •  The left switch is #1 and the right switch is #2.
  •  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

J3 Auxiliary Port: 10×1 header .1”x.1” spacing

Pin Function Pin Function
1 GND 2 AN4
3 AN3 4 AN2
5 AN1 6 AN0
7 RB7 8 GND
9 RB6 10 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 microcontroller port pins.
We will add firmware upon request. Power connector: Power Jack 2.5 mm male. Center positive.
Alternative power connector: 2 pin header .1” spacing. Pin1 GND, pin2 +9V

Communication: RJ11

  1 2 3 4 5 6
RS232   GND TX RX GND

Adjustment:

  • POT1: LCD viewing angle/contrast adjustment.
  • POT2: Beeper volume adjustment.

Switches:

  • This controller has 2 sockets for the switches.

IS-Dev Kit-2 Users Manual

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.

References

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

nkk SWITCHES User Manuals

Related Manuals