First commit
This commit is contained in:
22
IUT/Info2/TP/Chap2/chapitre2/Sources/main.c
Normal file
22
IUT/Info2/TP/Chap2/chapitre2/Sources/main.c
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <hidef.h> /* for EnableInterrupts macro */
|
||||
#include "derivative.h" /* include peripheral declarations */
|
||||
|
||||
void main(void)
|
||||
{
|
||||
unsigned i;
|
||||
/* Internal clock of 8MHz selected. */
|
||||
ICSC2 = 0b01000000;
|
||||
ICSC1 = 0x04;
|
||||
SOPT1_COPE = 0; /* Disable Watchdog */
|
||||
/* PTB configured as an output */
|
||||
PTBDD = 0xFF;
|
||||
for (;;)
|
||||
{
|
||||
i = 0;
|
||||
{
|
||||
while (i < 6513)
|
||||
i++;
|
||||
} // Boucle complète
|
||||
PTBD = ~PTBD;
|
||||
} /* loop forever */
|
||||
}
|
||||
Reference in New Issue
Block a user