diff options
author | Christian Pointner <equinox@mur.at> | 2012-05-04 00:25:48 +0000 |
---|---|---|
committer | Christian Pointner <equinox@mur.at> | 2012-05-04 00:25:48 +0000 |
commit | f45bd67d091d6b5b0a5be0653a53b85f22a25a40 (patch) | |
tree | 6c1ac65f5e7987fdefae302b885b18ba4a7bab36 | |
parent | some adaptions for exhibition setup (diff) |
ihu and ttx for exhibition
git-svn-id: https://svn.spreadspace.org/mur.sat@395 7de4ea59-55d0-425e-a1af-a3118ea81d4c
-rw-r--r-- | software/ihu/ihu.asm | 49 | ||||
-rw-r--r-- | software/ihu/ttx.inc | 4 | ||||
-rw-r--r-- | software/ttx/ttx.asm | 32 |
3 files changed, 42 insertions, 43 deletions
diff --git a/software/ihu/ihu.asm b/software/ihu/ihu.asm index f37b3db..452c0d1 100644 --- a/software/ihu/ihu.asm +++ b/software/ihu/ihu.asm @@ -95,7 +95,7 @@ DTMF_BUF EQU H'0030' ; 5Bytes for incoming DTMF commands DTMF_BUF_END EQU H'0034' DTMF_BUF_PTR EQU H'0035' DTMF_CS EQU H'0036' - + RTC_TOD0 EQU H'003A' RTC_TOD1 EQU H'003B' RTC_TOD2 EQU H'003C' @@ -180,14 +180,12 @@ STATUS_TEMP EQU H'007F' btfsc PIR1,RCIF goto int_uart_rx goto interrupt_end - int_dtmf movf DTMF_BUF_PTR,w movwf FSR movf PORTD,w andlw b'00001111' xorwf DTMF_CS,f - call dtmfSign movwf INDF incf DTMF_BUF_PTR,f movlw DTMF_BUF_END @@ -372,33 +370,17 @@ main ; nop ;; -------------------- ;; TTX Test - movf TMP,w - btfsc STATUS,Z - goto main + ;; 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 0x50 + ;; call ttx_send - movlw BUF - movwf FSR - movlw 0xA0 - call ttx_send - - goto main + ;; clrf TMP + ;; goto main ;; xorlw .0 ;; btfss STATUS,Z @@ -523,27 +505,38 @@ main_read_bytes btfsc STATUS,Z goto main + movlw BUF + movwf FSR + swapf DTMF_BUF+3,w + andlw b'11110000' + call ttx_send + movf DTMF_BUF,w + call dtmfSign movwf TXREG movlw .1 call wait_ms movf DTMF_BUF+1,w + call dtmfSign movwf TXREG movlw .1 call wait_ms movf DTMF_BUF+2,w + call dtmfSign movwf TXREG movlw .1 call wait_ms movf DTMF_BUF+3,w + call dtmfSign movwf TXREG movlw .1 call wait_ms movf DTMF_BUF+4,w + call dtmfSign movwf TXREG movlw .1 call wait_ms diff --git a/software/ihu/ttx.inc b/software/ihu/ttx.inc index 6c05672..79b52ca 100644 --- a/software/ihu/ttx.inc +++ b/software/ihu/ttx.inc @@ -165,6 +165,8 @@ ttx_next_byte goto ttx_next_byte ttx_get_csum + return + call ttx_break call ttx_recv_byte movf TTX_BYTE,w @@ -179,6 +181,8 @@ ttx_csum_error ;; ------------------------------------- ttx_send call ttx_send_frame + return + movwf TTX_BYTE movwf TXREG call ttx_break diff --git a/software/ttx/ttx.asm b/software/ttx/ttx.asm index 97fafac..6c9da11 100644 --- a/software/ttx/ttx.asm +++ b/software/ttx/ttx.asm @@ -42,7 +42,7 @@ DOT_DEF EQU .256 - .21 ; .29 DASH_DEF EQU .256 - .63 ; .87 WSPACE_DEF EQU .256 - .147 ; .203 TUNE_DEF EQU DOT_DEF -BCNINTL_DEF EQU .256 - .20 +BCNINTL_DEF EQU .256 - .200 BCNINTH_DEF EQU .255 START_CHAR EQU 'N' ACK_CHAR EQU 'A' @@ -149,19 +149,19 @@ ext_int_next goto ext_int_next ext_int_send_csum - call rx_send_csum - movf RX_FSR_TMP,w - movwf FSR +;; call rx_send_csum +;; movf RX_FSR_TMP,w +;; movwf FSR swapf RX_CMD,w andlw b'00001111' movwf RX_CMD -ext_int_wait_ack_low - btfsc GPIO,SCLK - goto ext_int_wait_ack_low -ext_int_wait_ack_high - btfss GPIO,SCLK - goto ext_int_wait_ack_high - btfss GPIO,SDAT +;; ext_int_wait_ack_low +;; btfsc GPIO,SCLK +;; goto ext_int_wait_ack_low +;; ext_int_wait_ack_high +;; btfss GPIO,SCLK +;; goto ext_int_wait_ack_high +;; btfss GPIO,SDAT bsf STATE,rxcomplete bcf WDTCON,SWDTEN bsf STATUS,RP0 @@ -405,9 +405,11 @@ init clrf RX_DLEN bcf STATE,rxcomplete clrf NVSTATE ; TODO: read State from EEPROM - movlw .42 + ;; movlw .42 + movlw .0 movwf BEACONCNTL ; TODO: read Beaconcnt from EEPROM - movlw .23 + ;; movlw .23 + movlw .0 movwf BEACONCNTH movlw BCNINTL_DEF ; TODO: read Beacon Interval from EEPROM movwf BEACON_INTL @@ -813,8 +815,8 @@ main ;; this gets called every beacon interval beaconint_elapsed bcf STATE,startbeacon - ;; btfss NVSTATE,safe - ;; call send_beacon + btfss NVSTATE,safe + call send_beacon goto powerdown ;; this gets called whenever a message was received from ihu |