nobie said:can someone help me fix the problem :?: the circuit don't work
nobie said:can someone help me fix the problem :?: the circuit don't work
nobie said:thanks for the info saidutt but i have a problem in my circuit i can't get it straight
LIST p=16F84 ; Définition de processeur
#include <p16F84.inc> ; Définitions des constantes
__CONFIG _CP_ON & _WDT_ON & _PWRTE_ON & _HS_OSC
;*********************************************************************
; ASSIGNATIONS *
;*********************************************************************
clic EQU H'04' ; Ajoutons dans la partie "assignations" le mot
;*********************************************************************
; DECLARATIONS DE VARIABLES *
;********************************************************************
CBLOCK 0x00C ; début de la zone variables
cmpt1 : 1
cmpt2 : 1
cmpt3 : 1
ENDC ; Fin de la zone
;**********************************************************************
; DEMARRAGE SUR RESET *
;**********************************************************************
org 0x000 ; Adresse de départ après reset
goto init ; Adresse 0: initialiser
;*********************************************************************
; INITIALISATIONS *
;*********************************************************************
init
bsf STATUS,RP0
clrf PORTA
clrf PORTB
bcf STATUS,RP0
goto start
;*********************************************************************
; SOUS-ROUTINE DE TEMPORISATION
;*********************************************************************
tempo
movlw 10 ;pour 2 boucles
movwf cmpt3 ;initialiser compteur3
boucle3
clrf cmpt2 ;effacer compteur2
boucle2
clrf cmpt1 ; effacer compteur1
boucle1
nop ; perdre 1 cycle
decfsz cmpt1,f ; décrémenter compteur1
goto boucle1 ;si pas 0 boucler
decfsz cmpt2,f ; si 0 décrémenter compteur2
goto boucle2 ; si compteur pas 0,recommencer boucle1
decfsz cmpt3,f ; si 0 décrémenter compteur3
goto boucle3 ; si cmpt3 pas 0, recommencer boucle2
return
;*********************************************************************
; PROGRAMME PRINCIPAL *
;*********************************************************************
start
etiquette2
clrf PORTA
clrf PORTB
bsf PORTB,0
bsf PORTA,0
etiquette
call tempo
rlf PORTB,f
btfsc PORTB,7
goto etiquette2
goto etiquette
END ; directive fin de programme
nobie said:thanks for the help saidutt i really appreciate iti m dumb in this domain
the problem is that i use MPLAB , and i don't know how to code a 8051 micro-controller
i used the 16f84 circuit but my code don't work code , it normally wold display first raw led in a interval of 1ms
thanks in advance
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?