First commit
This commit is contained in:
30
IUT/Info2/TP/Chap2/chapitre5/CHAP5/Sources/main.c
Normal file
30
IUT/Info2/TP/Chap2/chapitre5/CHAP5/Sources/main.c
Normal file
@@ -0,0 +1,30 @@
|
||||
#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 (;;) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user