0% found this document useful (0 votes)
7 views30 pages

Starpoint Sec - Technical-Info

The document outlines the Standard Operating Procedure (SOP-0200-03-N-DEV) for the Starpoint Electronic Counter (SEC), detailing its hardware and software specifications, operational conditions, and communication protocols. It emphasizes the importance of using the most current version of the document and includes disclaimers regarding the accuracy and confidentiality of the information provided. The SEC is designed for the gaming and amusement industry, featuring up to 31 counters and a custom LCD display, with specific guidelines for temperature, humidity, handling, and warranty conditions.

Uploaded by

johnnyfoster100
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views30 pages

Starpoint Sec - Technical-Info

The document outlines the Standard Operating Procedure (SOP-0200-03-N-DEV) for the Starpoint Electronic Counter (SEC), detailing its hardware and software specifications, operational conditions, and communication protocols. It emphasizes the importance of using the most current version of the document and includes disclaimers regarding the accuracy and confidentiality of the information provided. The SEC is designed for the gaming and amusement industry, featuring up to 31 counters and a custom LCD display, with specific guidelines for temperature, humidity, handling, and warranty conditions.

Uploaded by

johnnyfoster100
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

STANDARD

OPERATING PROCEDURE

Ref: SOP-0200-03-N-DEV

SEC
Description:
Starpoint Technical Information

THIS IS AN UNCONTROLLED DOCUMENT


AND IS SUPPLIED FOR INFORMATION ONLY

IT IS THE USERS RESPONSIBILITY TO ENSURE THAT


THE MOST UP TO DATE DOCUMENT IS BEING USED
BY CONTACTING STARPOINT ELECTRICS LTD

[email protected]

Tel: +44 (0)208 391 7700 or Fax: +44 (0)208 391 7760

Page 1 of 30 SOP-0200-03-N-DEV STI0002


Starpoint Electronic Counter

Page 2 of 30 SOP-0200-03-N-DEV STI0002


Starpoint Electrics Ltd.
Website: - www.starpoint.uk.com

Contact: - [email protected]

Telephone: - +44 (0) 20 8391 7700

Fax: - +44 (0) 20 8391 7760

DISCLAIMER

1. Starpoint Electrics Limited ("Starpoint") has taken all reasonable care in preparing this technical
information pack ("Information Pack") and has used all reasonable efforts to ensure the accuracy of the
information contained in the Information Pack. However, the information contained in this Information
Pack may be subject to change from time to time, and Starpoint shall have no liability whatsoever to any
person arising out of or in connection with reliance on any information contained in this Information
Pack.

2. Starpoint reserves the right at any time to amend or update the information contained in the Information
Pack, or to withdraw the Information Pack in its entirety and/or to withdraw and/or replace the products
referred to in the Information Pack, and Starpoint shall not be obliged to notify any person of any such
changes. Before taking or implementing any action based on the information contained in the
Information Pack, you must contact Starpoint at the address given above in order to ensure that the
Information Pack is up-to-date.

3. The Information Pack contains confidential information of Starpoint, and you must not disclose the
Information Pack (in whole or in part) to any person, without our prior written consent.

4. The products may vary slightly from their description in the Information Pack, and Starpoint accepts no
liability for such variances.

Page 3 of 30 SOP-0200-03-N-DEV STI0002


Contents
CONTENTS
Introduction

Conditions of Use
1. Temperature Range
2. Humidity
3. Operational Life
4. Handling
5. Warranty

Hardware Overview
1. Construction
2. Communications Interface
3. Interface Connector
4. LCD Display
5. Reset Line
6. Data Storage
7. Hardware Specification

Software Overview
1. Host Interface Operation
2. Command Format from Host
3. Command Response from SEC
4. LCD Display Interface
5. Software Watchdog Facility

Functionality
1. Power Up Sequence (SEC)
2. Power Up Sequence (Host)
3. Commands
a. <20> Request Status
b. <21> Request Market Type
c. <22> Request Last Error
d. <23> Request Version
e. <24> Reset Counter Value
f. <25> Request Last Command ID
g. <26> Request Fingerprint
h. <30> Set Number of Counters
i. <31> Set Market Type
j. <32> Set Counter Type
k. <40> Show Text
l. <41> Show Counter Value
m. <42> Show Counter Text
n. <43> Show Bit Pattern
o. <50> Counter Increment (Small)
p. <51> Counter Increment (Medium)
q. <52> Counter Increment (Large)
r. <54> Cycle Counter Display
s. <55> Stop Cycle
t. <5C> Self Test

Page 4 of 30 SOP-0200-03-N-DEV STI0002


Contents continued
4. SEC Response Codes
a. <60> Data Header
b. <61> Self Test
c. <62> NAK
5. Error Codes
a. 00 No Error
b. 01 Transmission Checksum Corrupt
c. 02 SEC Busy
d. 03 Invalid Data in Message
e. 04 Invalid Command
f. 05 EEprom Read/Write Error
g. 06 Fingerprint Requested When Not Set
h. 07 Firmware Checksum Failure
i. EEprom Bus Failure
j. 09 Receive Buffer Overflow
k. 80 Single EEprom Checksum Fail
l. 81 Double EEprom Checksum Fail
m. 82 Comm’s Time Out
6. Portability

Security
1. Communications
2. Fingerprint

Appendix 1 Example of Message Strings between Host & SEC


Appendix 2 Interface Connector Pin Out
Appendix 3 LCD Display Map
Appendix 4 Interface Timing Diagram

Drawing G6D008-01-ZZZZ Mounting Details

Page 5 of 30 SOP-0200-03-N-DEV STI0002


Introduction
Introduction
Designed for the Gaming & Amusement Industry, this document describes the
operation of the Starpoint Electronic Counter (SEC). It details the general hardware
configuration, the methods of operation and the software communication protocols
required to use the unit.

The SEC is based around the Toshiba TMP87P808M 8 bit controller. The device
has 4 Kbytes of Program ROM and 256 bytes of user RAM. The device is connected
to a custom 7-digit LCD display (via a LCD driver device), an 8K bit serial EEprom
and a serial link.

The SEC has available up to 31 counters (indexed as counter 0 to counter 30, (0 to


1E Hex) stored in a non-volatile EEprom device. Each counter can store values from
0 to 9,999,999, which can be displayed on a 7 digit, 7-segment LCD display. Each
counter also has 7 text characters associated with it that can be displayed when the
counters are cycled, enabling individual counter readings to be easily located and
logged by the operator.

The text can be changed by the host machine, enabling the counter unit to be
configured for different languages or different counter uses as it is moved from the
host machine to another.

The counters are managed under host control via a clocked serial link. The host can
use as many of the 31 counter as is required, the counter cannot be cleared to zero
or decremented under normal circumstances. The lifetime of the unit is specified as
a minimum of 9,999,999 single increments on any one counter.

During normal operation, the SEC will display the contents of the counter 0 (default)
on the LCD display. The host can also control the LCD display directly, enabling text
and counters to be shown in any user-defined order, or to show text messages from
the host machine.

Page 6 of 30 SOP-0200-03-N-DEV STI0002


CONDITIONSFOR
CONDITIONS OF USE
USE
TemperatureRange
1. Temperature Range

The SEC will operate satisfactorily in the temperature range 5ºC to 50ºC
provided there is an unrestricted airflow around the unit.

Humidity
2. Humidity

The unit will operate in the range of 0% to 95% relative humidity.

Operational
3. Operational Life
Life

The EEprom is guaranteed from Toshiba as having a life in excess of 10 million


read / write cycles. Tests have shown that the life may be as high as 16 million.
Each counter will 'rollover' to 0000000 if incremented beyond 9,999,999. If this
occurs, Bit 1 of the status register is set, this being an indication to the host that
any one of the 31 counters has exceeded 10 million single increments, and the
life of the SEC has expired beyond guaranteed usage. It is possible, using the
counter increment instructions, to increment the counter by more than 1. The
SEC tracks the contents of the counters, not the number of read / write cycles.

Handling
4. Handling

Whilst the SEC is housed within an anti-static plastic moulding, it is not


recommended the unit be exposed to an adverse static environment as damage
may occur to the integrated circuits.

It is not recommended to install or remove the SEC unit whilst the host
machine is powered up, as this may lead to internal damage.

Warranty
5. Wrranty

A guarantee of twelve months from the shipment date is available for the SEC,
subject to Starpoint’s standard terms and conditions. This guarantee is offered
irrespective of the number of operations of the unit during this period but subject
to operation within the environmental conditions specified above. A unit, which
may require return under the guarantee, should be returned direct to Starpoint or
your local distributor.

Page 7 of 30 SOP-0200-03-N-DEV STI0002


HARDWAREOVERVIEW
HARDWARE OVERVIEW

Construction
1. Construction

Drawing G6D008-01-ZZZZ shows the SEC construction and panel mounting


details.

CommunicationsInterface
2. Communications Interface

The clocked serial interface conforms to the Motorola SPI (Serial Peripheral
Interface) standard. The SPI standard details 4 modes of operation, dependant
on the clock polarity and phase, the SEC unit uses SPI mode 2. In this mode,
the clock line (SCLOCK) idle state is HIGH (logic 1). To transmit, data is set up
on the SIN line, the clock is taken low and then it is taken high again. The next
data bit is set up on the SIN line, the clock taken low then high and so the
transmission continues. (The data is clocked in, on falling edge, MSB is
transmitted first). Once transmission is complete and the SEC has executed the
command, the response can be clocked out. First the clock is taken low and
then taken high again. The received data is sampled as the clock edge rises.
This is repeated for all the data bits. Maximum clock speed at 50% duty ratio is
5KHz. Slowest clock speed is 100Hz. See Appendix 2 for timing diagram.

InterfaceConnector
3. Interface Connector

Connection to the SEC is via a six-way Leotronics right-angled connector. The


host connector should be a Molex KK 7720S 22-50-3065 or equivalent. The
signal connections are shown in Table 1.

LCDDisplay
4. LCD Display

The LCD display is a custom device with limited Alpha characters, which is
contained in Table 2.

Reset
5. Reset Line
Line

A reset line is provided that forces a hardware reset of the TMP87P808M device.
The reset should be asserted after power has been applied and unit power is
stable to ensure a good reset, after which it should only be asserted if the
operation of the SEC has become suspect and several retries on the
communications link have failed, or instances of sparking may be suspected.

Operation of the reset line will not affect the counter values but will cause a
clearance of the pending and current communications buffers.

Communication may commence 350mS after Power on Reset, or Hardware


Reset.

Page 8 of 30 SOP-0200-03-N-DEV STI0002


Data
6. Data Storage
Storage

Counter data is stored in the EEprom in the 24 bit binary format followed by an
8-bit checksum, making a total of 4 bytes. This data is then followed by a 2’s
complement copy of the same information and another checksum. Should data
become corrupt, the SEC will use the two checksums to determine which of the
copies is in error. The good copy will then be used to correct the error in the
faulty copy.

Text data is stored as a string of 7 ASCII characters followed by a checksum.


Text strings are checked every time they are displayed on the LCD display.
Should a text string become corrupt, a bit is set in the status byte so the host can
take action and resend the text at the next opportunity. Before any writes to
EEprom are performed, each line of the EEprom interface bus is asserted and
negated and the change of state is verified. Should a change of state not be
seen, the SEC assumes an attempted fraud and will generate an error. Once
the data lines are verified, the SEC performs a write/verify cycle to a known
EEprom location. Only when this cycle is verified will the SEC proceed with
writing a counter value to the EEprom.

Should any read from EEprom fail (due to fraud attempt, checksum failure etc.)
the read is attempted a further 10 times before the SEC assumes the data really
is corrupt. This way, spurious errors during read cycles are reduced. The same
procedure is used during a write cycle - the location is read after the write has
been performed and if the read is incorrect the location is written again until it
reads correctly.

HardwareSpecification
7. Hardware Specification

Maximum Supply Voltage 36v


Minimum Supply Voltage 8.5v
Quiescent Current 21mA

Reset, Data In & Clock Inputs


Maximum Low Level Input 3v
Maximum High Level Input 20v
Inputs are pulled high internally 5v
Inputs can be driven directly via open collector drivers

Data Output
Maximum Output Current 100mA
Maximum Output Voltage 60v

Read/Write Clock Speed


Maximum 5KHz
Minimum 100Hz

Page 9 of 30 SOP-0200-03-N-DEV STI0002


SOFTWARE OVERVIEW

HostInterface
1. Host InterfaceOperation
Operation

Incoming characters from the data-in line are placed in a buffer, and then when
the buffer is full the command is decoded and, if valid, executed. Outgoing
messages are placed in the output buffer and then sent via the data-out line.
Note that full duplex (simultaneous transmit/receive) is not possible and will
result in data loss, so the host should ensure this does not occur. The Host
Interface will clear the input buffers if an incoming transmission are not
completed within 1 second.

CommandFormat
2. Command FormatFrom
FromHost
Host

Commands sent to the SEC consist of a variable length data packet consisting of
data bytes: a command, a message ID, a data count, data (if applicable), and a
checksum.

<CMD> <ID> <DCNT> --- <Data bytes if required>---<CS>


CMD Is a code that defines the type of message being sent.
ID The index number of the message being sent. This
number is generated by the host machine and starts at
00. It is incremented every time a new message is sent,
up to a value of FF after which it rolls over to 00. This ID
is used to determine which lost messages may require
resending by the host.
DCNT The number of data bytes following the DCNT byte. This
value does Not include the checksum.
DATA A sequence of data bytes, depending on the type of
command.
CS The checksum is the lower 8 bits of the sum of all the
preceding bytes in the message, (CMD, ID, DCNT and
any DATA bytes).

Note: ALL BYTES ARE SPECIFIED THROUGHOUT IN HEXADECIMAL.

Page 10 of 30 SOP-0200-03-N-DEV STI0002


CommandResponse
3. Command Responsefrom
fromSEC
SEC

The SEC replies to the Command messages in a similar format except the CMD
byte will be either on ACK (61) or a DATA header (60). Receipt of these
responses signifies the command has been received correctly and the reply has
been sent. If a NAK (62) is received this would indicate some corruption of the
command message, the command and incremented ID should be resent.

Some examples of communication series are shown in Appendix 1.

The response by the SEC with a reply and ID serves to verify to the host the
current valid message the SEC is dealing with. This is particularly useful if the
host has sent a command prior to loss of power. By requesting the ID of the last
command the next time the machine powers up, the host can verify that the last
command has been dealt with correctly by the SEC, If data was requested at the
last command before loss of power and not received the host should resend the
command with a new ID and the SEC will reply.

If the host sends a repeat of a previous ID and the command was correctly
executed, the SEC will acknowledge the message but will NOT execute it.

LCDDisplay
4. LCD DisplayInterface
Interface

ASCII data is coded into 7-segment character and written to the display buffer.
The hardware then continuously displays the contents of the buffer on the LCD
display and requires no further software overhead. The ASCII characters the
SEC can display are shown in Table 2.

SoftwareWatchdog
5. Software WatchdogFacility
Facility

The SEC monitors itself by an on-board watchdog facility, enabling it to detect


software malfunction and deal with them accordingly

Page 11 of 30 SOP-0200-03-N-DEV STI0002


FUNCTIONALITY
FUNCTIONALITY
1. Power
PowerUp
UpSequence
Sequence(SEC)
(SEC)

On the first power up at manufacture the counters are all set to zero and a non-
destructive flag set to prevent a clear on subsequent power ups. All counters in
the EEprom have a sum check associated with them for security.

PowerUp
2. Power UpSequence
Sequence(Host)
(Host)

Every time the host machine powers up and after initialization it should request
the fingerprint of the counter. If this is different from the previously recorded
fingerprint, the host should record the new fingerprint and that the counter has
been changed. The host should set the number of counters and the text for the
counters. The host should also check the ID of the last message that the SEC
received. This will indicate if a reset occurred during execution of a command
(e.g. increment counter). If this is the case, the host should take remedial action
as required, e.g. either retransmit the last message or assume that it was
completed successfully and take no further action.

Commands
3. Commands

The SEC will process one command at a time from the host system i.e.
increment counters, display counter etc. whilst processing a command any
receipt of a new command will receive a <NAK> and SEC Busy response. Once
a complete command is received, the SEC will process the command and then
send an appropriate response back to the host. If the command was completed
successfully and no data was requested, an <ACK> message is sent back to the
system. If the command requested any data, the data will be sent to the host,
followed by a checksum byte, details of the reply are contained in the sub-
section dealing with the individual command. If an error occurred when
processing the command, or the command was invalid, then a <NAK> message
is sent back to the host system. The data byte of this <NAK> message will
contain data that indicates the nature of the error and the host can take
appropriate action.

The specific commands that can be sent to the SEC are listed in this section.

For simplicity index numbers and check sums are shown as <ID> and <CS>
respectively and are unique to the message at transmission time. Data bytes
are shown as <D1> to <D8> as required in all cases <D1> is the MSB. The SEC
responses are the correct response for the given command; an error response
will be given if an error occurs in transmission or execution of the command.
Execution times shown indicate maximum delay between end of message sent
and start of message being received.

Page 12 of 30 SOP-0200-03-N-DEV STI0002


<20>Request
a. <20> RequestStatusSEC
Status

Message: 20 <ID> 00 <CS> From Host


Response: 60 <ID> 01 <D1> <CS> From SEC

The command is sent by the host to request the current status


information for the SEC. The SEC sends back a data byte containing the
following information:

<D1> Bit Description


Field
Bit 0 Set if the counter display text has become corrupted. The
host should resend the text.
Bit 1 Set if one or more of the counter values has rolled over
(>9,999,999) and remains set.
Bit 2 Set if any writes to EEprom have failed for any reason.
Bit 3 Set if the SEC has repaired any of the EEprom counter
values.
Bit 4 Set if the SEC main program integrity is suspect.
Bit 5 Set to indicate the SEC fingerprint is fixed.
Bit 6 Spare
(MSB) Bit 7 Spare

Execution time 15mS.

<21>Request
b. <21> RequestMarket
MarketType
Type

Message: 21 <ID> 00 <CS> From Host


Response: 60 <ID> 01 <D1> <CS> From SEC

This command requests the Market Type form the SEC. Market types
maybe used to identify different counter and text combinations between
markets and may be used to value from 00 to FF (0 to 255 decimal). The
SEC stores the market type but does not make any use of the value – it
is only the host machine’s reference.

<D1> Market
01 UK AWP Token (Cash in/out, Token in/out, Token refill)
02 UK AWP All Cash, Club & SWP (Cash in/out, Cash refill)
03-FF Undefined

Execution time 15mS.

Page 13 of 30 SOP-0200-03-N-DEV STI0002


<22>Request
c. <22> RequestLast
LastLine
Error

Message: 22 <ID> 00 <CS> From Host


Response: 60 <ID> 01 <D1> <CS> From SEC

The last error code generated by the SEC will be transmitted to the host.
See section 4.5 - Error Codes for a detailed list of what the codes mean.

<D1> Description
00 No error
01 Transmission checksum corrupt
02 SEC busy
03 Invalid data in message
04 Invalid command
05 EEprom read/write failure
06 Fingerprint requested when not set
07 Firmware checksum failure
08 EEprom bus failure
09 Receive buffer overflow

80 Single EEprom checksum failure


81 Double EEprom checksum failure
83 Comm’s time error

Execution time 15mS

<23>Request
d. <23> RequestVersion
Version

Message: 22 <ID> 00 <CS> From


Host
Response: 60 <ID> 01 <D1> <D2> <D3> <CS> From
SEC

The SEC will send an ASCII representation of its current software


version. This will be three characters <D1><D2><D3> which represent
two numbers and a letter – e.g. <30><32><45> is `02E’

Execution time 15mS

Page 14 of 30 SOP-0200-03-N-DEV STI0002


e. <24>
<24>Request CounterValue
Reset Counter Value

Message: 24 <ID> 01 <D1> <CS> From Host


Response: 60 <ID> 04 <D1> <D2> <D3> <D4> <CS> From SEC

The host requests the current value of the counter specified by the byte
<D1> from the host, in the range 0 to 1E. The current value of the
specified counter is sent from the SEC to the host system in BCD format
in data bytes <D1><D2><D3><D4> as follows:

Data Byte Bits Description


D1 7-4 Most significant (1st) Digit (1,000,000’s)
3-0 2nd Digit (100,000’s)
D2 7-4 3rd Digit (10,000’s)
3-0 4th Digit (1,000’s)
D3 7-4 5th Digit (100’s)
3-0 6th Digit (10’s)
D4 7-4 7th Digit (1’s)
3-0 Not Used

For example, if counter 0 shows as `1234567’ on the display, the host


machine would receive data <D1><D2><D3><D4> as
<12><34><56><7X>, where X is undefined.

Execution time 20mS

f. <25>Request
<25> RequestLast
LastCommand
CommandIDID

Message: 25 <ID> 00 <CS> From Host


Response: 60 <ID> 01 <D1> <CS> From SEC

The SEC sends the ID code of the previous command it received and
executed from the host as data byte <D1>. This can be used by the host
to determine if messages were missed during a power down cycle, for
instance. Command ID codes should range from 00 to FF.

Execution time 15mS

<26>Request
g. <26> RequestFingerprint
Fingerprint

Message: 26 <ID> 00 <CS> From Host


Response: 60 <ID> 04 <D1> <D2> <D3> <D4> <CS> From SEC

The SEC sends its stored fingerprint to the host. The fingerprint consists
of a 32 bit (4 byte) binary code assigned to the SEC at manufacture. The
host machine should also check the fingerprint has been set correctly. If
the fingerprint has not been set, this command will return a <NAK> code
with an error code of 06 – Fingerprint not set. This error code will also be
returned if an attempt is made to increment the counters whilst the
fingerprint is not set.
Execution time 15 mS

Page 15 of 30 SOP-0200-03-N-DEV STI0002


<30>Request
h. <30> Set Number of Counters
Counter Value

Message: 30 <ID> 01 <D1> <CS> From Host


Response: 61 <ID> 00 <CS> From SEC

This command sets the number of counters that will be shown using the
cycle counter command (code 54). The value <D1> can be set in the
range 1 to 1F. If a value is specified outside of the range, a <NAK>
message will be returned along with an error code 03 – Invalid data is
command. Note that setting this value does not restrict the number of
counter that the host can use in anyway.

Execution time 25mS.

i. <31>Set
<31> SetMarket
MarketType
Type

Message: 31 <ID> 01 <D1> <CS> From Host


Response: 61 <ID> 00 <CS> From SEC

The market type is used as an identifier to determine if the host needs to


modify the counter text and the number of counters when the counter is
moved from one machine to another. See section 4.3.2 for a description
of the market types.

Execution time 25mS.

j. <32>Set
<32> SetCounter
CounterText
Text

Message: 32 <ID> 08 <D1> <D2> <D3> <D4>


<D5> <D6> <D7> <D8> <CS> From Host
Response: 61 <ID> 00 <CS> From SEC

The text for each counter can be set using this command - the text is
stored in EEprom and will remain until changed. This text is shown on
the LCD when the counters are displayed by the host using the show
counter text commend <42>. The byte <D1> specifies the index of the
counter text to set and may be in the range 0 to 1E. If a value is specified
outside this range, this command will return a <NAK> message along
with an error code 03 - Invalid data in command. The text string must be
7 ASCII characters long, the byte <D2> being the leftmost character on
the display and <D8> being the rightmost character. Should the text
become corrupted during SEC operation the SEC will set a bit 0 in it’s
status byte (see section 4.3.1) and the host machine should retransmit all
the text strings on the next power up cycle.

Execution time 180mS.

Page 16 of 30 SOP-0200-03-N-DEV STI0002


<40>Show
k. <40> ShowText
Text

Message: 40 <ID> 07 <D1> <D2> <D3>


<D4> <D5> <D6> <D7> <CS> From Host
Response: 61 <ID> 00 <CS> From SEC

An ASCII text string is sent to the SEC, which is then displayed on the
LCD display, enabling the SEC to be used as a messaging device. Note
that the LCD display only has seven segments; the characters that can
be displayed are limited.

Execution time 15mS.

l. <41>Show
<41> ShowCounter
CounterValue
Value

Message: 41 <ID> 01 <D1> <CS> From Host


Response: 61 <ID> 00 <CS> From SEC

The SEC will display the current value of the counter specified in <D1>
on the LCD display where <D1> is in the range 0 to 1E. If a value is
specified outside this range, this command will return a <NAK> message
with an error code 03- Invalid data in command.

Execution time 15mS

<42>Show
m. <41> ShowCounter
CounterValue
Text

Message: 42 <ID> 01 <D1> <CS> From Host


Response: 61 <ID> 00 <CS> From SEC

The SEC will display the current text string of the specified counter in
<D1> on the LCD display. Where <D1> is in the range 0 to 1E. If a value
is specified outside this range, this command will return a <NAK>
message with an error code 03- Invalid data in command.

Execution time 30mS.

<43>Show
n. <40> ShowText
Bit Pattern

Message: 43 <ID> 07 <D1> <D2> <D3>


<D4> <D5> <D6> <D7> <CS> From Host
Response: 61 <ID> 00 <CS> From SEC

The SEC will directly write the specified bit pattern in <D1> to <D7> to
the LCD display driver, enabling patterns and animation’s to be shown
on the display. The host sends one bit pattern as a byte for each display
position, <D1> being the leftmost character on the display and <D7>
being the rightmost character on the display.

Execution time 15mS.

Page 17 of 30 SOP-0200-03-N-DEV STI0002


<50>Request
o. <23> CounterVersion
Increment (Small)

Message: 50 <ID> 02 <D1> <D2> <CS> From Host


Response: 61 <ID> 00 <CS> From SEC

The specified counter index <D1> is incremented by the value <D2>.


<D1> should be within the range 0 to 1E. <D2> should be in the range 1
to 0F. If either <D1> or <D2> are outside the specified ranges, this
command will return a <NAK> message with an error code 03 - Invalid
data in command. The differing levels of increments (small, medium,
large) are used to limit any counter corruption should the host machine
generate an erroneous message packet.

Execution Time 50mS.

<51>Request
p. <23> CounterVersion
Increment (Medium)

Message: 51 <ID> 02 <D1> <D2> <CS> From Host


Response: 61 <ID> 00 <CS> From SEC

The specified counter index <D1> is incremented by the value <D2>.


<D1> should be within the range 0 to 1E. <D2> should be in the range 1
to FF. If either <D1> or <D2> are outside the specified ranges, this
command will return a <NAK> message with an error code 03 - Invalid
data in command.

Execution Time 50mS.

<52>Request
q. <23> CounterVersion
Increment (Large)

Message: 52 <ID> 03 <D1> <D2> <D3> <CS> From Host


Response: 61 <ID> 00 <CS> From SEC

The specified counter index <D1> is incremented by the value


<D2><D3>, where D2 is the Low Byte and D3 is the High Byte of a 16-
bit value. <D1> should be within the range 0 to 1E. <D2><D3> should be
in the range 1 to FFFF. If either <D1> or <D2><D3> are outside the
specified ranges, this command will return a <NAK> message with an
error code 03 - Invalid data in command.

Execution time 50mS.

Page 18 of 30 SOP-0200-03-N-DEV STI0002


<54>Cycle
r. <54> CycleCounter
Counter/display
Display

Message: 54 <ID> 00 <CS> From Host


Response: 61 <ID> 00 <CS> From SEC

The SEC will display the text for counter 1 for 1 second, followed by the
value of counter 1 for 3 seconds. This will repeat 3 times, and then
counter 2 text will be displayed. This sequence will continue for the
number of counters specified by the host, using the ‘set number of
counters’ command. Finally, the display will return counter 0 text and
value and then stop cycling, leaving the counter 0 value on the display. If
the ‘set number of counters’ =1, then only the value of counter 0 is
displayed.

<55>Cycle
s. <54> Stop Counter
Cycle /display

Message: 55 <ID> 00 <CS> From Host


Response: 61 <ID> 00 <CS> From SEC

The SEC will stop cycling through the counter values and show the value
of counter 0 on the display (default display). This command overrides
previous cycle commands and will stop the display cycling.

Execution Time 10mS.

t. <5C>Cycle
<54> Self Test
Counter /display

Message: 5C <ID> 00 <CS> From Host


Response: 61 <ID> 00 <CS> From SEC
OR 62 <ID> 01 <D1> <CS> From SEC

The SEC will perform a limited self-test function and the results will be
returned to the host. If the self-test is successful, the SEC will return an
<ACK> message. If the test fails for any reason, the SEC returned a
NAK message, which includes an error code <D1> indicating the nature
of the failure. (See section 5 in Functionality `Error Codes’ for Details).

Execution Time 80mS.

Page 19 of 30 SOP-0200-03-N-DEV STI0002


SEC Response Codes
4. Commands

The SEC responds to commands in different ways dependant on the command


type. The following details the SEC response codes and their construction; the
message format is as follows.

<CMD><ID><DCNT><D1><CS>

<60>Cycle
a. <54> Data Counter
Header /display

The header is sent whenever a command is completed that requires data


to be sent back to the host. The data header is command byte 60.

Example: 60 26 01 05 8C ) Data from SEC


) in response to a
) message <ID> no.
) 26.
) 1 data byte (05)
) returned.

<61>Cycle
b. <54> Self-Test
Counter /display

The header is sent by the SEC whenever a command is completed that


requires no information form the SEC. The ACK header is command byte
61.

Example: 61 27 00 88 ) Acknowledge a
) message <ID> no.
) 27.
) No data required
) and therefore not
) returned.

<62>Cycle
c. <54> NAK Counter /display

The SEC sends the header whenever a command could not be


interpreted or the command could not be completed form some reason.
The NAK header is command byte 62. <D1> is an error code also sent
with a NAK message (See section 5 in Functionality `Error Codes’ for
Details).

Example: 62 28 01 <D1> <CS> ) Acknowledge a


) message <ID> no.
) 28 <D1> is the
) data containing
) the error codes.

Page 20 of 30 SOP-0200-03-N-DEV STI0002


Error Codes
5. Commands

If an error occurs during communication with the SEC or during execution of a


command, the SEC will send a NAK message packet back to the host, along
with a single error code byte in the range 0 to FF. The host can also interrogate
the SEC as to the cause of the last error with the ‘Request Last Error’ command
(section 4.3.3). The last error is always recorded, no matter how long ago it
occurred, the possible errors are:

00 No
a. <54> Error
Cycle Counter /display

This is included for completeness. The last error will only be set to this
value after manufacture and before any errors have occurred. Once
errors have occurred, the last error value is never set back to no error.

01 Transmission
b. <54> Checksum
Cycle Counter /display Corrupt

The transmission from the host was corrupted in some way, e.g. the
transmitted checksum did not match the calculated checksum. The
command will not be executed and the host should retransmit.

02 SEC
c. <54> Busy
Cycle Counter /display

Either the last command is still being processed, or the data buffers are
currently in use by the SEC. The first case occurs when a command is
sent to the SEC whilst it is still processing the previous command, whilst
the second case may occur if a command is sent to the SEC during a
display cycle (button pressed). The command will not be executed and
the host should retransmit.

03 Invalid
d. <54> Cycle Data in Message
Counter /display

This error occurs when the SEC has been sent a valid command, but the
data associated with it is corrupt or outside an acceptable range.

