Output RF signal to led
This commit is contained in:
parent
0efb370b6e
commit
c713fe96f4
1 changed files with 12 additions and 2 deletions
|
@ -1,14 +1,24 @@
|
|||
#define F_CPU 12000000
|
||||
|
||||
#include <avr/io.h>
|
||||
|
||||
#include <util/delay.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
DDRB &= ~(1 << PB0); // data input
|
||||
DDRD |= (1 << PD6); // led output
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (PINB & (1 << PB0))
|
||||
{
|
||||
PORTD |= (1 << PD6);
|
||||
}
|
||||
else
|
||||
{
|
||||
PORTD &= ~(1 << PD6);
|
||||
}
|
||||
//_delay_ms(10);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue