-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPL69_sequencing.asm
More file actions
48 lines (38 loc) · 1.02 KB
/
PL69_sequencing.asm
File metadata and controls
48 lines (38 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
;**********************************************
;Sequenciamento de tarefas
LIST P=16F84A ;Tipo de dispositivo
INCLUDE "p16f84a.inc";Definição de registros
ORG 0 ;Vetor de reset
goto INICIO
ORG 5 ;Saltamos o vetor
;de interrupção
;Começo do programa
INICIO: clrf PORTB
bsf STATUS, RP0 ;Banco 1
clrf TRISB ;Porta B saída
movlw b'00011111' ;5 pinos de A para entrada
movwf TRISA
bcf STATUS, RP0 ;Banco 0
LOOP: clrwdt
btfss PORTA, 0
goto LOOP
bcf PORTB, 2
bsf PORTB, 0
Espera_b_1: clrwdt
btfss PORTA, 2
goto Espera_b_1
bsf PORTB, 1
Espera_c: clrwdt
btfss PORTA, 3
goto Espera_c
bcf PORTB, 0
Espera_b_2: clrwdt
btfss PORTA, 2
goto Espera_b_2
bcf PORTB, 1
Espera_a: clrwdt
btfss PORTA, 1
goto Espera_a
bsf PORTB, 2
goto LOOP
END ;Fim do programa