Output RF signal to led

master
mandlm 2016-01-31 15:08:07 +01:00
parent 0efb370b6e
commit c713fe96f4
1 changed files with 12 additions and 2 deletions

View File

@ -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);
}
}