04 Invalid
e. <54> Cycle Command
Counter /display

This error occurs when the SEC cannot decode the command byte of the
message, or that command has been disabled.

Page 21 of 30 SOP-0200-03-N-DEV STI0002


f. 05 EEprom
<54> Read/Write
Cycle Counter Error
/display

This error occurs when the data written to the EEprom could not be read
back and verified. The most likely cause of this error is EEprom failure.

06 Fingerprint
g. <54> Requested
Cycle Counter /displayWhen Not Set

This error is generated when the host requests the fingerprint value but
it has not been set. This error is unlikely to occur, as the fingerprint is set
at SEC manufacture.

07 Firmware
h. <54> Checksum
Cycle Counter Failure
/display

This error occurs when the SEC internal program has been corrupted in
some way. The SEC will check its program integrity at every power up
cycle.

i. EEprom
<54> Bus
Cycle Failure
Counter /display

This error occurs when the SEC does not have control of the bus lines to
the EEprom. Before a read or write is performed, each bus line is driven
high then low to ensure it is not being shorted to supply or ground or any
other bus line. This is to make sure there are no fraud attempts such as
shorting out pins on the SEC PCB.

j. 09 Receive
<54> Buffer Overflow
Cycle Counter /display

This error occurs when a packet is received that has a data count bigger
than 12 bytes. As this would overflow the allocated buffer size, the
incoming packet is truncated and this error is generated.

