Beruflich Dokumente
Kultur Dokumente
OF
BACHELOR OF TECHNOLOGY
IN
ELECTRONICS AND COMMUNICATION ENGINEERING
BY
Aditya Pandey (09104003)
Bikesh Chaudhary (09104012)
Ram Prakash Gupta (09104067)
CERTIFICATE
We hereby certify that the work presented in this report entitled ‘Electronic Toll
Collection System Based on RFID Technology’ in partial fulfillment of the
requirements for the award of the degree of Bachelor of Technology in
Electronics and Communication Engineering at Dr B R Ambedkar National
Institute of Technology, Jalandhar, is a record of our work carried out during
2012-2013 under the supervision of Dr B S Saini.
We have not submitted the matter embodied in this report to any other
University or Institute for the award of any other degree.
This is to certify that the above statement made by the candidates is correct to
the best of my knowledge.
Signature of Supervisor:
Name of Supervisor: Dr B S Saini
Designation : Associate Professor
Date :
I
ACKNOWLEDGEMENT
We are also thankful to Dr R K Sunkaria and all the other staff members of our
department for their kind co-operation and suggestions for improvements in the
project.
We would like to express our deep appreciation towards our classmates for
providing us the necessary suggestions in our project and a cordial environment.
II
ABSTRACT
Our project is development of electronic toll collection (ETC) system using radio
frequency identification (RFID) technology. Research on ETC has been around
since 1992, during which RFID tags began to be widely used in vehicles to
automate toll processes. The proposed RFID system uses tags that are mounted
on the windshields of vehicles, through which information embedded on the tags
are read by RFID readers. The proposed system eliminates the need for motorists
and toll authorities to manually perform ticket payments and toll fee collections,
respectively. Data information are also easily exchanged between the motorists
and toll authorities, thereby enabling a more efficient toll collection by reducing
traffic and eliminating possible human errors.
III
LIST OF FIGURES
IV
INDEX
PAGE NO.
CERTIFICATE I
ACKNOWLEDGEMENT II
ABSTRACT III
LIST OF FIGURES IV
1. INTRODUCTION 1
2. PROJECT OVERVIEW 5
2.1PROBLEM DEFINITION 5
2.2 MOTIVATION 5
2.3 WHY RFID 6
2.4 FLOW CHART 7
2.5 TOOLS USED 8
3. HARDWARE 10
3.1 RFID 10
3.1.1 DIAGRAM OF RFID 10
3.1.2 RFID READER PROTOCOL 11
3.1.3 RFID MODULE 11
3.1.4 APPLICATION CIRCUIT 13
3.1.5 TYPES OF RFID TAGS 14
3.1.6 POWERING OF RFID TAG 15
3.1.7 OPERATING FREQUENCY 16
3.2 MICROCONTROLLER 17
3.2.1 ITRODUCTION TO ARM MICROCONTROLLER 17
3.2.2 LPC 2148 18
3.2.3 FEATURES OF LPC 2148 18
3.2.4 PIN DIAGRAM 19
3.2.5 ARCHITECTURE 20
3.2.6 BLUE BOARD LPC 2148 21
3.3 MOTORS 22
3.3.1 TYPES OF MOTOR 22
3.3.2 SERVO MOTOR 23
3.3.3 SERVO MOTOR WITH MOTOR DRIVER 24
4. CONCLUSION 26
REFERENCES 28
APPENDIX I 29
APPENDIX II 30
ETC System Based on RFID Technology
CHAPTER 1 : INTRODUCTION
1
ETC System Based on RFID Technology
2. Vehicle Classification
3. Transaction Processing
Once the vehicle is identified, the toll charges need to be billed to the user
and the toll collected passed to the toll concessionaire. The ETC system has
to handle this financial transaction in a reliable and secure manner.
4. Violation Enforcement
This system needs to detect and manage cases of a vehicles passes through
an ETC lane without a valid Tag or insufficient funds in its account. Violator
detection and handling is essential for the success of an ETC system –
without policies and systems in place for this, an ETC system will simply
not work.
2
ETC System Based on RFID Technology
For Government/Society:
1. Savings on fuel and reduction of emissions from idling and repeated stops
for vehicles.
2. Improves transparency of toll transactions.
3. Reduces revenue leakages.
Thus, the ETC system is a win-win situation for both the motorists and toll
operators, which is why it is now being extensively used throughout the world
ETC system commonly utilizes radio frequency identification (RFID) technology.
In this case, the OBU does not have internal power source, like a battery. Instead, it
gets power from the reader. The Reader sends out electromagnetic waves to the
OBU and the antenna induces the energy to power the ICs.
In this case, two way communications between OBUs and Road Side Units /
Infrastructure is possible. Active OBU has an internal power source, usually a
battery. The OBU use the power to work the IC and broadcasts a signal to the
reader continuously. It is normally used for long distance communication.
3
ETC System Based on RFID Technology
There are generally three types of RFID tags: active RFID tags, which contain a
battery and can transmit signals autonomously, passive RFID tags, which have no
battery and require an external source to provoke signal transmission, and battery
assisted passive(BAP) RFID tags, which require an external source to „wake up‟
but have significantly higher read range.
It is being used in Germany for commercial vehicle tolling. The location of the
vehicle is tracked using GPS receivers which transmit the information to the
control centre using GSM networks for calculation of toll.
This type of tolling eliminates the need of toll plaza infrastructure along highways.
However, enforcement of violated vehicle is a great challenge
In this system, images of the license plates of all vehicles are captured. These are
compared with the database of the license plate of the subscribers. This system
requires a robust system. They are less effective in foggy condition.
4
ETC System Based on RFID Technology
2.2 MOTIVATION
Figure 2.1 : Delhi- Gurgaon Toll Plaza during a Morning Rush Hour
Example can be taken of Delhi-Gurgaon Toll Plaza, where few months ago they
had to stop toll collection for few days due to unmanageable congestion.
6
ETC System Based on RFID Technology
Signal
Processing • Gate Arm Motor
• Tag Control
• Microcontroller
• Reader • Traffic Lights Control
• Database (PC)
RFID Control
7
ETC System Based on RFID Technology
The Keil products from ARM include C/C++ compilers, debuggers, integrated
environments, RTOS, simulation models, and evaluation boards for ARM ,
Cortex-M, Cortex-R and LPC214x processor families. It supports every level of
software developer from the professional applications engineer to the student
just learning about embedded software development
ARES PCB Layout - PCB design system with automatic component placer,
rip-up and retry auto-router and interactive design rule checking.
System Benefits Integrated package with common user interface and fully
context sensitive help.
3. FLASH MAGIC
Flash Magic is a tool which used to program hex code in EEPROM of micro-
controller. It is a freeware tool. It only supports the micro-controller of Philips and
NXP. We can burn a hex code into those controllers which supports ISP (in
system programming) feature. If your device supports ISP then you can easily burn
a hex code into EEPROM of your device.
8
ETC System Based on RFID Technology
It supports several chips like ARM Cortex M0, M3, M4, ARM7 and 8051. It
uses Serial
or Ethernet protocol to program the flash of device.
4. HYPER TERMINAL
Hyper terminal is used for data communication via serial port com or TCP/IP
Winsock. HyperTerminal can be used to set up a dial-up connection to another
computer through the internal modem using Telnet or to access a bulletin board
service (BBS) in another computer. It can also be used to set up a connection for
data transfer between two computers (such as your desktop computer and a
portable computer) using the serial ports and for serial-port control of external
devices or systems such as scientific instruments, robots, or radio communications
stations. HyperTerminal can also be used as a troubleshooting tool when setting up
and using a modem. We can send commands through hyper terminal to make sure
that our modem is connected properly.
9
ETC System Based on RFID Technology
CHAPTER 3 : HARDWARE
10
ETC System Based on RFID Technology
11
ETC System Based on RFID Technology
EM-18 module is a 9 pin device which works on the protocol of ISO 18000-
6C which is best suitable for Indian context.
We supply a highly rectified power voltage of 5V to the RFID to avoid any
kind of error in signal reading.
After each and every read, the module notify with a buzzer beep and a LED
glow on a successful read.
12
ETC System Based on RFID Technology
13
ETC System Based on RFID Technology
Figure 3.6 : Interfacing EM-18 Reader module with Serial DB9 Port
Active Tags
Battery powered
Higher storage capacities (512 KB)
Longer read range (300 feet)
Typically can be re-written by RF Interrogators
Cost around 50 to 250 dollars
Passive Tags
Do not require power – Draws from Interrogator Field
Lower storage capacities (few bits to 1 KB)
Shorter read ranges (4 inches to 15 feet)
Usually Write-Once-Read-Many/Read-Only tags
Cost around 25 cents to few dollars
14
ETC System Based on RFID Technology
1. Inductive Coupling
In terms of operation, inductive coupling is the transfer of energy from one circuit
to another via the mutual inductance between the two circuits. For RFID inductive
coupling to be used, both the tag and the reader will have induction or "antenna"
coils. When the tag is placed close enough to the reader the field from the reader
coil will couple to the coil from the tag. A voltage will be induced in the tag that
will be rectified and used to power the tag circuitry
RFID inductive coupling is normally used on the lower RFID frequencies - often
LF, i.e. below 135 kHz or at 13.56 MHz. This type of powering of RFID tag is
used for short range RFID device.
15
ETC System Based on RFID Technology
2. Propagation Coupling:
This technique for powering of RFID tag is used for long range of RFID device.
RFID device work on different range of frequency from 125 KHz to 5.8 GHz.
Selection of operating range is decided on the basis of application and
requirement. For the purpose of Electronic toll collection system we need a
bandwidth of 868 MHz to 915 MHz which falls in the category of Ultra High
Frequency bandwidth. This BW is suitable for Indian context as this frequency is
highly power and cost efficient.
16
ETC System Based on RFID Technology
UHF Microwave
Frequency LF HF
868 - 915 2.45 GHz &
Ranges 125 KHz 13.56 MHz
MHz 5.8 GHz
Typical Max
Shortest Short Medium Longest
Read Range 1”-12” 2”-24” 1‟-10‟ 1‟-15‟
(Passive Tags)
Active tags with
Generally passive Active tags with
integral battery
Generally passive tags only, using integral battery or
Tag Power tags only, using inductive or
or passive tags
passive tags using
Source using capacitive
inductive coupling capacitive capacitive storage,
storage,
coupling E-field coupling
E-field coupling
Data Rate Slower Moderate Fast Faster
Ability to read
near Better Moderate Poor Worse
metal or wet
surfaces
Access Control &
Security
Identifying widgets Highway toll Tags
Library books supply chain
through Identification of
Laundry tracking
manufacturing private vehicle
Applications processes or in
identification Highway toll
fleets in/out of a
Access Control Tags
harsh environments yard or facility
Employee IDs
Ranch animal Asset tracking
identification
Employee IDs
3.2 Microcontroller
A microcontroller (sometimes abbreviated µC, uC or MCU) is a small
computer on a single integrated circuit containing a processor core, memory,
and programmable input/output peripherals.
18
ETC System Based on RFID Technology
19
ETC System Based on RFID Technology
20
ETC System Based on RFID Technology
21
ETC System Based on RFID Technology
3.3 MOTORS:
22
ETC System Based on RFID Technology
Servos are controlled by sending them a pulse of variable width. The control wire
is used to send this pulse. The parameters for this pulse are that it has a minimum
pulse, a maximum pulse, and a repetition rate. Given the rotation constraints of the
servo, neutral is defined to be the position where the servo has exactly the same
amount of potential rotation in the clockwise direction as it does in the counter
clockwise direction. It is important to note that different servos will have different
constraints on their rotation but they all have a neutral position, and that position is
always around 1.5 milliseconds(ms).
To control the speed of the servo, the switches are open and close at different rates
in order to apply average voltages across the motor. The angle is determined by the
duration of a pulse that is applied to the control wire. This is called Pulse Width
Modulation. The servo expects to see a pulse every20ms. The length of the pulse
will determine how far the motor turns. For example, a 1.5ms pulse will make the
motor turn to the 90 degree position (neutral position).
When these servos are commanded to move, it will move to the position and hold
that position. If an external force pushes against the servo while the servo is
holding a position, the servo will resist from moving out of that position. The
maximum amount of force the servo can exert is the torque rating of the servo.
Servos will not hold their position forever though; the position pulse must be
repeated to instruct the servo to stay in position.
When a pulse is sent to a servo that is less than 1.5ms, the servo rotates to a
position and holds its output shaft by some number of degrees counter clockwise
from the neutral point. When the pulse is wider than 1.5ms the opposite occurs.
The minimal width and the maximum width of pulse that will command the servo
to turn to a valid position are functions of each servo. Different brands, and even
different servos of the same brand, will have different maximum and minimums.
23
ETC System Based on RFID Technology
Generally, the minimum pulse will be about 1ms wide and the maximum pulse will
be 2ms wide.
24
ETC System Based on RFID Technology
25
ETC System Based on RFID Technology
CONCLUSION
Passive RFID based is adequate for ETC in India. The advantages of this
technology in terms of cost and simplicity make it usable for the Indian
environment.
Within passive RFID there are multiple standards. To ensure that multiple
suppliers can provide the tags as well as readers, and that tags produced by one
producer can be read by all the readers, the standards have to be fixed. Passive
RFID based on EPC, Gen-2, ISO 18000-6C Standards for Electronic Toll
Collection on national Highways in India should be used.
26
ETC System Based on RFID Technology
4-Lane - 22.3%
2-Lane - 52.3%
27
ETC System Based on RFID Technology
REFERENCES
28
ETC System Based on RFID Technology
Appendix I
ETC System Algorithm
29
ETC System Based on RFID Technology
Appendix II
KEIL µVISION CODE
/*********************************************************************
*/
/* LPC214X.H: Header file for Philips LPC2141/42/44/46/48
*/
/*********************************************************************
**/
#ifndef __LPC214x_H
#define __LPC214x_H
/* VPB Divider */
30
ETC System Based on RFID Technology
/* Reset */
#define RSID (*((volatile unsigned char *) 0xE01FC180))
/* Timer 0 */
#define T0IR (*((volatile unsigned long *) 0xE0004000))
#define T0TCR (*((volatile unsigned long *) 0xE0004004))
#define T0TC (*((volatile unsigned long *) 0xE0004008))
#define T0PR (*((volatile unsigned long *) 0xE000400C))
#define T0PC (*((volatile unsigned long *) 0xE0004010))
#define T0MCR (*((volatile unsigned long *) 0xE0004014))
#define T0MR0 (*((volatile unsigned long *) 0xE0004018))
#define T0MR1 (*((volatile unsigned long *) 0xE000401C))
#define T0MR2 (*((volatile unsigned long *) 0xE0004020))
#define T0MR3 (*((volatile unsigned long *) 0xE0004024))
#define T0CCR (*((volatile unsigned long *) 0xE0004028))
#define T0CR0 (*((volatile unsigned long *) 0xE000402C))
#define T0CR1 (*((volatile unsigned long *) 0xE0004030))
#define T0CR2 (*((volatile unsigned long *) 0xE0004034))
#define T0CR3 (*((volatile unsigned long *) 0xE0004038))
#define T0EMR (*((volatile unsigned long *) 0xE000403C))
#define T0CTCR (*((volatile unsigned long *) 0xE0004070))
/* Timer 1 */
#define T1IR (*((volatile unsigned long *) 0xE0008000))
#define T1TCR (*((volatile unsigned long *) 0xE0008004))
#define T1TC (*((volatile unsigned long *) 0xE0008008))
#define T1PR (*((volatile unsigned long *) 0xE000800C))
#define T1PC (*((volatile unsigned long *) 0xE0008010))
#define T1MCR (*((volatile unsigned long *) 0xE0008014))
#define T1MR0 (*((volatile unsigned long *) 0xE0008018))
#define T1MR1 (*((volatile unsigned long *) 0xE000801C))
#define T1MR2 (*((volatile unsigned long *) 0xE0008020))
#define T1MR3 (*((volatile unsigned long *) 0xE0008024))
#define T1CCR (*((volatile unsigned long *) 0xE0008028))
#define T1CR0 (*((volatile unsigned long *) 0xE000802C))
#define T1CR1 (*((volatile unsigned long *) 0xE0008030))
#define T1CR2 (*((volatile unsigned long *) 0xE0008034))
#define T1CR3 (*((volatile unsigned long *) 0xE0008038))
#define T1EMR (*((volatile unsigned long *) 0xE000803C))
#define T1CTCR (*((volatile unsigned long *) 0xE0008070))
31
ETC System Based on RFID Technology
#endif // __LPC214x_H
32
ETC System Based on RFID Technology
/**********************************************************/
/* Name : main.c */
/******************************************************/
/**********************************************************/
33
ETC System Based on RFID Technology
/* Name : PWM_motor.c */
/******************************************************/
#include <LPC214X.h>
34
ETC System Based on RFID Technology
IO0SET = LED;
timer0_MCR0(m*a);
IO0CLR = LED;
timer0_MCR0((200-a)*m);
}
timer1_MCR1(m*10000);
break;
case 1: //Motor DOWN
a=17;
for(i=0;i<200;i++)
{
IO0SET = LED;
timer0_MCR0(m*a);
IO0CLR = LED;
timer0_MCR0((200-a)*m);
}
break;
}
/**********************************************************/
/* Name : db.c */
/******************************************************/
#include<LPC214x.h>
#include "PWM_motor.c"
#include "lcd.h"
#include "Serial.h"
int M[3][3]={{1,3000,300},{2,200,200},{3,50,150}};
void database(int x)
{
char buf[16] = {0};
//buf[16] = {0};
//M[3][3]=
if(M[x][1]>=M[x][2])
{
M[x][1]=M[x][1]-M[x][2];
//motor_up();
timer_init(0);
sprintf((char *)buf, "BALANCE : %i ",
M[x][1]);
35
ETC System Based on RFID Technology
/**********************************************************/
/* Name : Serial.h */
/******************************************************/
int uart0_getkey(void);
int uart1_getkey(void);
void uart1_init (void);
void uart0_init (void);
void uart1_putc (char);
void uart0_putc (char);
void uart1_puts (char *);
void uart0_puts (char *);
/**********************************************************/
/* Name : Serial.c */
/******************************************************/
36
ETC System Based on RFID Technology
#define CR 0x0D
if (ch == '\n') {
while (!(U1LSR & 0x20));
U1THR = CR; /* output CR */
}
while (!(U1LSR & 0x20));
return (U1THR = ch);
}
return (U0RBR);
}
return (U1RBR);
}
void uart1_init()
{
/* initialize the serial interface */
PINSEL0 = (PINSEL0 & ~(3 << 16)) | (1 << 16);
PINSEL0 = (PINSEL0 & ~(3 << 18)) | (1 << 18);
//PINSEL0 = 0x00050000; /* Enable RxD1 and TxD1
*/
U1LCR = 0x83; /* 8 bits, no Parity, 1 Stop bit
*/
U1DLM = 1;
U1DLL = 134; /* 9600 Baud Rate @ 15MHz VPB
Clock <97 @ 15MHz> <78 @ 12MHz> */
//U1ACR = 0x05;
U1LCR = 0x03; /* DLAB = 0
*/
37
ETC System Based on RFID Technology
}
/***************************************************************/
/****Function for send character 1 time via UART1****/
/***************************************************************/
void uart1_putc(char c)
{
while(!(U1LSR & 0x20)); // Wait until UART1 ready to send
character
U1THR = c; // Send character
}
/***************************************************************/
/*********Function for send string via UART1*******/
/***************************************************************/
void uart1_puts(char *p)
{
while(*p) // Point to character
{
uart1_putc(*p++); // Send character then point to next
character
}
}
/***************************************************************/
/**********Function for Initial UART0 ******/
/***************************************************************/
void uart0_init()
{
/* initialize the serial interface */
PINSEL0 = (PINSEL0 & ~(3 << 0)) | (1 << 0);
PINSEL0 = (PINSEL0 & ~(3 << 2)) | (1 << 2);
//PINSEL0 = 0x00000005; /* Enable RxD0 and TxD0
*/
U0LCR = 0x83; /* 8 bits, no Parity, 1 Stop bit
*/
U0DLM = 1;
U0DLL = 134; /* 9600 Baud Rate @ 15MHz VPB
Clock */
U0LCR = 0x03; /* DLAB = 0
*/
}
/***************************************************************/
/*****Function for send character 1 time via UART0********/
/***************************************************************/
void uart0_putc(char c)
{
while(!(U0LSR & 0x20)); // Wait until UART0 ready to send
character
U0THR = c; // Send character
}
/***************************************************************/
/************** Function for send string via UART1******/
38
ETC System Based on RFID Technology
/***************************************************************/
void uart0_puts(char *p)
{
while(*p) // Point to character
{
uart0_putc(*p++); // Send character then point to next
character
}
}
/**********************************************************/
/* Name : lcd.h */
/******************************************************/
#ifndef _LCD_H
#define _LCD_H
#define MAX_CHAR_IN_ONE_LINE 16
enum ROW_NUMBERS
{
LINE1,
LINE2
};
void init_lcd(void);
void lcd_putstring(unsigned char line, char *string);
void lcd_clear(void);
void lcd_backlight_on(void);
int lcd_gotoxy(unsigned int x, unsigned int y);
void lcd_putchar(int c);
#endif
/**********************************************************/
/* Name : lcd.c */
/******************************************************/
39
ETC System Based on RFID Technology
/**
**********************************************************************
****
****
Function Name : delay()
**********************************************************************
*********
*/
void delay(int count)
{
int j=0,i=0;
for(j=0;j<count;j++)
{
/* At 60Mhz, the below loop introduces
delay of 10 us */
for(i=0;i<35;i++);
}
}
/**
**********************************************************************
**********************
Function Name : wait_lcd()
**********************************************************************
**********************
*/
void wait_lcd( void )
{
LCD_CTRL_CLR |= LCDRS;
40
ETC System Based on RFID Technology
delay(100);
}
/**
**********************************************************************
**********************
Function Name : lcd_command_write()
**********************************************************************
**********************
*/
void lcd_command_write( unsigned char command )
{
unsigned char temp=0;
unsigned int temp1=0;
temp=command;
temp=(temp>>4)&0x0F;
temp1=(temp<<10)&LCD_DATA_MASK;
LCD_CTRL_CLR = LCDRS;
LCD_CTRL_SET = LCDEN;
LCD_DATA_CLR = LCD_DATA_MASK;
LCD_DATA_SET = temp1;
delay(10000);
LCD_CTRL_CLR = LCDEN;
temp=command;
temp&=0x0F;
temp1=(temp<<10)&LCD_DATA_MASK;
delay(100*2);
LCD_CTRL_CLR |= LCDRS;
LCD_CTRL_SET |= LCDEN;
LCD_DATA_CLR = LCD_DATA_MASK;
LCD_DATA_SET = temp1;
delay(10000);
LCD_CTRL_CLR |= LCDEN;
wait_lcd();
}
/**
**********************************************************************
**********************
Function Name : set_lcd_port_output()
41
ETC System Based on RFID Technology
**********************************************************************
**********************
*/
void set_lcd_port_output( void )
{
LCD_CTRL_DIR |= ( LCDEN | LCDRS | LCDRW );
LCD_CTRL_CLR |= ( LCDEN | LCDRS | LCDRW );
LCD_DATA_DIR |= LCD_DATA_MASK;
}
/* *
**********************************************************************
**********************
Function Name : lcd_clear()
**********************************************************************
**********************
*/
void lcd_clear( void)
{
lcd_command_write( 0x01 );
}
/**
**********************************************************************
**********************
Function Name : lcd_gotoxy()
**********************************************************************
**********************
*/
int lcd_gotoxy( unsigned int x, unsigned int y)
{
int retval = 0;
/**
**********************************************************************
**********************
42
ETC System Based on RFID Technology
**********************************************************************
**********************
*/
void lcd_data_write( unsigned char data )
{
unsigned char temp=0;
unsigned int temp1=0;
temp=data;
temp=(temp>>4)&0x0F;
temp1=(temp<<10)&LCD_DATA_MASK;
LCD_CTRL_SET |= LCDEN|LCDRS;
LCD_DATA_CLR = LCD_DATA_MASK;
LCD_DATA_SET = temp1;
LCD_CTRL_CLR |= LCDEN;
temp=data;
temp&=0x0F;
temp1=(temp<<10)&LCD_DATA_MASK;
LCD_CTRL_SET |= LCDEN|LCDRS;
LCD_DATA_CLR = LCD_DATA_MASK;
LCD_DATA_SET = temp1;
LCD_CTRL_CLR |= LCDEN;
wait_lcd();
}
/**
**********************************************************************
**********************
Function Name : lcd_putchar()
**********************************************************************
**********************
*/
void lcd_putchar( int c )
{
lcd_data_write( c );
}
/**
**********************************************************************
**********************
Function Name : lcd_putstring()
**********************************************************************
**********************
*/
void lcd_putstring( unsigned char line, char *string )
{
43
ETC System Based on RFID Technology
lcd_gotoxy( line, 0 );
while(*string != '\0' && len--)
{
lcd_putchar( *string );
string++;
}
}
/**
**********************************************************************
**********************
Function Name : lcd_backlight_on()
**********************************************************************
**********************
*/
void lcd_backlight_on()
{
LCD_BACK_LIGHT_DIR |= LCD_BACKLIGHT;
LCD_BACK_LIGHT_SET |= LCD_BACKLIGHT;
}
/**
**********************************************************************
**********************
Function Name : turn_off_lcd_back_light()
**********************************************************************
**********************
*/
void turn_off_lcd_back_light_cb(void)
{
LCD_BACK_LIGHT_DIR |= LCD_BACKLIGHT;
LCD_BACK_LIGHT_CLR |= LCD_BACKLIGHT;
}
/**
**********************************************************************
**********************
Function Name : init_lcd()
**********************************************************************
**********************
*/
void init_lcd( void )
{
set_lcd_port_output();
delay(100*100);
lcd_command_write(0x28); /* 4-bit interface, two line, 5X7
dots. */
44
ETC System Based on RFID Technology
45