1) Can this RFID Reader work with PIC16F877A?
2) Did the reading can send to computer?
pikachuX WROTE:1) Can this RFID Reader work with PIC16F877A?
2) Did the reading can send to computer?
pikachuX WROTE:I currently is beginner for RFID.
Did any tutorial for RS232 send output to computer using PIC16877A?
uart_string("TEST");
uart_write(0x0D);
void uart_init(unsigned int baudrate)
{
TRISC7=1;
TRISC6=0;
#if defined (_16F877A)
TXSTA=0b00100000;
RCSTA=0b10010000;
if(baudrate<=38400){
BRGH=0;
SPBRG=(int)(_XTAL_FREQ/(64.0*baudrate)-1);}
else{
BRGH=1;
SPBRG=(int)(_XTAL_FREQ/(16.0*baudrate)-1);}
#endif
#if defined (_16F886) || (_16F887)
TXSTA=0b00100000;
RCSTA=0b10010000;
if(baudrate<=38400){
BRGH=0;
SPBRG=(int)(_XTAL_FREQ/(64.0*baudrate)-1);}
else{
BRGH=1;
SPBRG=(int)(_XTAL_FREQ/(16.0*baudrate)-1);}
BAUDCTL=0;
SPBRGH=0;
#endif
#if defined (_18F2550) || (_18F4550)
TXSTA=0b00100000;
RCSTA=0b10010000;
BAUDCON=0;
SPBRG=(int)(_XTAL_FREQ/(64.0*baudrate)-1);
#endif
}
void uart_write(char data)
{
while(TXIF==0) continue;
TXREG=data;
}
void uart_string(const char *s)
{
while(*s) uart_write(*s++);
}
pikachuX WROTE:Did the RFID Reader RS232 need the Max232 driver ? or Max232 driver already consist in RFID Reader RS232 itself?
Users browsing this forum: No registered users and 2 guests