CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

RFID 125khZ_PIC16F877a_Reder(4095)+tag em4102+tag t5557

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
quilong



Joined: 17 Sep 2009
Posts: 2

View user's profile Send private message Visit poster's website Yahoo Messenger

RFID 125khZ_PIC16F877a_Reder(4095)+tag em4102+tag t5557
PostPosted: Thu Nov 12, 2009 6:53 am     Reply with quote

I'm designing a circuit for reading tag em4102 and writing tag T5557(Atmel). But I have some problems.
The first, I use this code for reading tag em4102.


Code:
#include <16f877a.h>
#include <def_16f877a.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP,NOBROWNOUT,PUT
#include <em4095.c>  // Controls the reader IC
#include <em4102.c>  // Allows reading 4102 transponders
#use delay(clock=20000000)
#use  rs232(baud=9600,xmit=PIN_C6,rcv=PIN_C7)
int8 msg[32];

void main()
 {
 
  int8  customerCode;
  int32 tagNum;
  rf_init();  // Initialize the RF reader
  rf_powerUp();  // Power up the antenna
 
for(;;) {
  if(read_4102(msg)) {
     customerCode = msg[0];
      tagNum = make32(msg[1], msg[2], msg[3], msg[4]);
     printf(msg, "Customer Code: %u\n\r", customerCode);
      puts(msg);
      printf(msg, "Tag Number: %lu\n\n\r", tagNum);
     puts(msg);
     led=1;
     
    }
  }
}

If It read succesfully, I will get tag num and customer code and will be power up led. But It doesn't work. I thinks my hardware is correct. Somebody help me, pleaze.

Sad
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group