embedded/tp1/exo4.c
2021-02-03 18:37:06 +01:00

25 lines
319 B
C
Executable file

/*
* tutoriel.c
*
* Created: 29/01/2021 09:13:18
* Author : yboujon1
*/
#include <avr/io.h> // necessaire pour l'acces au reg IO
int main(void)
{
DDRB = 0xFF; //sortie
DDRA = 0x00; //entree
while (1) {
if(PINA==0xFF)
{
PORTB=0xFF;
}
else
{
PORTB=0x00;
};
}
}