Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

rfid reader serially

hi
i found this source code from net. i am using ti to read my rfid reader through serial port. it works on 19200 baudrate, 1 stop bit, 8 bit data
what changes should i make to this programm to hav it run correctly on my pc??

#include
#include
#define COM1 0
#define DATA_READY 0x100
#define SETTINGS ( 0x80 | 0x02 | 0x00 | 0x00) [color=Red][/color]/*here i think baudrate has to be changed , what is the code for 19200?
int main(void)
{
int in, out, status;
bioscom(0, SETTINGS, COM1); /*initialize the port*/
cprintf("Data sent to you: ");
while (1)
{
status = bioscom(3, 0, COM1); /*wait until get a data*/
if (status & DATA_READY)
if ((out = bioscom(2, 0, COM1) & 0x7F) != 0) /*input a data*/
putch(out);
if (kbhit())
{
if ((in = getch()) == 27) /* ASCII of Esc*/
break;
bioscom(1, in, COM1); /*output a data*/
}
}
return 0;
}


Comments

Sign In or Register to comment.