You are on page 1of 10

Dept of EIE

PEC

Project Abstract

PONDICHERRY ENGINEERING COLLEGE

DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION ENGINEERING

ABSTRACT
For the project

Design and implementation of low cost electronic ticketing machine


By S.Alamelupriyanka (103179008) R.Muthulakshmi @ Suganya (103179092)

September - 2012

First review

Page 1

Dept of EIE

PEC

Project Abstract

Project domain: Embedded systems


ABSTRACT

The scope of our project is to upgrade the existing ticketing machine. Upgraded version is "The Electronic ticketing machine" using various technologies like the RFID, LCD touch screen display etc. The frequent users are given a RFID tag there by reducing the time consumption and automatically update his account. The touch screen facility enables the user to use it more efficiently. This project helps the society by enabling the ticket vendors to operate the machine more easily and efficiently.

First review

Page 2

Dept of EIE

PEC

Project Abstract

INTRODUCTION: This project deals about the upgraded version of conventional ticket issuing machine with additional features such as LCD touch screen, RFID etc. In this project we are trying to reduce the limitations of the conventional ticket issuing machine which is tabulated below.

COMPARISION OF EXISTING AND OUR ELECTRONIC TICKETING MACHINE:

SI.No

Existing ticketing machine

Our Electronic ticketing machine

1.

Uses 8/16 bit microcontroller

Uses 32 bit ARM based microcontroller LCD touch screen

2.

Has LCD or LED Display devices

3.

No additional features for frequent users Thermal printer with moderate speed Training for users needed

RFID tag for frequent users

4.

Thermal printer faster than conventional Training not necessary

5.

First review

Page 3

Dept of EIE

PEC

Project Abstract

BLOCK DIAGRAM:

HARDWARE USED:
1. LPC2148(arm core) 2. LCD touch screen module (ATFT320) 3. RFID reader (EDK 125) 4. Thermal printer 5. SD card

SOFTWARE USED:
1. Flash magic 2. keil

First review

Page 4

Dept of EIE

PEC

Project Abstract

WORK DONE SO FAR: For this project we selected the LPC2148 microcontroller for its multiple peripheral features such as SPI, UART and serial. We bought a A1 Micro panel thermal printer for printing the ticket. We interfaced the thermal printer with LPC2148 and printed the ticket template.

Pin diagram of LPC2148:

For interfacing the thermal printer we used the pins TXD0 (pin no : 19) and RXD0 (pin no: 21) for serial communication.

First review

Page 5

Dept of EIE

PEC

Project Abstract

PRINTER PROGRAM SOURCE CODE: HEADER FILE: #ifndef THERMALPRINTER_H #define THERMALPRINTER_H #include<lpc214x.h> #include<string.h> #define left 0x00 #define center 0x01 #define right 0x02 #define DoubleHeight 0x10 #define DoubleWidth 0x01 #define DoubleHightWidth 0x11 #define NoDoubleHeightWidth 0x10 //IO commands void setbit(char port,char bitno); void clrbit(char port,char bitno); int getpinstatus(char port,char bitno); void iodir(char port,char bitno,char io); //serial communication void initserial(void); void sendserial(unsigned char serdata); //Printer void displaystring(char a[],char b[],char c[],char d[]); void setHW(char a); void nextline(void); void printer(char a[]); ////send raw values void initprinter(void); //initialises printer void setBold(char a); ///a=0 BOLD off,, a=1 BOLD on void setPrintmode(char a);//(0,DELline,DW,DH,EMPHA,updown,Reverse) bit 1=on, 0=off void setAlignment(char a);//a=0 left align,a=1 center align,a=2 right align void setUnderline(char a);//a=0 Underline off, a=1 underline on void templates(void); #endif

First review

Page 6

Dept of EIE

PEC

Project Abstract

FUNCTIONS USED: #include "thermalprinter.h" #include<string.h> //serial communication void initserial(void) { VPBDIV = 0x02; PINSEL0 =0x00000005; U0LCR = 0x00000083; U0DLL = 0xC2; U0DLM = 0x00; U0LCR = 0x00000003; } void sendserial(unsigned char serdata) { int i; U0THR = serdata; while((U0LSR&0x20)==0); for(i=0;i<2000;i++); } //Printer void printer(char temp[]) { int i; for(i=0;temp[i]!='*';i++) sendserial(temp[i]); nextline(); } void setHW(char a) { char i,temp[]={0x1d,0x21}; // w,h for(i=0;i<2;i++) sendserial(temp[i]); sendserial(a); } void setBold(char a) { char i,temp[]={0x1B,0x45}; for(i=0;i<2;i++) sendserial(temp[i]); sendserial(a); }

First review

Page 7

Dept of EIE

PEC

Project Abstract

void setPrintmode(char a) { char i,temp[]={0x1B,0x21}; for(i=0;i<2;i++) sendserial(temp[i]); sendserial(a); } void setAlignment(char a) { char i,temp[]={0x1B,0x61}; for(i=0;i<2;i++) sendserial(temp[i]); sendserial(a); } void setUnderline(char a) { char i,temp[]={0x1B,0x2D}; for(i=0;i<2;i++) sendserial(temp[i]); sendserial(a); } void nextline() { sendserial(0x0a); } void initprinter() { char i,temp[]={0x1B,0x40}; for(i=0;i<2;i++) sendserial(temp[i]); } void displaystring(char a[],char b[],char c[],char d[]) { char temp[30]=""; strcat(temp,a); strcat(temp,b); strcat(temp,c); strcat(temp,d); strcat(temp,"*"); printer(temp); }
First review Page 8

Dept of EIE

PEC

Project Abstract

void templates(void) { char from[]="PONDY",to[]="PONDY"; char no[]="20",cost[]="100",date1[]="27/9/2012",date2[]="27/9/2012"; char l1[]="PONDICHERRY ENGINEERING*",l2[]="COLLEGE*",l31[]="FROM: ",l32[]=" NO: ",l41[]="TO: ",l42[]=" COST: ",l51[]="DATE: ",l52[]=" VALID UPTO: ",l6[]="THANK YOU!!!*"; setPrintmode(0); setAlignment(center);//center setHW(DoubleWidth); printer(l1); printer(l2); setHW(NoDoubleHeightWidth); setAlignment(left); displaystring(l31,from,l32,no); displaystring(l41,to,l42,cost); displaystring(l51," displaystring(date1," setAlignment(center); printer(l6); nextline(); nextline();} MAIN PROGRAM: #include "thermalprinter.h" int main(void) { initserial(); initprinter(); templates(); } //from place no: seats //to place cost amount

",l52,""); // date valid upto ",date2,""); //

First review

Page 9

Dept of EIE

PEC

Project Abstract

SAMPLE OUTPUT:

WORKS TO BE DONE: In our next phase we have to interface RFID with ARM microcontroller and develop source code for its working. CONCLUSION: In our project "Design and implementation of low cost ticketing machine" we interfaced the thermal printer with the micro controller and developed the source code for its working to obtain the desired output. In our upcoming phases we will interface the LCD touch screen and RFID with microcontroller which completes our project.

First review

Page 10

You might also like