From 4a29c0fb522dd3ad4f5331dedfda61280b44fd06 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sun, 28 May 2017 12:36:24 +0200 Subject: [PATCH] Ajout du txt explication et du schema --- Explication + Timer0.txt | 37 +++++++++++++++++++++++++++++++++++++ Schéma.png | Bin 0 -> 33636 bytes 2 files changed, 37 insertions(+), 0 deletions(-) create mode 100644 Explication + Timer0.txt create mode 100644 Schéma.png diff --git a/Explication + Timer0.txt b/Explication + Timer0.txt new file mode 100644 index 0000000..7bc8f7c --- /dev/null +++ b/Explication + Timer0.txt @@ -0,0 +1,37 @@ +Bouton "+ - ok" PA0 aPA2 +Bouton Mode "Heure-minute-Jour-Nuit-Sortir Mode/Heure" PD0 & PD1 +Selection Afficheur PC0 a PC3 +Envoie de donnee Afficheur PBx +Sonde de temperature PF0 +TOR (Radiateur) PF1 + +TIMER0 + +OCR0A : 255 + +OCR0B :0b 0000 0000 + +TCCR0A : Ob 0000 0010 + +TCCR0B : 0b 0000 0100 + +On a 16Mhz de frequence que l'on divise par 256 pour avoir la valeur Clk/256 -> 62500 + +Chaque cycle d'horloge compte donc pour 16ƒÊs + +TIMSK0 -> 0b 0000 0010 + +TIFR0 -> 0b 0000 0010 + +Pour avoir un top d'horloge de l'ordre d'une seconde, on met la tempo definie au dessus dans une boucle de 62500 iterations +puis on sort de la boucle en incrementant les secondes + +Timer: + +Pour TOPSECONDE<=62500 +{ +topseconde=topseconde+1 +} +Seconde=seconde+1 + +de meme pour les minutes et les heures \ No newline at end of file diff --git a/Schéma.png b/Schéma.png new file mode 100644 index 0000000..e290c07 Binary files /dev/null and b/Schéma.png differ -- libgit2 0.21.2