1. Sistem minimum microcontroller termasuk LCD 16 x 2.
2. RFID Reader yang support ID-12 (ex : RFID Starter Kit)
3. RFID (transponder).
Source Code :
#include <mega16.h>
#include <delay.h>
#include <string.h>
// Alphanumeric LCD Module functions
#asm
.equ __lcd_port=0x15 ;PORTC
#endasm
#include <lcd.h>
// Standard Input/Output functions
#include <stdio.h>
// Declare your global variables here
int i=0;
char data[50],convert[50],gbg[50],temp;
void main(void)
{
// USART initialization
// Communication Parameters: 8 Data, 1 Stop, No Parity
// USART Receiver: On
// USART Transmitter: Off
// USART Mode: Asynchronous
// USART Baud Rate: 9600
UCSRA=0x00;
UCSRB=0x10;
UCSRC=0x86;
UBRRH=0x00;
UBRRL=0x47;
ACSR=0x80;
SFIOR=0x00;
lcd_init(16);
while (1)
{
i=0;
while(data[i]!=0x0A){
temp=getchar();
if(temp=='' || temp==0x0D || temp==0x0A|| temp==0x03)
break;
if(temp!=0x02){
i++;
data[i]=temp;
sprintf(gbg,"%c",temp);
strcat(convert,gbg);
}
}
lcd_gotoxy(0,0);
lcd_puts(convert);
};
}