Files
CITISE1/IUT/Info2/TP/Chap2/chapitre5/CHAP5/Sources/main.c
2026-04-08 20:11:20 +02:00

30 lines
442 B
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#include <hidef.h>
#include "derivative.h"
#include "tempo.h"
void main(void)
{
/*Autorisation des interruptions */
EnableInterrupts;
/* Selection horloge interne `a 8MHz */
ICSC2 = 0x00;
ICSC1 = 0x04;
/* D´esactivation du Watchdog */
SOPT1_COPE = 0;
/* Initialisation de TPMSC */
TPMSC = 0b01001100;
/* D´efinition de la valeur max de comptage */
TPMMOD = 0xC34F;
PTBDD = 0xFF;
PTBD = 0;
PTADD = 0;
for (;;) {
}
}