summaryrefslogtreecommitdiff
path: root/software/ihu/ihu.asm
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2011-07-31 01:56:18 +0000
committerChristian Pointner <equinox@mur.at>2011-07-31 01:56:18 +0000
commit2aaee32fc73b90ecfaa9edf494487831d892c855 (patch)
tree970a4615e72501bd8c029fc4d37f287f35b2f555 /software/ihu/ihu.asm
parentone wire write commands work (diff)
1wire for DS1821 works now
git-svn-id: https://svn.spreadspace.org/mur.sat@84 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software/ihu/ihu.asm')
-rw-r--r--software/ihu/ihu.asm130
1 files changed, 77 insertions, 53 deletions
diff --git a/software/ihu/ihu.asm b/software/ihu/ihu.asm
index f81701d..1c2f891 100644
--- a/software/ihu/ihu.asm
+++ b/software/ihu/ihu.asm
@@ -248,7 +248,7 @@ uart_rx_fe
;; -------------------------------------
include "temp.inc"
-
+
;; -------------------------------------
;; MAINLOOP
main
@@ -256,68 +256,92 @@ main
btfsc STATUS,Z
goto main
- ;; movlw BUF
- ;; movwf FSR
- ;; call rtc_get_time
+ movlw BUF
+ movwf FSR
+ call rtc_get_time
- ;; swapf BUF+2,w
- ;; andlw b'00000011'
- ;; call digit
- ;; movwf TXREG
- ;; movlw .1
- ;; call wait_ms
+ swapf BUF+2,w
+ andlw b'00000011'
+ call digit
+ movwf TXREG
+ movlw .1
+ call wait_ms
- ;; movf BUF+2,w
- ;; andlw b'00001111'
- ;; call digit
- ;; movwf TXREG
- ;; movlw .1
- ;; call wait_ms
+ movf BUF+2,w
+ andlw b'00001111'
+ call digit
+ movwf TXREG
+ movlw .1
+ call wait_ms
- ;; movlw ':'
- ;; movwf TXREG
- ;; movlw .1
- ;; call wait_ms
+ movlw ':'
+ movwf TXREG
+ movlw .1
+ call wait_ms
- ;; swapf BUF+1,w
- ;; andlw b'00000111'
- ;; call digit
- ;; movwf TXREG
- ;; movlw .1
- ;; call wait_ms
+ swapf BUF+1,w
+ andlw b'00000111'
+ call digit
+ movwf TXREG
+ movlw .1
+ call wait_ms
- ;; movf BUF+1,w
- ;; andlw b'00001111'
- ;; call digit
- ;; movwf TXREG
- ;; movlw .1
- ;; call wait_ms
+ movf BUF+1,w
+ andlw b'00001111'
+ call digit
+ movwf TXREG
+ movlw .1
+ call wait_ms
- ;; movlw ':'
- ;; movwf TXREG
- ;; movlw .1
- ;; call wait_ms
+ movlw ':'
+ movwf TXREG
+ movlw .1
+ call wait_ms
- ;; swapf BUF,w
- ;; andlw b'00000111'
- ;; call digit
- ;; movwf TXREG
- ;; movlw .1
- ;; call wait_ms
+ swapf BUF,w
+ andlw b'00000111'
+ call digit
+ movwf TXREG
+ movlw .1
+ call wait_ms
- ;; movf BUF,w
- ;; andlw b'00001111'
- ;; call digit
- ;; movwf TXREG
- ;; movlw .1
- ;; call wait_ms
+ movf BUF,w
+ andlw b'00001111'
+ call digit
+ movwf TXREG
+ movlw .1
+ call wait_ms
- ;; movlw '\r'
- ;; movwf TXREG
- ;; movlw .1
- ;; call wait_ms
+ movlw '\r'
+ movwf TXREG
+ movlw .1
+ call wait_ms
+ movlw '\n'
+ movwf TXREG
+ movlw .1
+ call wait_ms
- call temp_init
+ call temp_read_value
+ swapf OWIRE_BYTE,w
+ andlw b'00001111'
+ call digit
+ movwf TXREG
+ movlw .1
+ call wait_ms
+
+ movf OWIRE_BYTE,w
+ andlw b'00001111'
+ call digit
+ movwf TXREG
+ movlw .1
+ call wait_ms
+
+ movlw '\r'
+ movwf TXREG
+ movlw .1
+ call wait_ms
+ movlw '\n'
+ movwf TXREG
clrf TMP
goto main