Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Toll collection system using pic16f877a

Status
Not open for further replies.

Sunny55

Full Member level 3
Joined
Sep 15, 2012
Messages
159
Helped
12
Reputation
24
Reaction score
12
Trophy points
1,298
Activity points
2,404
Hi, i am new to PIC programming. I am doing a small project on "toll collection system" using PIC16F877A and Hi Tech C compiler.

I have think of the codes in the normal C language but does not know how to convert it into the Hi Tech C compiler language. I have also no idea on how to start writing the program. Can anyone help me please?

Thanks alot.
Sunny55
 

Hi internetuser2k12, thanks for your reply. The system works with the user pressing three switches which indicates three entry locations.

When a user presses a switch, it will also ask the user to enter the card amount and then the system will display the distance travelled, total fee to pay and also the calculates and displays the card's balance after the payment.

After the payment is done, a green LED will turn on indicating that the driver can leave the toll.
 

Hi internetuser2k12, thanks for your reply. The system works with the user pressing three switches which indicates three entry locations.

When a user presses a switch, it will also ask the user to enter the card amount and then the system will display the distance travelled, total fee to pay and also the calculates and displays the card's balance after the payment.

After the payment is done, a green LED will turn on indicating that the driver can leave the toll.

How does the card amount entered? with 3 buttons or keypad? Does it includes a card reader?

Which PIC do you want to use? Post your code.
 
Last edited:

you can implement a toll collection system using RFID tag Reader,RTCDS1307 and LCD16x2.
 

Hi, I am replacing RFID reader using three switches.

- - - Updated - - -

Hi all, the card amount is entered using the keypad. The card reader is replaced by the use of the three buttons.

Regarding the code, i do not know how to write the coding but i have the idea.

First, LCD display ("please press a switch"); - Switch 1 : location 1, switch 2: location 2, switch 3:location 3

example: if user presses switch 1: he entered the highway from location 1.

Then, printf ( "pls enter card amount:"); - to ask user for card amount.(using keypad)

// If fee is $20 and user enters $30, balance is calculated ($10) and display
else if fee is $20 and user enter $10, printf( " pls top up card");

The toll rate for location 1 is $30, location 2: $20 location 3: $15

Then
printf( " the distance travelled is:);
printf( " the total fee is :);
printf("the card balance is:);
the green light turns on; - toll paid.
else
red light on - indicating error.

I hope you can understand my idea. Thanks.
 

printf( " the distance travelled is:); cannot be printed on lcd. It is more than one line. Do you want to use PIC16F877A and 20X4 LCD? or do you want to use 40X4 LCD?
 
Last edited:

Hi, i think we can just print("distance:"); . I am using PIC16F877A and 2x16 LCD display. Thanks.
 

Hi, i think we can just print("distance:"); . I am using PIC16F877A and 2x16 LCD display. Thanks.

Hello!

How can you print 3 lines in 16X2 display. you have these 3 lines

printf( " the distance travelled is:);
printf( " the total fee is :);
printf("the card balance is:);

Can you use this circuit?
 

Attachments

  • ss17.jpg
    ss17.jpg
    224.2 KB · Views: 101
Last edited:

What are the 3 distances?

- - - Updated - - -

What are the 3 distances?
 

Hello!

How can you print 3 lines in 16X2 display. you have these 3 lines

printf( " the distance travelled is:);
printf( " the total fee is :);
printf("the card balance is:);

Can you use this circuit?

Hi internetuser2k12, thanks for the circuit provided. The keypad i am using is a 4X4 keypad. Could you provide me with the complete Hi Tech C compiler coding please?

The three distance are as follows:

Example: Distance from location 1 to destination 1: 70KM, Distance from location 2 to destination 2: 50KM, Distance from location 3 to destination 3: 30KM.
 

I haven't used Hi Tech C much. I don't know how to code lcd routine in Hi Tech C. Can you tell me how to do that. I use mikroC. In that you won't get code for LCD routines. It is a hidden library. There is no 4X4 keypad in proteus so I am using 4X3 keypad, but I will code for 4X4 keypad. why do you need 4X4 keypad. What does the keys do? each key.
 

The program in mikroC and the 4X3 keypad should be fine. Could you provide me with the complete program code using mikroC please?

Thanks alot
Sunny55.
 

The program in mikroC and the 4X3 keypad should be fine. Could you provide me with the complete program code using mikroC please?

Thanks alot
Sunny55.

Do you want to use 4X4 keypad. What are the 16 buttons represent?
 

Hi internetuser2k12 , i found this page: https://www.edaboard.com/threads/21885/
We can learn from the codes here too.

- - - Updated - - -

Do you want to use 4X4 keypad. What are the 16 buttons represent?

Hi, Yes, i would like to use the 4X4 keypad. The 4X4 keypad is used to enter the digits like when the system asks for the card amount, the user will enter the amount by pressing the numbers on the keypad.
 

0-9 is enough. why do you need 4X4. what are the other 6 buttons do?

I have written some code, but my compiler is creating wrong hex files. Can you compile the code in mikroC and simulate it in proteus?

Can you use 20X4 LCD?
 

I have a 4X4 keypad but i can just provide the connections for running the digits.
Yes, Can i have the codes please?

For the LCD display, i only have a 16X2 LCD display.
 

I have a 4X4 keypad but i can just provide the connections for running the digits.
Yes, Can i have the codes please?

For the LCD display, i only have a 16X2 LCD display.

I wrote a code but its not working properly. I will write a new code from scratch. Please wait.
 

Hi internetuser2k12, is the code ready ? I would like to test it with my circuit. Thanks alot.
 

Hi internetuser2k12, is the code ready ? I would like to test it with my circuit. Thanks alot.

Ther is a small problem. Do you want the enter key to be pressed after entering the amount so that the amount gets registered?

- - - Updated - - -

Hi internetuser2k12, is the code ready ? I would like to test it with my circuit. Thanks alot.

There is a small problem. Do you want the enter key to be pressed after entering the amount so that the amount gets registered?

Also tell me the values of the keys. 0-9 is used for 0-9 but the other 6 buttons?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top