summaryrefslogtreecommitdiff
path: root/software/ctr/ctr.asm
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2012-06-07 17:43:11 +0000
committerChristian Pointner <equinox@mur.at>2012-06-07 17:43:11 +0000
commit8bd7979da0b89b2757f2dcb3818f92189d05c8ae (patch)
treeeadb010f517b420f8f7ed408c2ea968d51e6227b /software/ctr/ctr.asm
parentimproved port pin definitions (diff)
improved port pin assigments
git-svn-id: https://svn.spreadspace.org/mur.sat@512 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software/ctr/ctr.asm')
-rw-r--r--software/ctr/ctr.asm96
1 files changed, 48 insertions, 48 deletions
diff --git a/software/ctr/ctr.asm b/software/ctr/ctr.asm
index bdff971..281321e 100644
--- a/software/ctr/ctr.asm
+++ b/software/ctr/ctr.asm
@@ -53,57 +53,57 @@ OSC_HIGH EQU b'01101000' ; 4 MHz
;; I/O Pins
;; PortA
-CW_ENABLE EQU 2
-CW_OUT EQU 3
-IHU_SS EQU 5
-IHU_SDO EQU 6
-IHU_INT EQU 7
+#define CW_ENABLE PORTA,2
+#define CW_OUT PORTA,3
+#define IHU_SS PORTA,5
+#define IHU_SDO PORTA,6
+#define IHU_INT PORTA,7
;; PortB
-CLK_1HZ EQU 0
-IHU_SDI EQU 1
-CRX_INT EQU 3
-IHU_SCK EQU 4
-I2C_SDA EQU 6
-I2C_SCL EQU 7
+#define CLK_1HZ PORTB,0
+#define IHU_SDI PORTB,1
+#define CRX_INT PORTB,3
+#define IHU_SCK PORTB,4
+#define I2C_SDA PORTB,6
+#define I2C_SCL PORTB,7
;; variables
;; page 0 only
-ELEMENT EQU H'0020'
-ELECNT EQU H'0021'
-CHAR EQU H'0022'
-PARITY EQU H'0023'
-CHARCNT EQU H'0024'
-PENTLE0 EQU H'0025'
-PENTLE1 EQU H'0026'
-PENTLECNT EQU H'0027'
-ACK_DATA EQU H'0028'
-TMP1 EQU H'0029'
-TMP2 EQU H'002A'
-
-BUF EQU H'0040'
-BUF_END EQU H'004F'
+ELEMENT EQU H'0020'
+ELECNT EQU H'0021'
+CHAR EQU H'0022'
+PARITY EQU H'0023'
+CHARCNT EQU H'0024'
+PENTLE0 EQU H'0025'
+PENTLE1 EQU H'0026'
+PENTLECNT EQU H'0027'
+ACK_DATA EQU H'0028'
+TMP1 EQU H'0029'
+TMP2 EQU H'002A'
+
+BUF EQU H'0040'
+BUF_END EQU H'004F'
;; all pages
-BEACON_INTL EQU H'0070'
-BEACON_INTH EQU H'0071'
-DOT EQU H'0072'
-ESPACE EQU DOT
-DASH EQU H'0073'
-CSPACE EQU DASH
-WSPACE EQU H'0074'
-TUNE EQU H'0075'
-
-I2C_BYTE EQU H'0077'
-I2C_BIT_CNT EQU H'0078'
-I2C_BYTE_CNT EQU H'0079'
-
-NVSTATE EQU H'007A'
-BEACONCNTH EQU H'007B'
-BEACONCNTL EQU H'007C'
-STATE EQU H'007D'
-W_TEMP EQU H'007E'
-STATUS_TEMP EQU H'007F'
+BEACON_INTL EQU H'0070'
+BEACON_INTH EQU H'0071'
+DOT EQU H'0072'
+ESPACE EQU DOT
+DASH EQU H'0073'
+CSPACE EQU DASH
+WSPACE EQU H'0074'
+TUNE EQU H'0075'
+
+I2C_BYTE EQU H'0077'
+I2C_BIT_CNT EQU H'0078'
+I2C_BYTE_CNT EQU H'0079'
+
+NVSTATE EQU H'007A'
+BEACONCNTH EQU H'007B'
+BEACONCNTL EQU H'007C'
+STATE EQU H'007D'
+W_TEMP EQU H'007E'
+STATUS_TEMP EQU H'007F'
;; -------------------------------------
;; OFFSET
@@ -318,8 +318,8 @@ init
movlw b'01100000'
movwf APFCON0
clrf APFCON1
- bcf LATB,I2C_SDA
- bcf LATB,I2C_SCL
+ bcf I2C_SDA
+ bcf I2C_SCL
;; BANK 1
movlb .1
@@ -338,8 +338,8 @@ init
movwf INTCON
- bcf PORTA,CW_OUT
- bcf PORTA,CW_ENABLE
+ bcf CW_OUT
+ bcf CW_ENABLE
clrf NVSTATE ; TODO: read State from EEPROM
movlw .42