The Cube Hopper Mk2 from Suzo International is available with a cctalk interface. The purpose of this document is not to describe the cctalk protocol, only those aspects concerning the. Cctalk major release 4 2.1 Serial Connector Pinout Connector type. Teensy implementation. I also created a simple ccTalk controller that can be used on an Arduino or a Teensy device. The code available here polls a coin acceptor and will send the corresponding amount of keystrokes to the host computer. The purpose of this was to add a coin acceptor on my MAMEcab to add a more realistic feeling when playing. The RS232 to ccTalk interface PCB is used to control a device that utilizes ccTalk protocol using a PC application directly from the serial port. Part number is 41173041. Product Details: The configuration parameters are as follows: 9600 baud, 1 start bit, 8 data bits, no parity, 1 stop bit; Requires 12 or 24 VDC. Apr 06, 2015. In order to interface the C120S coin acceptor, the following document will also be needed. ‘ccTalk Serial Communication Protocol - Generic Specification - Issue 4.4’ The latest issue of this document in pdf format is available from the ccTalk web site at www.ccTalk.org.
Published on 19 August 2013
Coin acceptor
A coin acceptor is a device that can recognize various types of coins based onits weight, shape, size and more (all depends on the device and themanufacturer). Usually, all the different coins it can recognize are separatedin what are called validation channels, which means one coin type is assignedan ID.
Coin acceptors usually can recognize up to 16 different coin values, andeach of them is assigned one of those validation channels. These devices alsohave at least two sorter paths, which define the path the coin will take basedon the fact that the coin has been recognized or not. The two main paths are the'good coin' path (generally inside the machine) and the 'error' path, whichnormally gives the coin back to the customer.
Data request
To actually get the data from the coin acceptor, the controller must issue arequest with header 229 - Read buffered credit or error codes. The coinacceptor will respond with eleven bytes, containing the following information :
Cctalk Serial Interface Software
Since the coin acceptor will return the validation channel value, thecontroller will need to know which coin type is associated with each ID. It isthen mandatory to know this association to be able to process different coinsproperly.
Interfacing with a coin acceptor
In the previous article, we saw how to create ccTalkpackets and requests. Now, let's interface a coin acceptor, handle its returned dataand process it !
Initialization
First of all, You have to make sure that the coin acceptor is online bysending a sample poll packet and get the response.
Coin acceptor setup
The coin acceptors need to be initialized prior accepting coins. The two mainthings to do are to set the inhibit status, which define which validationchannels are enabled on the coin acceptor. This can be done using the header 231- Modify inhibit status with two bytes of data. Each bit in the bytes representa validation channel (little-endian).
The second thing is to enable the coin acceptor, which is often not done bydefault. To do this, we need to send a request with header 228 - Modify masterinhibit status and 0x01 as the data byte - which means enabled.
Data request and processing
Now that the coin acceptor is ready, it needs to be polled regularly (specs sayevery 200 milliseconds, but it can be more) and the returned data needs to beparsed and processed.
The counter starts at zero on initialization, and increments up to 255. It willthen loop from 1 to 255 and so on. Processing the data is quite simple once youknow which coin is what :
Example code
The following Python code uses the ccTalk library presented in last post It shows a basic coin acceptor initialization andpolling, and can be enhanced to support other functionalities :
Teensy implementation
I also created a simple ccTalk controller that can be used on an Arduino or aTeensy device. The code available here polls a coin acceptor and willsend the corresponding amount of keystrokes to the host computer. The purpose ofthis was to add a coin acceptor on my MAMEcab to add a more realistic feelingwhen playing.
Here is a (crappy) demo of it in action. You can actually see the credits changewhen I insert a new coin :
In the next post, we'll start messing with a ccTalk bus by injecting data andsee what can be done once you have a physical access to the bus.
Computer Interface
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |