-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.asm
30 lines (23 loc) · 912 Bytes
/
main.asm
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
#include <P16F84A.INC>
; TODO INSERT CONFIG CODE HERE USING CONFIG BITS GENERATOR
RES_VECT CODE 0x0000 ; processor reset vector
GOTO START ; go to beginning of program
; TODO ADD INTERRUPTS HERE IF USED
MAIN_PROG CODE ; let linker place main program
START
MOVLW D'100' ; 1 once
MOVWF MYREG ; 1 once
HERE NOP ; 1
NOP ; 1
NOP ; 1
NOP ; 1
NOP ; 1
DECFSC MYREG, 1 ; 1 (2)
GOTO HERE ; 2
GOTO $ ; infinit loop
END
; NOP time = T * prescaling factor
; NOP time = 1/4Mhz * 4
; NOP time = 1 micro s
; Total instruction = 2 + 8*99 + 5 + 2 = 801 instructions
; Total time = 801 micro second