wwwbeck
Newbie level 2
I wrote a very simple code to detect RFID tag but i was only able to obtain first 16bits of the tag, the rest just does not show at all. I'm using PIC18F4455 chip and PIC CCS Compiler. I am hoping someone can help me out with this. Here is my code:
#include <18F4455.h>
#fuses HS,NOLVP,NOWDT,PUT
#include <stdlib.h>
#include <input.c>
#use delay(clock=20000000)
#use rs232 (baud=9600, xmit=PIN_C6, rcv=PIN_C7)
void main() {
char id_string[13];
char received;
int i;
while(TRUE)
{
if(kbhit()) //If there is data in the receive buffer
{
for(i=0; i<13; i++)
{
id_string=getc();
printf("Reading data %d..\n",i);
printf("Data == %d (In D)\n", id_string);
}
}
} //While True
#include <18F4455.h>
#fuses HS,NOLVP,NOWDT,PUT
#include <stdlib.h>
#include <input.c>
#use delay(clock=20000000)
#use rs232 (baud=9600, xmit=PIN_C6, rcv=PIN_C7)
void main() {
char id_string[13];
char received;
int i;
while(TRUE)
{
if(kbhit()) //If there is data in the receive buffer
{
for(i=0; i<13; i++)
{
id_string=getc();
printf("Reading data %d..\n",i);
printf("Data == %d (In D)\n", id_string);
}
}
} //While True