logo资料库

CCTALK BUS CCTLAK 总线协议.pdf

第1页 / 共51页
第2页 / 共51页
第3页 / 共51页
第4页 / 共51页
第5页 / 共51页
第6页 / 共51页
第7页 / 共51页
第8页 / 共51页
资料共51页,剩余部分请下载后查看
cctalk Serial Communication Protocol - Generic Specification - Issue 4.4 Money Controls does not accept liability for any errors or omissions contained within this document or for any changes made to the standard from one issue to the next. Money Controls shall not incur any penalties arising out of the
adherence to, interpretation of, or reliance on, this standard whether it be now or in the future. Public Domain Document Money Controls - Page 2 of 51 - cctalk Part 1 v4.4 While every effort has been made to ensure the accuracy of this document no liability of any kind is cctalk Generic Specification - accepted or implied for any errors or omissions that are contained herein.
Revision History Issue 1.0 3.1 3.2 4.0 4.1 4.2 4.3 4.4 Date 29-04-96 18-05-99 03-02-00 13-06-00 15-05-01 24-05-01 05-10-01 16-04-02 02-01-03 05-08-03 30-09-03 30-10-03 11-11-03 19-03-03 29-03-04 06-04-04 05-07-04 04-08-04 11-01-05 Public Domain Document Comments Draft specification < intervening revision history has been archived > New section numbering Miscellaneous clarifications and additional text 9600 baud is the preferred operating speed Addition of error codes 27 & 28 Addition of ‘Money Controls’ to Table 7 New headers added - see below Some headers have new data format for Serial Compact Hopper Mk2 Revised default addresses : Table 2 - cctalk Standard Category Strings Inter-byte delay < 10ms : See ‘Timing Requirements’ Application specific header range is 99 to 20 rather than 99 to 7 Major document restructuring and text revision New headers to support bill validators Update to Appendix 10 - Common Country Codes Stated conformance to ISO 3166-1 Modification to recommended cctalk interface circuit ‘Circuit 1 - cctalk Standard Interface’ Addition of connector type 9 for serial universal hopper Serial Protocol - Voltage Levels. Allowable ranges now defined. Help text now included for error and fault codes. See Tables 2 & 3. ISO 3166 list now fully comprehensive. See Appendix 10. Default data voltage is +5V. See Appendix 6. Removal of Controller category ( = address 3 ) from Table 1 Link added to cctalk.org web site Change to contact FAX number Route code 255 added to cctalk header 154, ‘Route bill’ Clarification of when address is changed with cctalk header 251, ‘Address change’. Addition of Appendix 11 - Coin Acceptor Messaging Example Update of Table 6 - cctalk Standard Manufacturer Strings NAK is now a recognised reply from cctalk header 142, ‘Finish bill table upgrade’ to indicate the process failed. Type 8 connector : note added about polarity Added Appendix 12 : Italian Flavour Specification Change Added latest product naming examples Zener versus Schottky diode clarification in Circuits 1 to 4 Header 163, ‘Test hopper’. Added flag explanation. Appendix 10 : Common Country Codes : Additional exception Addition of header 135, ‘Set accept limit’ Added section on BACTA Token Selection Added new bill event code, ‘Anti-string mechanism faulty’, to Table 7. Text ‘( or reject or other event ) ’ added to header 162 description. Circuit 4 - PC Interface. Alternative transistors given. New section : Discussion of Transitory versus Steady-state Events Removed from Core Plus : Header 169, Request address mode Removed from Core Plus : Header 3, Clear comms status variables Removed from Core Plus : Header 2, Request comms status variables Calculate ROM checksum : CRC checksum can be calculated with a fixed seed if required Request variable set - 2 variables defined for bill validators Addition of Appendix 14 - Large Packet Exchange Minor text clarification to Header 2, Request comms status variables Scope plots added to show cctalk voltage levels and timing Text changed to ‘( strictly speaking an attempted accept sequence )’ in Money Controls - Page 3 of 51 - cctalk Part 1 v4.4 While every effort has been made to ensure the accuracy of this document no liability of any kind is cctalk Generic Specification - accepted or implied for any errors or omissions that are contained herein.
25-01-05 16-05-05 24-08-05 23-12-05 28-12-05 Public Domain Document header 162 description. Table 1 : Added Reel equipment at address 30 Table 1 : Added RNG at address 120 Table 3 : Manufacturer-specific fault code can be sent after ‘255’ Table 6 : Added Starpoint Electrics to cctalk User Group Table 6 : Added Intergrated(sic) Technology Ltd to cctalk User Group Added 5 commands for an accumulator hopper, headers 130 to 134 Expanded status register in header 163, ‘Test hopper’, to include accumulator hopper functionality Specification of rise & fall time added New connector type 6 part numbers Re-worked section on BACTA Token Selection Addition of error code 29 : Accept gate open not closed Addition of error code 30 : Accept gate closed not open Addition of fault code 42 : Accept gate failed open Addition of fault code 43 : Accept gate failed closed Header 173, ‘Request thermistor reading’ has new Celsius format Addition of Header 129, ‘Read barcode data’ Addition of bill event code 20, ‘Barcode detected’ Appendix 15 created – Bill Types and Bill Values Creation of new section ‘cctalk RFC’ in Part 4 / Section 4 of standard. Proposed changes to the cctalk specification will be placed here. Money Controls - Page 4 of 51 - cctalk Part 1 v4.4 While every effort has been made to ensure the accuracy of this document no liability of any kind is cctalk Generic Specification - accepted or implied for any errors or omissions that are contained herein.
Public Domain Document Command Headers Added Since Version 4.3 Header 134, Dispense hopper value Header 133, Request hopper polling value Header 132, Emergency stop value Header 131, Request hopper coin value Header 130, Request indexed hopper dispense count Header 129, Read barcode data Command Headers Modified Since Version 4.3 The following commands have been removed from the ‘Core Plus’ requirement. They are now optional. Header 169, Request address mode Header 3, Clear comms status variables Header 2, Request comms status variables The status registers in the ‘Test hopper’ command, header 163, have been increased by one byte for accumulator hoppers and some of the reserved flags re-defined. Operation is fully backwards-compatible with the existing hopper range. Header 173, Request thermistor reading. Updated return data format. Money Controls - Page 5 of 51 - cctalk Part 1 v4.4 While every effort has been made to ensure the accuracy of this document no liability of any kind is cctalk Generic Specification - accepted or implied for any errors or omissions that are contained herein.
Public Domain Document Part 1 - Contents 1. HISTORICAL.............................................................................................................................................8 2. 3.1 5.1 3. 4. 5. 6. 2.2.1 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 6.10 INTRODUCTION.......................................................................................................................................8 2.1 SERIAL VERSUS PARALLEL : A COIN INDUSTRY PERSPECTIVE....................................................8 2.2 WHAT IS CCTALK ?..............................................................................................................................9 Is it a Multi-Master Protocol ? .............................................................................................9 2.3 WHAT ARE ITS CAPABILITIES AND FEATURES ?.........................................................................10 2.4 IS IT DIFFICULT TO IMPLEMENT ? .................................................................................................11 2.5 ARE THERE ANY ROYALTIES TO PAY OR LICENCES TO OBTAIN ? ..........................................11 2.6 A QUICK EXAMPLE OF A CCTALK MESSAGE ................................................................................13 2.7 COMPARISON WITH OTHER SERIAL CONTROL PROTOCOLS......................................................13 SERIAL PROTOCOL - TIMING.......................................................................................................... 13 BAUD RATE.........................................................................................................................................14 SERIAL PROTOCOL - VOLTAGE LEVELS .................................................................................... 14 4.1 OSCILLOSCOPE PLOTS.......................................................................................................................15 THE SERIAL DATA LINE..................................................................................................................... 16 RS485 DRIVERS....................................................................................................................................16 CONNECTOR DETAILS....................................................................................................................... 18 TYPE 1 ( STANDARD INTERFACE, IN-LINE CONNECTOR )...........................................................18 TYPE 2 ( STANDARD INTERFACE, MOLEX CONNECTOR )...........................................................19 TYPE 3 ( LOW POWER INTERFACE )................................................................................................19 TYPE 4 ( EXTENDED INTERFACE, IN-LINE CONNECTOR )...........................................................20 TYPE 5 ( AWP INDUSTRY-STANDARD INTERFACE )....................................................................20 TYPE 6 ( SERIAL HOPPER INTERFACE ) ..........................................................................................21 TYPE 7 ( STANDARD INTERFACE, JST CONNECTOR ) ..................................................................21 TYPE 8 ( SERIAL HOPPER INTERFACE, VERSION 2 )......................................................................22 TYPE 9 ( UNIVERSAL HOPPER INTERFACE )...................................................................................22 CONNECTOR WIRING COLOURS................................................................................................24 7. MESSAGE STRUCTURE....................................................................................................................... 25 STANDARD MESSAGE PACKETS, SIMPLE CHECKSUM..................................................................25 7.1 STANDARD MESSAGE PACKET, CRC CHECKSUM .........................................................................26 7.2 ENCRYPTED MESSAGE PACKET, CRC CHECKSUM........................................................................26 7.3 7.4 PROTOCOL LAYERING.......................................................................................................................26 7.5 DESTINATION ADDRESS....................................................................................................................27 The Broadcast Message....................................................................................................... 27 7.6 NO. OF DATA BYTES..........................................................................................................................27 Long Transfers....................................................................................................................... 28 7.7 SOURCE ADDRESS...............................................................................................................................28 7.8 HEADER................................................................................................................................................28 7.9 DATA....................................................................................................................................................29 SIMPLE CHECKSUM .....................................................................................................................29 7.10 CRC CHECKSUM ...........................................................................................................................29 7.11 A Little Checksum Theory................................................................................................... 29 ANATOMY OF AN EXAMPLE MESSAGE SEQUENCE ...............................................................31 THE ACKNOWLEDGE MESSAGE...................................................................................................... 32 THE NAK MESSAGE...........................................................................................................................32 THE BUSY MESSAGE..........................................................................................................................32 COMMANDS THAT RETURN ASCII STRINGS ............................................................................. 33 7.11.1 7.5.1 7.6.1 8.1 8.2 8. 9. 7.12 Money Controls - Page 6 of 51 - cctalk Part 1 v4.4 While every effort has been made to ensure the accuracy of this document no liability of any kind is cctalk Generic Specification - accepted or implied for any errors or omissions that are contained herein.
Public Domain Document 9.1 FIXED LENGTH STRINGS ...................................................................................................................33 IMPLEMENTATION DETAILS............................................................................................................ 33 10. 11.1 11.2 11. TIMING REQUIREMENTS.................................................................................................................... 35 BETWEEN BYTES.........................................................................................................................35 BETWEEN COMMAND AND REPLY ...........................................................................................35 12. ACTION ON ERROR............................................................................................................................. 36 RETRANSMISSION.........................................................................................................................36 13. UNRECOGNISED HEADERS ............................................................................................................... 36 12.1 14. PRACTICAL LIMITATIONS IN VERY LOW COST SLAVE DEVICES..................................... 36 15.1 15. COMMAND SET..................................................................................................................................... 38 COMMAND EXPANSION...............................................................................................................38 Expansion Headers .............................................................................................................. 38 Context Switching................................................................................................................ 38 IMPLEMENTATION LEVEL .........................................................................................................39 IMPLEMENTING CCTALK ON A NEW PRODUCT....................................................................... 39 15.1.1 15.1.2 15.2 16. 17. IMPLEMENTATION STANDARDS.................................................................................................... 40 20.1 19.1 18.1 18. COIN ACCEPTORS - CREDIT POLLING ALGORITHM.............................................................. 40 THE CREDIT POLL WATCHDOG................................................................................................40 19. WRITING GENERIC HOST SOFTWARE APPLICATIONS ......................................................... 41 DESIGNING A CCTALK API .........................................................................................................41 20. MULTI-DROP CONSIDERATIONS ................................................................................................... 42 PRACTICAL LIMITATIONS OF MULTI-DROP NETWORKS.....................................................43 20.1.1 Maximum Number of Network Devices............................................................................. 43 20.1.1.1 Logical Addressing..............................................................................................................43 20.1.1.2 Electrical Loading................................................................................................................43 20.1.1.3 Address Randomisation......................................................................................................43 MDCES - MULTI-DROP COMMAND EXTENSION SET ...........................................................44 Address Poll, Header 253 ................................................................................................... 44 Address Clash, Header 252 ................................................................................................ 45 Address Change, Header 251............................................................................................. 46 Address Random, Header 250............................................................................................ 46 21. DISCUSSION OF TRANSITORY VERSUS STEADY-STATE EVENTS ..................................... 48 20.2.1 20.2.2 20.2.3 20.2.4 20.2 22. CONTACT INFORMATION................................................................................................................. 51 Money Controls - Page 7 of 51 - cctalk Part 1 v4.4 While every effort has been made to ensure the accuracy of this document no liability of any kind is cctalk Generic Specification - accepted or implied for any errors or omissions that are contained herein.
Public Domain Document 1. Historical Jun 87 : Coin Controls Ltd abandons I2C development on future products in favour of the RS232 protocol. Apr 96 : ‘cctalk’ specification created after much consultation within the industry. Aug 98 : A meeting of coin mechanism manufacturers in Tamworth, England agrees on a common connector supporting both cctalk and Mars HI2 for AWP machines. The data format was standardised at +12V, 9600 baud. Jun 99 : Coin Controls Ltd sets up a cctalk User Group to promote cctalk within the industry and to provide a formal mechanism for both obtaining feedback from users and for expanding the specification into new areas. Jun 00 : Protocol proving successful in many diverse applications. Specification updated to include an ultra-secure compact hopper and a new range of cctalk bill validators Aug 00 : Meeting in Burton-on-Trent, England to discuss the future of cctalk in relation to bill validators. Encryption and CRC checksums discussed. Nov 00 : Encryption and CRC checksums added into the protocol for BNV’s. BNV simulation software made available to manufacturers. Jan 04 : Italy adopts cctalk throughout their AWP platforms and a variety of products are put through homologation. Hoppers are used ‘unencrypted’. Dec 05 : Money Controls successfully tests cctalk running at 1Mbps over a USB virtual COM port link leading to exciting new areas of product development. Introduction 2. 2.1 Serial versus Parallel : A Coin Industry Perspective Both serial and parallel interface techniques have advantages and disadvantages. Parallel interfaces are fast and in some applications provide the simplest way of transferring information. However, cable harnessing costs can reach a significant proportion of the original equipment costs as the number of data lines increase. Problems with crimp connectors and dry solder joints can give reliability issues when a large number of wires are used to send data. Serial interfaces on the other hand reduce cabling costs to a minimum and often enable extra features ( such as self-testing and expansion ) to be incorporated into the product with very little overhead. Serial interfaces also provide a simple and efficient way of connecting two or more devices together in situations which would be totally impractical with a parallel interface. This reduces cabling costs even further in applications which require a number of devices to be connected to a single host controller. The cash handling industry now embraces many different aspects of technology from coin and token acceptors through bill validators and magnetic / smart card readers to intelligent payouts and changers. A way of connecting all these different types of peripherals in a simple and consistent manner is a stated aim of many manufacturers and a serial bus is the obvious solution. Money Controls - Page 8 of 51 - cctalk Part 1 v4.4 While every effort has been made to ensure the accuracy of this document no liability of any kind is cctalk Generic Specification - accepted or implied for any errors or omissions that are contained herein.
分享到:
收藏