diff options
author | Christian Pointner <equinox@mur.at> | 2012-06-07 17:37:54 +0000 |
---|---|---|
committer | Christian Pointner <equinox@mur.at> | 2012-06-07 17:37:54 +0000 |
commit | 33162d4a6b9bd710f25877e4a19ca7042d92d2e7 (patch) | |
tree | f24d64115d29ced3f90c219dcb2d64d992e53689 | |
parent | improved hardware definitions (diff) |
improved port pin definitions
git-svn-id: https://svn.spreadspace.org/mur.sat@511 7de4ea59-55d0-425e-a1af-a3118ea81d4c
-rw-r--r-- | software/ttx/ttx.asm | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/software/ttx/ttx.asm b/software/ttx/ttx.asm index 6c9da11..0fe090f 100644 --- a/software/ttx/ttx.asm +++ b/software/ttx/ttx.asm @@ -50,11 +50,11 @@ OSC_LOW EQU b'00000000' OSC_HIGH EQU b'01100000' ;; I/O Pins -CWENABLE EQU GP0 -CWOUT EQU GP1 -SCLK EQU GP2 -SDAT EQU GP4 -CLK_1HZ EQU GP5 +#define CWENABLE GPIO,GP0 +#define CWOUT GPIO,GP1 +#define SCLK GPIO,GP2 +#define SDAT GPIO,GP4 +#define CLK_1HZ GPIO,GP5 ;; variables ;; page 0 only @@ -156,12 +156,12 @@ ext_int_send_csum andlw b'00001111' movwf RX_CMD ;; ext_int_wait_ack_low -;; btfsc GPIO,SCLK +;; btfsc SCLK ;; goto ext_int_wait_ack_low ;; ext_int_wait_ack_high -;; btfss GPIO,SCLK +;; btfss SCLK ;; goto ext_int_wait_ack_high -;; btfss GPIO,SDAT +;; btfss SDAT bsf STATE,rxcomplete bcf WDTCON,SWDTEN bsf STATUS,RP0 @@ -399,8 +399,8 @@ init movlw b'00000110' movwf T1CON - bcf GPIO,CWOUT - bcf GPIO,CWENABLE + bcf CWOUT + bcf CWENABLE clrf RX_DLEN bcf STATE,rxcomplete @@ -442,12 +442,12 @@ rx_byte movwf RX_BIT_CNT clrf INDF rx_byte_clk_low - btfsc GPIO,SCLK + btfsc SCLK goto rx_byte_clk_low rx_byte_clk_high - btfss GPIO,SCLK + btfss SCLK goto rx_byte_clk_high - btfsc GPIO,SDAT + btfsc SDAT bsf INDF,0 decfsz RX_BIT_CNT,f goto rx_byte_next @@ -463,25 +463,25 @@ rx_byte_next ;; ------------------------------------- rx_send_csum bsf STATUS,RP0 - bcf TRISIO,SDAT + bcf SDAT bcf STATUS,RP0 movlw .8 movwf RX_BIT_CNT rx_send_clk_low - btfsc GPIO,SCLK + btfsc SCLK goto rx_send_clk_low rx_send_clk_high - btfss GPIO,SCLK + btfss SCLK goto rx_send_clk_high btfss RX_CSUM,7 - bcf GPIO,SDAT + bcf SDAT btfsc RX_CSUM,7 - bsf GPIO,SDAT + bsf SDAT decfsz RX_BIT_CNT,f goto rx_send_next bsf STATUS,RP0 - bsf TRISIO,SDAT + bsf SDAT bcf STATUS,RP0 return @@ -525,13 +525,13 @@ send_char xorwf PARITY,f char_next_element - bsf GPIO,CWOUT + bsf CWOUT btfss ELEMENT,7 movf DOT,w btfsc ELEMENT,7 movf DASH,w call dottime - bcf GPIO,CWOUT + bcf CWOUT rlf ELEMENT,f @@ -720,7 +720,7 @@ send_parity ;; ------------------------------------- send_beacon - bsf GPIO,CWENABLE + bsf CWENABLE movf TUNE,w call dottime clrf PARITY @@ -749,13 +749,13 @@ send_beacon ;; TODO write new cnt value to EEPROM beacon_end - bcf GPIO,CWENABLE + bcf CWENABLE return ;; ------------------------------------- send_ack movwf ACK_DATA - bsf GPIO,CWENABLE + bsf CWENABLE movf TUNE,w call dottime clrf PARITY @@ -798,7 +798,7 @@ ack_next ack_parity call send_parity - bcf GPIO,CWENABLE + bcf CWENABLE return ;; ------------------------------------- |