80 Single
k. <54> Cycle EEprom
Counter Checksum
/display Fail

This error occurs when the counter data read from the EEprom has a
checksum that does not match the calculated checksum. This may occur
if the SEC is reset during a write cycle to the EEprom and data is
corrupted, or it may happen as a result of failure of the EEprom device
itself. The host should not re-transmit after this error, as the SEC can
repair the data error from another (good) copy of the data in the EEprom.

Page 22 of 30 SOP-0200-03-N-DEV STI0002


l. 81 Double
<54> EEprom /display
Cycle Counter Checksum Fail

This error occurs when both copies of the counter data in EEprom have
checksums that are incorrect. This is most likely due to a serious multiple
failure of storage locations within the EEprom or fraud attempts and
means the SEC can no longer be considered to operate reliably. A SEC
that has generated this message should be replaced.

82 Comm’s
m. <54> Time Out
Cycle Counter /display

The command / data being transmitted has not been completed within
the allocated time. All commands must be completed within 1 second of
the first byte being sent - this includes the command and any data strings
sent. If a time -out error occurs, the SEC will clear the input buffers and
wait for a new transmission. The command will not be executed and the
host should retransmit.

Portability
6. Commands

The SEC can be moved from one host to another to allow for replacement,
spares etc. Moving from one host to another will not clear down any counter
value information. If the SEC is moved between 2 hosts from different markets it
should automatically be updated with information on the new market from the
new host at the next host power up. The fingerprint should be checked by the
new host on power up and logged accordingly. This way, counter frauds
involving swapping counter units from machine to machine on a regular basis
can be detected.

