Discussion in "Project Help" started by    akshayylr    Jan 28, 2018.
Sun Jan 28 2018, 04:53 AM
#1
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
#2
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
#3


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
#4
Your program did not attach.
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.

Get Social

Information

Powered by e107 Forum System

Conversation

Sat Feb 24 2018, 09:05 AM
Aaquib
I want help for digital ic tester
ExperimenterUK
Tue Feb 20 2018, 09:31 PM
Join up.. and post your problem
Mon Feb 19 2018, 04:47 PM
ashishkumar
i needs help for my project
Mon Feb 19 2018, 04:46 PM
ashishkumar
can i join you guys
ExperimenterUK
Mon Feb 05 2018, 03:08 AM
Hi Dave. Good to see you.
DavesGarage
Wed Jan 10 2018, 01:25 AM
It's been a few years since I poked around here - Hi all...
ExperimenterUK
Tue Jan 09 2018, 12:49 AM
Hi TPS. it's been a while..
۞ TPS ۞
Mon Jan 08 2018, 12:12 AM
hello
Thu Jan 04 2018, 07:20 PM
sayyad affrid
its AT89S52
Thu Jan 04 2018, 07:20 PM
sayyad affrid
sir, i want embedded c code for ultrasonic sensor having buzzer interfaced with AT9S52

Downloads

Comments

Daro12_76
Wed Feb 21 2018, 05:01 PM
radhikanathani
Wed Feb 21 2018, 06:55 AM
Narayani
Wed Feb 21 2018, 04:10 AM
Parth09
Tue Feb 20 2018, 07:53 AM
goutham
Mon Feb 19 2018, 02:49 AM
kks
Sun Feb 18 2018, 05:59 PM
justotemon
Sat Feb 17 2018, 07:14 AM
nicolekristen
Fri Feb 16 2018, 12:19 PM

Online

Guests: 35, Members: 0 ...

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

Members: 37970
Newest member: Daro12_76
Forum Activity
Ansh12 Avatar
Posted By Ansh12
Fri Feb 23 2018, 07:10 PM
sbit E = P0^7; //E pin for LCD //use port 0sb...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Feb 23 2018, 02:43 PM
sbit NOT #definesbit E = P0^7; //E pin for LCD ...
Ansh12 Avatar
Posted By Ansh12
Fri Feb 23 2018, 01:55 PM
change your defines tosbit E = P0^7; //E pi...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Feb 23 2018, 01:12 AM
Add pull- ups for EN and RS.change your defines t...
Ansh12 Avatar
Posted By Ansh12
Thu Feb 22 2018, 01:36 AM
Can you post your Proteus files.ExperimenterUKThan...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Feb 21 2018, 09:07 PM
The code you refer to is to drive the circuitshown...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Feb 21 2018, 05:41 PM
Can you post your Proteus files.You will need pull...
radhikanathani Avatar
Posted By radhikanathani
Wed Feb 21 2018, 02:39 PM
I want to design a system for vehicle tracking and...
Narayani Avatar
Posted By Narayani
Wed Feb 21 2018, 04:17 AM
Hello,Your tutorial really helped me understand st...
Ansh12 Avatar
Posted By Ansh12
Wed Feb 21 2018, 12:53 AM
while(1) { key = Get_key(); // Get p...