summaryrefslogtreecommitdiff
path: root/software/ihu/ihu.asm
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2011-07-24 17:50:10 +0000
committerChristian Pointner <equinox@mur.at>2011-07-24 17:50:10 +0000
commitcdf23cd002a362b9b990723f0b2f1396ebd999c2 (patch)
tree79b9307ab324472707ebaaa891f8ddfc8f0ea8cb /software/ihu/ihu.asm
parentnow using A as start sign (diff)
ihu and ttx reset works now
git-svn-id: https://svn.spreadspace.org/mur.sat@50 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software/ihu/ihu.asm')
-rw-r--r--software/ihu/ihu.asm23
1 files changed, 9 insertions, 14 deletions
diff --git a/software/ihu/ihu.asm b/software/ihu/ihu.asm
index e080b7c..3f49483 100644
--- a/software/ihu/ihu.asm
+++ b/software/ihu/ihu.asm
@@ -32,16 +32,15 @@
LIST p=16F887
include "p16f887.inc"
- ;; TODO: set correct configuration bits
- __config _DEBUG_OFF & _LVP_OFF & _FCMEN_OFF & _IESO_OFF & _BOR_OFF & _CPD_OFF & _CP_OFF & _MCLRE_OFF & _PWRTE_OFF & _WDT_OFF & _XT_OSC
-
+ __config _CONFIG1, _DEBUG_OFF & _LVP_OFF & _FCMEN_OFF & _IESO_OFF & _BOR_NSLEEP & _CPD_OFF & _CP_OFF & _MCLRE_OFF & _PWRTE_ON & _WDT_OFF & _XT_OSC
+ __config _CONFIG2, _BOR21V & _WRT_OFF
;; -------------------------------------
;; DEFINES
;; constants
;; I/O Pins
-LED EQU 5
+TTX_RESET EQU 5
;; variables
;; page 0 only
@@ -94,10 +93,13 @@ init
movwf OSCCON
movlw b'11011111'
movwf TRISD
- bcf STATUS,RP0
+ bcf STATUS,RP0
;; bank 0
- bsf PORTD,LED
+ bcf PORTD,TTX_RESET ;reset TTX
+ nop
+ nop
+ bsf PORTD,TTX_RESET
clrf TMR0
goto main
@@ -115,14 +117,7 @@ init
;; -------------------------------------
;; MAINLOOP
main
- bcf INTCON,T0IF
-loop
- btfss INTCON,T0IF
- goto loop
-
- movlw b'00100000'
- xorwf PORTD,f
- goto main
+ goto powerdown
powerdown
sleep