summaryrefslogtreecommitdiff
path: root/electronics/asm/final.asm
diff options
context:
space:
mode:
Diffstat (limited to 'electronics/asm/final.asm')
-rw-r--r--electronics/asm/final.asm24
1 files changed, 5 insertions, 19 deletions
diff --git a/electronics/asm/final.asm b/electronics/asm/final.asm
index 3326119..47dc7d6 100644
--- a/electronics/asm/final.asm
+++ b/electronics/asm/final.asm
@@ -2,7 +2,7 @@ start:
init:
clrf PORTA ; make sure port A output latches are low
clrf PORTB
- bsf STATUS,RP0 ; select memory bank 1
+ bsf STATUS, RP0 ; select memory bank 1
movlw b'11111111' ; set port A data direction to inputs
movwf TRISA
@@ -10,8 +10,8 @@ init:
movwf TRISB
bcf STATUS,RP0 ; select memory bank 0
- bsf INTCON, INT0IE
- bsf INTCON, GIE
+ ;bsf INTCON, INT0IE
+ ;bsf INTCON, GIE
rawtemp EQU B6
countdown EQU B7
@@ -22,21 +22,6 @@ init:
goto main
-interrupt:
- btfss INTCON, INT0IF
- retfie
-
- clrf PORTB
-
- bcf INTCON, INT0IF
- bsf INTCON, GIE
- bsf INTCON, INT0IE
-
- ; USE A TRANSITOR WITH 1K resistor to the power rail of chip
-
- goto start ; restarts the program
- retfie
-
beep: ; a for loop that beeps a buzzer and turns on a led then sets a led on
; if nothing is done
@@ -53,7 +38,8 @@ beep: ; a for loop that beeps a buzzer and turns on a led then sets a led on
bsf PORTB, 2 ; put an AMBER LED on PORTB:2
- goto start
+ goto main
+
main: ; reads the temprature
bsf PORTB,3 ; put a GREEN LED for status on PORTB:3