I've been programming a CashCode brand bill validator (excellent product, much better than Mars), and now I'm trying to find something that doesn't suck to replace an ugly kludge.
The bill acceptor has a "serial" interface, which is of course not a PC serial port but rather some sort of specialty interface. I'm using a converter module that claims to convert it to RS232. Which it mostly does. However, that alone doesn't allow me to control the unit. There is a handshaking process involved, and in their infinite wisdom, the converter requires me to drop (0V) and raise(5V) pin 3, which is normally RD(aka RX). Unfortunately, I can't just swap, for example, RD and RTS, and use RTS for the acking, because it requires normal functioning on RD, also. So, the sollution I have found is to tie RD and RTS together. This allows me to force RD high or low by playing with RTS, and still allows me to receive data normally on RD.
I'm really unhappy with this sollution, it is an ugly hardware hack, which is going to require me to build/buy a custom connector for each unit. Also, normally RD has 0V to -5V, and with RTS I'm pushing it from 0V to +5V. I have no idea if that is safe for the hardware in the long term. So my question is, does anybody know of a way in software to pull RD low? Currently I'm using Device::SerialPort, but I'm not set on doing it that way.
Snazzy tagline here