[Sussex] cash drawer programming

Dominic Clay dominic.clay at beddowsbooks.co.uk
Fri Aug 13 09:55:04 UTC 2004


Jim,

Whilst I _am_ fascinated by what you say, an it sounds more or less what I
am looking for.  I really am a newbie at this kind of thing.

I dont want to be spoonfed :) but could you point me at a good location to
read a little about simple serial port programming.

Cheers,
Dominic


----- Original Message -----
From: Jim Nicholson
To: 'LUG email list for the Sussex Counties'
Sent: Thursday, August 12, 2004 8:14 PM
Subject: RE: [Sussex] cash drawer programming


Dominic,

It looks easy enough.

If you can get the RS232 one, all you need to do is take a Cat5 cable, hack
one end off and solder the correct wires to a DB9 or DB25 female connector
as appropriate for your PC.  Configure the serial port as it says in the
manual. In your application you just open /dev/ttyS0 or whatever port you're
using, write something to it and then close it.

The pulse operated one is slightly more complicated (but not much). You
could use one of the outgoing handshake lines on a serial port to drive a
relay or similar to switch 12V from your PSU to the appropriate pin and wire
the sense pins to drive an incoming handshake lines on the serial port. You
open the /dev/ttyS0 (or ttyS1 as appropriate) port and then do an ioctl()
call to set the handshake lines, there is also an ioctl() to read the
handshake lines.

I did something like this a few years ago at work on a Solaris box, I dare
say I can have a dig around in the man pages for the exact ioctl calls to
make if you need it.

Jim





More information about the Sussex mailing list