Discussion in "Project Addition or Changes" started by    wiresolder    Mar 7, 2015.
Sat Mar 07 2015, 04:37 AM
#1
Hello!

I am tinkering with a hobby project of 8051 toll plaza here:
engineersgarage.com/microcontroller/8051projects/simple-toll-plaza-rfid-interface-at89c51-circuit.

Where should I add the code to control a dc motor after the main code executes?

here's the code: http://textdump.net/read/6881/

Best Regards,
Sat Mar 07 2015, 06:06 AM
#2
You can add it anywhere inside this loop:
if(tool==0)
{
	// You can add it here...
	lcd_string("Thank you User ");
	lcd_command(0x8F);
	lcd_data(49+i);
	delay(250);
	lcd_command(0x01);
	lcd_string("Charges 10.00");
	amount[i]=amount[i]-10;
	lcd_command(0xC0);
	lcd_string("Amt left  ");
	balance=amount[i];
	lcd_display(balance);
	lcd_command(0xCD);
	lcd_string(".00");
	// or anywhere above this comment
	delay(250);
	lcd_command(0x01);
	// Rest of the code..
Sun Mar 08 2015, 11:04 AM
#3
thanks
Sun Mar 15 2015, 05:12 AM
#4
Hi!!

I am using a simple LED program to test my idea for the toll plaza

here:
http://codepaste.net/eon5o1

but i get the following error

Line 285 ATP.C(285): error C141: syntax error near 'sbit'
Line 287 ATP.C(287): error C141: syntax error near 'void'

How can I correct this?
Sun Mar 15 2015, 07:56 PM
#5
You cannot define sbit (special bit) variable inside a loop or a function. You have to do it outside or say a global variable instead.
Sun Mar 15 2015, 08:03 PM
#6
There are several other errors as well, caused by trying to 'hack' the original program.

You have repeat definitions for Led, delay() and Main().
there are probably miss placed brackets as well.

It may be better to create a fresh program for your test code.


Get Social

Information

Powered by e107 Forum System

Conversation

Sat May 15 2021, 11:47 AM
Derek Wolcott
Geometric Energy Corporation announced the dogecoin-funded mission on Sunday, with DOGE-1 representing a 40 kilogram cube satellite flying as a payload on a Falcon 9 rocket.
Thu May 13 2021, 07:18 PM
Rufus
Pretty section of content. I just stumbled upon your weblog and in accession capital to assert that I get actually enjoyed account your blog posts. Any way I will be subscribing to your augment and even I achievement you access consistently quickly. https://mkfinstitute.com Trisha Trisha
Wed May 12 2021, 01:23 PM
Jed Roan
Now you can promote your site all over the internet for FREE: http://www3.listofsitesthatacceptfreeads.club
Wed May 12 2021, 08:20 AM
Edgardo
If some one wants to be updated with most recent technologies afterward he must be visit this web page and be up to date every day. annual credit report https://creditscoresetf.com
Wed May 12 2021, 06:11 AM
Laurinda
Great website. A lot of useful information here. I'm sending it to some pals ans also sharing in delicious. And of course, thanks on your effort! annual credit report https://creditscorecheckn.com

Downloads

Comments

Mirza123
Thu Jun 25 2020, 03:46 PM
eunicelove124
Mon Jun 22 2020, 03:03 PM
cerouno
Tue Jun 16 2020, 05:10 PM
Marce
Sat Jun 13 2020, 09:43 PM
Davidthils
Thu May 21 2020, 12:44 PM
Jakeror
Thu May 21 2020, 01:28 AM
motorCar
Wed May 20 2020, 07:05 PM
Vordrync
Wed May 20 2020, 11:52 AM

Online

Guests: 94, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38215
Newest member: Mirza123