RE: TI-H: Re: gooooooooood morning!


[Prev][Next][Index][Thread]

RE: TI-H: Re: gooooooooood morning!




At 03:19 2001-01-24, you wrote:

>it ain't that simple - the cardreader spits out data as it is received, so
>it depends on the speed of the card as it is swiped through the reader. so,
>it is a variable rate. i need to poll the serial port for clock signals and
>grab the data when the clock is set, i guess.
>
>--nick

What operating system do you use?
How you get access to the port is depending on this.
If you use parallel port, a pinout can be found here: 
http://www.cs.uiowa.edu/~jones/step/example.html
if you need both input and output, a good idea is to use the datapins for 
output and one of the control pins for input, then you don't need to fiddle 
with biderectional port.
Serial port can be found here: 
http://www.btinternet.com/~krazy.keith/electronics/comm1.html  (booth urls 
found with www.google.com) Probably easiest to use control signals for that 
too. I havn't used the serial port for anything I have built myself (mostly 
because the paralell has nices voltage for this (0/5V instead of 
serialports +-12V)) so I don't really know how it works, but I have some 
memory of that the RX and TX are harder to control directly.

I like to read and write the port directly for things like this, but 
depending on the OS, different ways is used to get access to it. In linux 
you need to be root. How you do in windows I don't know now, since I have 
never have need for it. (you find out)
There is some lib that comes with W32Tran8x for direct port manipulation in 
windows, maybe you want to look into that, and search for it on the net.
reading is simple. as you say, poll the port with some intervall, and if 
you recive clock, read the pin and shift it into a variable. read and shift 
(or shift and read or whatever).

That is my tips.

//Olle




References: