Académique Documents
Professionnel Documents
Culture Documents
Labo 5
Labo 5
Manipulation:
Ralisation dun compteur binaire. Il y aura une incrmentation toutes
les secondes.
Schma de l'organigramme:
Branchement du microcontrleur:
Programmation du microcontrleur:
;******************************************************************
; Projet :
Compteur binaire
; Fichier projet : rombast.mclsprj
; Fichier source : rombast.asm
; Date :
14.03.2012
; Logiciel :
MCLS
; Matriel :
PIC16F84A
;
;******************************************************************
;-----------------------------------------------------------------; Configuration PIC
; ----------------------------------------------------------------LIST p=16f84
; code protection off/ power up timer off/ wdt off /XT oscillator
__config
0x3ff9
; ----------------------------------------------------------------; Variables dans la RAM partir de ladresse 0x10
; ----------------------------------------------------------------cblock 0x10
countb
endc
B'00000000'
countb
; W=0000000
; countb=W
countb,f
countb,w
PORTB
; countb = countb + 1
; W=countB
; PORTB=W (pour allumer leds)
call
wait_480ms
; attendre
goto
main
; retour main
main:
incf
movf
movwf