summaryrefslogtreecommitdiff
path: root/software/ihu/ihu.asm
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2012-01-28 15:44:06 +0000
committerChristian Pointner <equinox@mur.at>2012-01-28 15:44:06 +0000
commit37b5fe39f23067e6a3fc0beb9e40457298bfcba0 (patch)
treee0258f23d934a06c87801caf3877e6ba372011bf /software/ihu/ihu.asm
parentcleanup (diff)
added aknowledge pulse to ihu-ttx communication
git-svn-id: https://svn.spreadspace.org/mur.sat@239 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software/ihu/ihu.asm')
-rw-r--r--software/ihu/ihu.asm72
1 files changed, 72 insertions, 0 deletions
diff --git a/software/ihu/ihu.asm b/software/ihu/ihu.asm
index cec3e51..c213698 100644
--- a/software/ihu/ihu.asm
+++ b/software/ihu/ihu.asm
@@ -369,6 +369,78 @@ uart_rx_fe
main
; sleep
; nop
+ ;; --------------------
+ ;; TTX Test
+ movf TMP,w
+ btfsc STATUS,Z
+ goto main
+
+ movwf BUF
+ clrf TMP
+ movlw BUF+1
+ movwf FSR
+
+ movlw .1
+ movwf TTX_BYTE_CNT
+main_read_bytes
+ movf TMP,w
+ btfsc STATUS,Z
+ goto main_read_bytes
+ movwf INDF
+ incf FSR,f
+ clrf TMP
+ decfsz TTX_BYTE_CNT,f
+ goto main_read_bytes
+
+ movlw BUF
+ movwf FSR
+ movlw 0xA2
+ call ttx_send
+
+ xorlw .0
+ btfss STATUS,Z
+ goto main_error
+
+ movlw 'O'
+ movwf TXREG
+ movlw .1
+ call wait_ms
+ movlw 'K'
+ 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
+ goto main
+
+main_error
+ movlw 'E'
+ 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 '\r'
+ movwf TXREG
+ movlw .1
+ call wait_ms
+ movlw '\n'
+ movwf TXREG
+ movlw .1
+ call wait_ms
+ goto main
;; --------------------
;; ADC Test