• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Hi,all of you Ihave question about potentiometer data send from controller to controller thank you new Adil sadiq

be80be

Well-Known Member
This code is not going to send anything serial out
Code:
void main() {
ddrd=0x00;
portd=0x0e;


Portb=0;
ddrb=0xff;
while (1)
{
if (pind.b1==1 && pind.b2==1&& pind.b3==0&&pind.b6==0)
Portb=0b00001011;
else
Portb=0;
if(pind.b1==1 && pind.b2==0&& pind.b3==0&&pind.b6==0)
portb=0b00000011;
else
portb=0;
if(pind.b1==1&&pind.b2==0 && pind.b3==1&&pind.b6==0)
portb=0b00000010;
else
portb=0;
if (pind.b1==1 && pind.b2==1&&pind.b3==1&&pind.b6==0)
portb=0b00000100;
else
portb=0;
if(pind.b6==1&&pind.b2==1&&pind.b3==0&&pind.b1==0)
portb=0b00011001;
else
portb=0;
if(pind.b6==1&&pind.b2==0&&pind.b3==0&&pind.b1==0)
portb=0b00010001;
else
portb=0;

if(pind.b6==1&&pind.b2==0&&pind.b3==1&&pind.b1==0)
portb=0b00010000;
else
portb=0;
if (pind.b6==1&&pind.b3==1&&pind.b2==1&&pind.b1==0)
portb=0b00010000;
else
portb=0;



}
}
What did you use for simulation
 

ahuida_love

New Member
This code is not going to send anything serial out
Code:
void main() {
ddrd=0x00;
portd=0x0e;


Portb=0;
ddrb=0xff;
while (1)
{
if (pind.b1==1 && pind.b2==1&& pind.b3==0&&pind.b6==0)
Portb=0b00001011;
else
Portb=0;
if(pind.b1==1 && pind.b2==0&& pind.b3==0&&pind.b6==0)
portb=0b00000011;
else
portb=0;
if(pind.b1==1&&pind.b2==0 && pind.b3==1&&pind.b6==0)
portb=0b00000010;
else
portb=0;
if (pind.b1==1 && pind.b2==1&&pind.b3==1&&pind.b6==0)
portb=0b00000100;
else
portb=0;
if(pind.b6==1&&pind.b2==1&&pind.b3==0&&pind.b1==0)
portb=0b00011001;
else
portb=0;
if(pind.b6==1&&pind.b2==0&&pind.b3==0&&pind.b1==0)
portb=0b00010001;
else
portb=0;

if(pind.b6==1&&pind.b2==0&&pind.b3==1&&pind.b1==0)
portb=0b00010000;
else
portb=0;
if (pind.b6==1&&pind.b3==1&&pind.b2==1&&pind.b1==0)
portb=0b00010000;
else
portb=0;



}
}
What did you use for simulation
I use this in smulation proteus 7 isis professional and work but when ai bring it to circut board not work out I thing I do not no all about the chip at90s2313 how it set up run thank you for your patent
 

ahuida_love

New Member
I use this in smulation proteus 7 isis professional and work but when ai bring it to circut board not work out I thing I do not no all about the chip at90s2313 how it set up run thank you for your patent
sorry thank you for patience suffering without compiling with me ,so I am very happy with all of you here again special thanks for you
 

Latest threads

EE World Online Articles

Loading

 
Top