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 support@ccsinfo.com

reading EM4150 (RFID) problem!!

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



Joined: 06 Feb 2006
Posts: 1

View user's profile Send private message

reading EM4150 (RFID) problem!!
PostPosted: Mon Feb 06, 2006 7:10 am     Reply with quote

Hi,
I've got the RFID development kit from CCS. Standard lib's are included to read (and write) the EM4150. But when i want to read the EM4150 with the command read_4150(msg, adress), I only get NAK-errors. When i write a word with te command write_4150(msg, adress): no errors. When I read the tag(EM4150) with another reader: I can read back what I wrote to it. So the problem is, why can I write something to the tag, but cann't read it (back)?

Anybody experience with this problem or some tips?

Josp
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Feb 06, 2006 11:52 am     Reply with quote

Quote:
But when i want to read the EM4150 with the command
read_4150(msg, adress), I only get NAK-errors


You're not calling the read function correctly. It expects a pointer
to the output value. So you need to put an '&' in front of your 'msg'
variable when you pass it to the function. Example:
Quote:

int32 msg;
int8 address;
int8 result;

address = 1; // Or whatever your address is.

result = read_4150( &msg, address);
Jsop
Guest







PostPosted: Tue Feb 07, 2006 6:07 am     Reply with quote

Yes that's what i've tried too. The function acceps two types of 'msg' to write the data.
1: an int8 msg[4];
2: an int32 msg;

I think that's not the problem. In my opinion the problem is that on my original purchased RFID reader board from CCS is a PIC16F876. And in all sample programs they use the PIC16F876a.
CCS has tested/made the example code and libs with the wrong PIC. So maybe it's an timing error.

Anyone experience with this?
Tips are also welcome!

Thanks in Advance!
Josp
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