It is not recommended to install or remove the SEC unit whilst the host
machine is powered up, as this may lead to internal damage.

Page 23 of 30 SOP-0200-03-N-DEV STI0002


SECURITY

Communications
1. Commands

Communications security is by the use of checksums for each command packet


sent to the SEC. The checksum is an 8-bit sum of the other words that make up
the command packet (i.e. CMD, ID, CNT and any data bytes), ignoring any carry
bits. Should the SEC receive a command that has an incorrect checksum, it will
ignore the command and send a NAK message back to the host machine.

Fingerprinting
2. Commands

Each SEC unit will be assigned a unique ‘fingerprint’ as a security code that
allows each SEC to be identified. The SEC fingerprint is a 32bit binary number,
allowing an unlimited number of individual fingerprints. The fingerprint can be
read at any time by the host machine to determine if an SEC has been changed
in the machine, allowing for frauds to be detected. Currently, the fingerprint is
assigned during production test using a combination of software and special
hardware. When the fingerprint is set, it cannot be modified or reset. The unique
SEC fingerprint is recorded at manufacture and used for quality control, parts
tracking as well as security.

Page 24 of 30 SOP-0200-03-N-DEV STI0002


Ordering Information

1. Part
PartNumber
Number for Ordering

The part number D6C001-01-ZZZZ should be quoted when ordering the SEC.

