ccTalk tutorial , the hardware interface.

The logic levels for the ccTalk line are 3.5 to 5V for mark state (idle ) and 0 to 1V for space state (active). This allows a low cost interface width 5V microcontrollers. Some dedicated gaming PC based platforms like this one have one or more built in ccTalk ports.

Simple 5V microcontroller interface
Simple 5V microcontroller interface

A normal switching diode can be used but the noise margin could be to low. The resistor can be in 1Kohm  to 10Kohm range. If the Tx output is open colector you can connect together TX RX and data line without the diode. also the resistor is not required if the slave has a pull up.

Simple 3V microcontroller interface
Simple 3V microcontroller interface

You can skip the diode if the microcontroller has internal protection diode.

I know that the levels are not exactly by the book , the input low level for Pic microcontrollers is guaranteed at 0.15 VDD for CMOS inputs. 1V means 0.3VDD for 3.3 V and 0.2VDD for 5V but this worked for me flawlessly

For PC there are many USB to RS232 TTL adapters available that can be used with the schematics above , search Google, they have 5V and 3.3V outputs. If you want a ready made ccTalk cable Alberici  has one (pl2303 based) or you can find some more in “Usefull ccTalk links” page.

There is also on youtube a video where this guy is simply connecting TX and RX and data  together , I doubt that the TX output is open collector the slave just force zero the output that acts also as a pull up when idle.  This might reset your USB to serial chip if the output is stronger.

Of course do not forget the  official schematics from the ccTalk documentation , I don’t have their agreement to show them here but you can find them in ccTalk documentation part 3 page 82 to 85.


25 thoughts on “ccTalk tutorial , the hardware interface.

  1. (Continues from last post)
    Looking completely to my questions in my last post and the “this guy” video in Youtube, what I understand is that: Attaching the only 1 data line of ccTalk device to a USB to TTL cable’s DATA IN (receieved) and DATA OUT (transmittted) cables is enough. But there appear two new questions:

    1-The equipment in the video is a ccTalk coin acceptor which needs12 V to work. So the guy takes the energy from the PC’s board. But for a hopper which needs 24 V, 1 A minimum, it is impossible. OK, the answer my friend is blowing in the wind, it is easy, just use an external 24 V power supply. But the guy atttaches the USB-TTL cable’s ground (black) to the PC board’s ground (black) cable. In that case should I attach the USB-TTL cable’s ground to the 24V external power supply’s ground? Or what?

    2-It seems it is possible to work by connecting the only 1 data line of ccTalk equipment to a desktop PC’s 9 pin RS232 pins [(both) 2nd (tranmission) and 3rd (receiver)] and using an external 24 V power supply WITHOUT A USB TO TTL CABLE. Am I right? (In that case there is no ‘where to connect the ground of USBtoTTL cable’ question, there is no USB cable or port in this scenerio)

    Like

  2. I bought the same or a similar USB-to-TTL-cable on amazon and wired it accordingly. It houses a PL2303 controller and i checked that there is 12V and 3,3V on data, but i cant get it to work. CCTalk test software reports that there is a device, but not a CCTalk-device. The coin acceptor is EMP 850.13 v5.

    Like

  3. Hi.
    I’m having trouble communicating with a Microcoin SP1. I used to use a PL2303HX USB to RS232 TTL converter very successfully (by using the simple connect TX and RX together approach), but this converter does not support windows 8 and above and I’ve been forced to upgrade to windows 10. Instead I’ve purchased the PL2303TA which does support windows 10 and to use this I’ve used your ‘Simple 5V microcontroller interface’. This works really well for transmitting, but I could not get a reply (strictly I got a garbled reply). Connecting up an oscilloscope, I found that in the the reply from the coin acceptor, the level is only being pulled down to 2v, not 0v. My electronics knowledge is very rusty (ie I’ve not done any for 25 years!), but I was kind of thinking that I need some sort of circuit to bring down the level at the coin acceptor end.
    Any suggestions at all?
    Many thanks in advance,
    Richard

    Like

    1. I see that PL232TA is using 3V not 5. I had this issue when I burned the USB to serial TTL converter but this happened only when I did something very wrong , I forgot a ground wire or I had a short to 12 V on the data line. Are you having loopback answer without connecting the coin acceptor? If not then change the converter. The issue with using 3v converter was mostly for the TX side because the “1” level might be to low for some devices, most of them are having a similar input inside and translate levels over 2.5V as “1” . The chance to burn the RX due the 5v pull-up is very low , never happened to me. Nothing on google worked for PL2303HX? I switched to windows 10 recently and I found drivers for all my cables even no name ones( not official ones but working well)

      Like

      1. Hiya. Thanks for your response. Yep, I’m getting loopback just fine. Regarding the PL2303HX, I googled as far as finding that it wasn’t supported above windows 7 and went out an purchased the recommended replacement, the TA. Knowing that there may be some out there I’ll do some more digging to see what I can find. Thanks again, Richard

        Like

      2. Very strange , then it should be something about the wiring. Check the ground line from the converter. The coin acceptor TX line cannot be to weak , it supposed to drive a line where many ccTalk devices are attached so it’s out of the question. Since you are having some kind of answer from the acceptor the converter TX is working well. Check the wires from the converter.
        Google for “pl2302hx driver windows 10” , the sixth result from totalcardiagnostics worked for me.

        Like

      3. Some sources suggest to force-install the Windows 7 driver manually and disable driver updates as it will get the newer but non-working Windows 10 Profic driver.

        Like

    1. Raspberry Pi has 3V TTL output on GPIO , use the second schematic.You might also try “this guy” interface with a USB-TTL serial cable if you have a spare USB port. I don’t know a commercial interface from 3V TTL serial to ccTalk line.

      Like

      1. Thaks for the info.

        On the ccTalk documentation part 3 page 85, there’s a PC interface.

        You think would be possible to replace the MAX202E with a MAX 3232?

        Thanks!

        Like

      2. No, the expansion port uses RS232 TTL levels, 0 – 3.3V negative logic. True RS232 like on PC DB9 connector output uses -12 – +12V true logic levels. Most likely you will burn at least GPIO RX input on RPi.

        Like

      3. Maybe, since the MAX3232 has 2 inputs/outputs, I could use the same IC to translate from:

        ccTalk -> RS232 (input 1) -> RS232 (input 2) -> RPi

        Makes sense?

        Like

      4. If choose to use the level converter and the standard schematic, I would connect the low voltage side to the RPi UART and 3.3V and use the suggest ccTalk part from standard schematic on the high voltage side correct?

        Like

      5. Oh.. I missed the point here. You mean using the same 3232. No ,It doesn’t work. It would if you use a 3.3V powered 3232 on PI side and a 5V powered 3232 on ccTalk side. This ccTalk interface cannot work on 3.3V and connecting a 5V output to RPi isn’t safe.

        Like

      6. You can try to change a bit the schematic. Leave the MAX and connect the lines from pin 12 and 11 to RPi TX and RX. Change the 5v voltage to 3.3 (only the right side, not on the line) and lower the 68k resistors to 47k or even to 33k or 22k. Should work.

        Like

  4. Hi, ty for this tutorial.
    I create a shield for the Uno and Due and do not know exactly which circuit I should use. Best with a level converter since once 3.3 V or 5V are available, depending on the Arduino type. The second circuit is only 3.3V I suppose. Then I still have the problem that everything I send on Tx again appears on the Rx, because the RX via an interrupt works. How do I turn off Rx? Is there a chip for the whole?

    Like

    1. Hi to. Use the transistor schematic. I really don’t see where is the trouble with the mirrored message on RX. It works the same with the interrupts or polled , first check the consistency of the received message with the sent message then receive the answer. It is useful to diagnose a ccTalk line shorted to ground. There is a hardware option to suppress the echo but it’s buggy, you can find it on page 13 of this document: http://www.dvbvending.net.ua/files/manual/P_Series_P70-P77-P85.pdf but take into account that if your ccTalk line is shorted to ground this circuit will send data back to RX , you must handle that somehow. Also some unexpected spikes can occur on RX due the line capacitance. I don’t know any ready made chip solution.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.