??? 02/14/07 11:07 Read: times |
#132886 - You need to clear my_byte[]! Responding to: ???'s previous message |
You need to clear my_byte[] before each card reading otherwise you will get the wrong data as bits from the previous reads are still in there. since you only shift 5 bits, there's still 3 bits left over from the last read. Also, the line: printf ("%c", my_byte[j]+48); //i add 48 to the char so that it would be a readable character why do you not put something like: printf("%c",my_byte[j] + '0'); or more simply putchar(my_byte[j] + '0'); |