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

Thu Jun 11 2020, 06:27 AM
anudee
sir could please send the code for I2C and wifi interfacing with 8051
Tue May 19 2020, 10:29 PM
Does anyone have microcontroller programming software for STC15F104W (core 8051, 4 k, 128 byte, 6 I/O pin, UART ... DIL8), that works?
Sat May 02 2020, 07:38 PM
Tamu Gurung
Hi I am looking for a assembly language program for a digital decimal counter. Time counts max limit of 2 mins starting from 2.00 mins and ending at 0.00. time is to be displayed on 4 7-segment LED displays. Edsim51 simulator to be used. Thanks
Wed Mar 25 2020, 01:39 PM
Tajammul
Sir kindly send the code file i2c for 8051
Fri Mar 13 2020, 10:36 PM
@ Rohitnani,ABEBE..which project ?
Fri Mar 13 2020, 12:55 PM
ABEBE
how can get hadwere of this project
Sat Mar 07 2020, 05:11 PM
Wed Feb 26 2020, 04:58 PM
Peter Parker
Is it possible to send multiple messages using only 1 GSM module?
Sat Feb 01 2020, 10:12 AM
Pearl Olin
Hello,
Wed Jan 22 2020, 06:16 PM
MINU CHAUDHARY
I m getting errors while simulation process during interfacing socket output and lcd... Can i get the report of ur project which is same as us.

### Recent

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: 48, Members: 0 ...

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

Members: 38215