36 lines
494 B
C
36 lines
494 B
C
#include <hidef.h>
|
|
#include "derivative.h"
|
|
#include "tempo.h"
|
|
|
|
int i;
|
|
|
|
void main(void)
|
|
{
|
|
/* Internal clock of 8MHz selected. */
|
|
ICSC2 = 0x00;
|
|
ICSC1 = 0x04;
|
|
|
|
SOPT1_COPE = 0; /* Disable Watchdog */
|
|
|
|
PTBDD = 0xFF;
|
|
|
|
/* include your code here */
|
|
for (;;)
|
|
{
|
|
for (i = 0; i < 8; i++)
|
|
{
|
|
// tempo(0, 51872); // 500ms
|
|
PTBD |= 0b1 << i;
|
|
tempo(2, 51872); // 500ms
|
|
PTBD = 0;
|
|
}
|
|
|
|
} /* loop forever */
|
|
}
|
|
|
|
void interrupt 7 Depassement_compteur(void)
|
|
{
|
|
|
|
|
|
TPMSC = TPMSC & 0b01111111;
|
|
} |