There is one switch in Transmitter part ( Attiny2313 : PORTB.1) and one LED (Attiny2313ORTB.0) in Reciever part. The LED must On and Off with pressing the switch but it not works. What is the problem?
The Codes in Transmitter part: (codevision)
(codewizard-->USART-->Transmitter)
...
int Data;
while(1)
{
Data=PINB.1;
printf( "%u",Data);
};
The Codes in Reciever part:
(codewizard-->USART-->Reciever)
....
int Data=0;
while(1)
{
scanf("%u",Data);
PORTB.0=Data;
};
(TX pin in Transmitter part is connected to RX pin in Reciever part)
How is the switch connected? Check that the switch actually works and the state of the PORTB.1 actually changes between logic 1 and 0 when the switch is pressed.
Is the code an example code that comes with Codevision? Did you alter the code in any way?