RFID interfacing with atmega162
Discussion in "Project Help" started by naqirizvi Jan 29, 2015.
Thu Jan 29 2015, 07:20 pm
Hi,
I am new to programming got some issues in RFID interfacing
I am getting garbage on my lcd when i show card to reader.
Below is the shematic that i follow , i have created it on my own,I am not sure is it right or wrong.
I would be more thankful if any one could tell me the solution.
I am not sure should I use MAX232 or not?
specigication:
ATMEGA162
RFID 125Khz - RDM6300
Data sheet http://www.seeedstudio.com/depot/datasheet/RDM630-Spec..pdf
For mirocontroller coding I have followed ELECTRONICS GARAGE project
http://www.engineersgarage.com/embedded/avr-microcontroller-projects/rfid-interfacing-circuit
Coding I used for RFID.
#define F_CPU 12000000UL #define USART_BAUDRATE 9600 #define BAUD_PRESCALE (((F_CPU / (USART_BAUDRATE * 16UL))) - 1) main(){ while(1) { getcard_id(); // Function to get RFID card no. from serial port LCD_cmd(0xC0); // to go in second line and zeroth position on LCD LCD_display(); // a function to write RFID card no. on LCD } return 0; } void usart_init() { UCSRB |= (1 << RXEN) | (1 << TXEN); // Turn on the transmission and reception circuitry UCSRC |= (1 << URSEL) | (1<<USBS) | (1 << UCSZ0) | (1 << UCSZ1); // Use 8-bit character sizes UBRRL = BAUD_PRESCALE; // Load lower 8-bits of the baud rate value.. // into the low byte of the UBRR register UBRRH = (BAUD_PRESCALE > > 8); // Load upper 8-bits of the baud rate value.. // into the high byte of the UBRR register } unsigned int usart_getch() { while ((UCSRA & (1 << RXC)) == 0); // Do nothing until data have been received.. // and is ready to be read from UDR return(UDR); // return the byte }
Fri Jan 30 2015, 12:15 am
@naqirizvi
As you already have a thread running I think it best to lock, then remove this thread.
Please re-post in the other thread.
We need to know which RFID reader you have.
The RDM6300 needs a RS232 converter, the RDM630 does not.
*Do not* use a MAX232 with a RDM630
As you already have a thread running I think it best to lock, then remove this thread.
Please re-post in the other thread.
We need to know which RFID reader you have.
The RDM6300 needs a RS232 converter, the RDM630 does not.
*Do not* use a MAX232 with a RDM630
Wed Feb 04 2015, 10:49 am
I dont know why thread was closed, I reopened it.
For connecting RMD630 to controller you dont need MAX232. rest looks ok.. make sure you did not damage your controller connecting Max232 with it. I recommend replace your controller, remove max232 and then try reading card again.
For connecting RMD630 to controller you dont need MAX232. rest looks ok.. make sure you did not damage your controller connecting Max232 with it. I recommend replace your controller, remove max232 and then try reading card again.
Powered by e107 Forum System