Standard
2. Box QuantityBox Quantities

The SEC units come in standard box quantities of 200 units

Standard
3. Standard Lead
Lead Time
Time

The standard lead-time for the SEC units is 5 working days.

Page 25 of 30 SOP-0200-03-N-DEV STI0002


Appendix 1

Example of Message Strings between Host & SEC


Host Direction SEC
23 01 00 24 →
← 60 01 03 30 32 45 0B

Description
The host sends a <23> request software revision, <ID> = 01.
The SEC replies <60> data available, with 3 bytes to show revision ‘02E’.

Host Direction SEC


30 02 01 05 38 →
← 61 02 00 63

Description
The host sends <30> set number of counters to 05. With <ID> = 2
The SEC replies <61>. Acknowledge that command was OK.

Host Direction SEC


25 03 00 28 →
← 60 03 01 02 66

Description
The host request the last <ID> number using <ID> = 03.
The SEC replies <60> data available and sends last <ID> number.

Host Direction SEC


30 04 00 34 →
← 62 04 01 03 6A

Description
The host sends an invalid command string with <ID> = 04 i.e. set counter command
without defining the counter number (no data). The SEC sends a NAK header with
code 03 - invalid data.

Page 26 of 30 SOP-0200-03-N-DEV STI0002


Appendix 2

Interface Connector Pin Out

Pin Signal Name Type Description

1 SOUT Output SPI Data Output Line


2 SCLOCK Input SPI Clock Input Line
3 SIN Input SPI Data Input Line
4 Reset Input SEC Reset (Low)
5 +12v Input DC Voltage Supply
6 GND Input 0v Supply

Connector Type

SEC: - Leotronics 2502P060000

HOST: - Molex KK 7720S 22-50-3065

Page 27 of 30 SOP-0200-03-N-DEV STI0002


Appendix 3

LCD Display Map

Page 28 of 30 SOP-0200-03-N-DEV STI0002


Appendix 4

Interface Timing Diagram

Page 29 of 30 SOP-0200-03-N-DEV STI0002


Page 30 of 30 SOP-0200-03-N-DEV STI0002

You might also like