Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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


In reply to Kludging the serial port by Aighearach

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-19 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found