TI-H: Re: gooooooooood morning!
[Prev][Next][Index][Thread]
TI-H: Re: gooooooooood morning!
From: "Nick Foster" <zaphod@coe.neu.edu>
> i have a magnetic card reader i ... liberated, and i
> want to interface it to an rs-232 port. the magstripe
> reader gives out TTL, with a clock and a data pin.
Any idea at what rate the clock runs?
If its something that approximates a standard rate of
the serial port, you might be able to just directly
connect it. You might end up decoding the input data
if its not RS232, which could be something of a pain
in the ass.
Alternately, if its not too fast, you could possibly
hook it up to the parallel port. Watch the clock
input and poll the data line when necessary.
> how would i write the C code to query the serial port and
> convert this data into a usable form? it's purportedly ASCII
> on the card, so that won't be an issue.
If you are using windows, use the comm functions. Unless
you use the parallel port, then you'll have to go direct
to the hardware (or write/find a device driver). You just
read and write the io ports, inp and outp in C, IIRC.
DK
Follow-Ups:
References: