Wiegand26 conversion to hex

RFID reader, Reader/Writer, Tag.....

Wiegand26 conversion to hex

Postby Raj » Fri Aug 05, 2011 1:33 am

Hi! Cytron.I am currently doing RFID based projects using CCS Compiler.I have a
question.

In RFID tag, the serial number wiegand 26, for example 0003834274 058,33186
1) How we can change the wiegand number 058,33186 (decimal) to d37e5d (hex)?
Can you give clear explanation.

2)What does buffer means in c compiler? For example
if(buffer[2]==0xd3 && buffer[1]==0x7e && buffer[0]==0x5e) // if card 1 detected

Please reply as soon as possible.
Raj
Fledgling
 
Posts: 1
Joined: Fri Aug 05, 2011 12:58 am

Re: Wiegand26 conversion to hex

Postby robosang » Sun Aug 07, 2011 9:40 pm

OK, I am not Cytron staff, a lot of member here is not 8-)

1st, you need to know what is being received by MCU through weigand. OK, let's assume you get 05833186. Woh... want a clear explanation? Learn it by yourself. :lol: Most of us is helping volunteerly, please be polite. Now, answer this: How is 055833186 being store in MCU? Every value is being store with Binary number/value, there is no such thing as decimal or hexadecimal in digital system, it is the compiler that let human write in decimal or hexadecimal. So your question might be how to translate the value into ASCII hexadecimal value?

Buffer is simply name for a place (RAM) reserved to store variables, normally is few bytes to hundreds of bytes depends on the purpose. Sometime we call it heap :o

In the code you see, it is actually comparing/checking a few element of an array.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm


Return to RFID

Who is online

Users browsing this forum: No registered users and 5 guests

cron