summaryrefslogtreecommitdiff
path: root/software/ihu/ihu.asm
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2012-06-07 17:34:39 +0000
committerChristian Pointner <equinox@mur.at>2012-06-07 17:34:39 +0000
commit06c643e22a9c5c6d5e8b4139403f2d25700c0f67 (patch)
treecfa620bfb520071d2863f534954ddc164942bcb4 /software/ihu/ihu.asm
parentbetter Port Pin definitions (diff)
improved hardware definitions
git-svn-id: https://svn.spreadspace.org/mur.sat@510 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software/ihu/ihu.asm')
-rw-r--r--software/ihu/ihu.asm82
1 files changed, 41 insertions, 41 deletions
diff --git a/software/ihu/ihu.asm b/software/ihu/ihu.asm
index 487d8e0..d8bf6d5 100644
--- a/software/ihu/ihu.asm
+++ b/software/ihu/ihu.asm
@@ -41,43 +41,43 @@
;; I/O Pins
;; PortA
-SOLAR_C0 EQU 0
-SOLAR_C1 EQU 1
-SOLAR_C2 EQU 2
-SOLAR_C3 EQU 3
-OWIRE EQU 4
-SOLAR_C4 EQU 5
+#define SOLAR_C0 PORTA,0
+#define SOLAR_C1 PORTA,1
+#define SOLAR_C2 PORTA,2
+#define SOLAR_C3 PORTA,3
+#define OWIRE PORTA,4
+#define SOLAR_C4 PORTA,5
;; PortB
-DTMF_INT EQU 0
-BAT_V EQU 1
-SOLAR_V EQU 2
-BAT_C EQU 3
-I2C_SDA EQU 4
-I2C_SCL EQU 5
-RTC_INT EQU 6
-RTC_RST EQU 7
+#define DTMF_INT PORTB,0
+#define BAT_V PORTB,1
+#define SOLAR_V PORTB,2
+#define BAT_C PORTB,3
+#define I2C_SDA PORTB,4
+#define I2C_SCL PORTB,5
+#define RTC_INT PORTB,6
+#define RTC_RST PORTB,7
;; PortC
-MPU_PWRDWN EQU 0
-MPU_RESET EQU 1
-UNDEF_C2 EQU 2
-UNDEF_C3 EQU 3
-UNDEF_C4 EQU 4
-UNDEF_C5 EQU 5
-MPU_TX EQU 6
-MPU_RX EQU 7
+#define MPU_PWRDWN PORTC,0
+#define MPU_RESET PORTC,1
+#define UNDEF_C2 PORTC,2
+#define UNDEF_C3 PORTC,3
+#define UNDEF_C4 PORTC,4
+#define UNDEF_C5 PORTC,5
+#define MPU_TX PORTC,6
+#define MPU_RX PORTC,7
;; PortD
-DTMF_D0 EQU 0
-DTMF_D1 EQU 1
-DTMF_D2 EQU 2
-DTMF_D3 EQU 3
-DTMF_PWRDWN EQU 4
-TTX_RESET EQU 5
-TTX_SCL EQU 6
-TTX_SDA EQU 7
+#define DTMF_D0 PORTD,0
+#define DTMF_D1 PORTD,1
+#define DTMF_D2 PORTD,2
+#define DTMF_D3 PORTD,3
+#define DTMF_PWRDWN PORTD,4
+#define TTX_RESET PORTD,5
+#define TTX_SCL PORTD,6
+#define TTX_SDA PORTD,7
;; PortE
-SOLAR_C5 EQU 0
-SOLAR_C6 EQU 1
-SOLAR_C7 EQU 2
+#define SOLAR_C5 PORTE,0
+#define SOLAR_C6 PORTE,1
+#define SOLAR_C7 PORTE,2
;; variables
;; page 0 only
@@ -215,19 +215,19 @@ int_dtmf_end
int_tmr1
decfsz DTMF_TIMEOUT,f
goto int_tmr1_end
- bsf PORTD,DTMF_PWRDWN
+ bsf DTMF_PWRDWN
bcf T1CON,TMR1ON
movlw DTMF_BUF
movwf DTMF_BUF_PTR
clrf DTMF_CS
- bcf PORTD,DTMF_PWRDWN
+ bcf DTMF_PWRDWN
int_tmr1_end
bcf PIR1,TMR1IF
goto interrupt_end
int_rtc
- btfsc PORTB,RTC_RST
+ btfsc RTC_RST
call rtc_init
goto int_rtc_end
@@ -316,7 +316,7 @@ init
clrf PORTB
- bcf PORTD,DTMF_PWRDWN
+ bcf DTMF_PWRDWN
movlw DTMF_BUF
movwf DTMF_BUF_PTR
clrf DTMF_CS
@@ -325,16 +325,16 @@ init
movlw b'00110000'
movwf T1CON
- bcf PORTD,TTX_SCL
- bcf PORTD,TTX_SDA
+ bcf TTX_SCL
+ bcf TTX_SDA
nop
- bcf PORTD,TTX_RESET ;reset TTX
+ bcf TTX_RESET ;reset TTX
clrf TMR0
bsf INTCON,GIE
clrf TMP
- bsf PORTD,TTX_RESET
+ bsf TTX_RESET
goto main
;; -------------------------------------