View previous topic :: View next topic |
Author |
Message |
Josp
Joined: 06 Feb 2006 Posts: 1
|
reading EM4150 (RFID) problem!! |
Posted: Mon Feb 06, 2006 7:10 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Feb 06, 2006 11:52 am |
|
|
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); |
|
|
![](templates/subSilver/images/spacer.gif) |
Jsop Guest
|
|
Posted: Tue Feb 07, 2006 6:07 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
|