Discussion in "Project Help" started by    akshayylr    Jan 28, 2018.
Sun Jan 28 2018, 04:53 AM
this is my code, this piece gets to work well in software simulation but not on the board.how can i get it working on the board??

#include<reg51.h>
sbit party1=P1^0;
sbit party2=P1^1;
sbit result1=P1^2;
sbit result2=P1^3;
sbit display1=P1^4;
sbit display2=P1^5;
sbit display3=P1^6;
sbit display4=P1^7;
void delay(int max)
{
int i=0,j=0;
for(i=0;i<max;i++)
{
for(j=0;j<12345;j++);
}
}
void main()
{
unsigned int temp1=0,temp2=0,count11=0,count12=0,count13=0,count14=0,count21=0,count22=0,count23=0,count24=0;
int a[]={0x3f,0x06,0x5b,0x4f,0xe6,0xed,0x7d,0x07,0xff,0xef};
while(1)
{
// party1=party2=result1=result2=1;
while(party1==0&&party2==1&&result1==1&&result2==1 )
{
temp1++;
}
while(party2==0&&party1==1&&result1==1&&result2==1 )
{
temp2++;
}
count11=count11+(temp1/temp1);
if(count11==9)
{
count12++;
count11=0;
if(count12==9)
{
count13++;
count12=0;
if(count13==9)
{
count14++;
count13=0;
}
}
}
count21=count21+(temp2/temp2);
if(count21==9)
{
count22++;
count21=0;
if(count22==9)
{
count23++;
count22=0;
if(count23==9)
{
count24++;
count23=0;
}
}
}

temp1=0;
temp2=0;
P2=0X00;
while(result1==0&&party2==1&&party1==1&&result2==1)
{
display1=1;
P2=a[count11];
delay(5);

display2=1;
P2=a[count12];
delay(5);

display3=1;
P2=a[count13];
delay(5);

display4=1;
P2=a[count14];
delay(5);

}
while(result2==0&&party2==1&&party1==1&&result1==1)
{
display1=1;
P2=a[count21];
delay(5);

display2=1;
P2=a[count22];
delay(5);

display3=1;
P2=a[count23];
delay(5);

display4=1;
P2=a[count24];
delay(5);

}
}
}

[ Edited Sun Jan 28 2018, 04:55 AM ]
Wed Jan 31 2018, 08:57 PM
You will have to post your full code and the Proteus file.
Most likely you have a hardware problem, such as a pin not connected.
Thu Feb 01 2018, 09:57 AM

You will have to post your full code and the Proteus file.
Most likely you have a hardware problem, such as a pin not connected.

ExperimenterUK

This is the full program and can I know what are this Proteus file
Thu Feb 01 2018, 06:00 PM
Zip it before posting.

"can I know what are this Proteus file"
I assumed you were using Proteus software for your simulation.
Post what you can of your simulation so we can try to recreate what you are doing.
Again ,zip it before posting.

### Information

#### Conversation

Sun May 19 2019, 04:43 AM
Elmo Oxendine
http://bit.ly/2PVgtFh
Tue May 14 2019, 12:38 AM
Jayson Contreras
Hello
Sun Apr 28 2019, 09:06 AM
Please provide me the code for gsm based sms controlled notice board
Sun Apr 14 2019, 10:52 PM
@hassan malik post your problem in the "General help Guidance and Discussion" forum
Sun Apr 14 2019, 05:06 PM
RAJESH MAPARi
please send me code to interface atmega32 with 24c1024 serial eeprom
Sun Apr 14 2019, 01:33 PM
hassan malik
hello sir i installed proteus 7.8 professional on window 7 ultimate and window 10 but there would be same errors onn both windows. the error is bad license key.please any one help me
Sun Apr 14 2019, 01:32 PM
hassan malik
hello sir i installed proteus 7.8 professional on window 7 ultimate and window 10 but there would be same errors onn both windows. the error is bad license key.
Sat Apr 06 2019, 05:59 PM
Sat Apr 06 2019, 07:43 AM
deshraj
hallo mam.. i have downloded gsm notice board code its running fine on lcd but how so send msg to the module . i mean format of password and msg.. thank you
Wed Apr 03 2019, 04:38 PM
Can i see the circuit diagram for the music tone library 8051 project?

### Recent

dhiyamtech
Thu May 09 2019, 10:20 AM
harsha.reddy
Fri May 03 2019, 09:02 AM
soumen1963
Fri May 03 2019, 06:01 AM
Vasily
Mon Apr 29 2019, 04:03 AM
Xkalebar
Sun Apr 28 2019, 08:59 AM
obibikwe
Fri Apr 19 2019, 05:55 PM
gigyani
Thu Apr 18 2019, 01:43 AM
Deekshaaan
Wed Apr 17 2019, 03:02 PM

#### Online

Guests: 27, Members: 0 ...

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

Members: 38065
Forum Activity
##### Posted By Ansh12
Sun Apr 28 2019, 02:15 PM
I made a minor change, it works in Proteus.Try the...
##### Posted By ExperimenterUK
Thu Apr 25 2019, 08:20 PM
I made a minor change, it works in Proteus.Try the...
##### Posted By gigyani
Thu Apr 25 2019, 01:17 AM
when i add cufirst.hex its not working.after 2-3 s...
##### Posted By ExperimenterUK
Wed Apr 24 2019, 12:29 AM
##### Posted By gigyani
Tue Apr 23 2019, 09:22 PM
How to enter the electronic voting machine into vo...
##### Posted By Ansh12
Mon Apr 22 2019, 09:12 AM
Then flash the led when you get any input on B0.Le...
##### Posted By ExperimenterUK
Fri Apr 19 2019, 05:35 PM
The full error is control_unit.asm(1294): error A4...
##### Posted By gigyani
Thu Apr 18 2019, 10:09 PM
I'm using keil uvision5. attached is the rar file ...
##### Posted By ExperimenterUK
Thu Apr 18 2019, 04:58 PM