diff options
Diffstat (limited to 'software/idm/idm.asm')
-rw-r--r-- | software/idm/idm.asm | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/software/idm/idm.asm b/software/idm/idm.asm index 34bfced..d36422a 100644 --- a/software/idm/idm.asm +++ b/software/idm/idm.asm @@ -30,10 +30,29 @@ ;; ------------------------------------- ;; DEFINES -CNT0 EQU H'0020' -CNT1 EQU H'0021' -CNT2 EQU H'0022' -TMP EQU H'0023' + ;; constants + + ;; I/O Pins +;; PortA +C1m EQU .0 +C2p EQU .1 +AMP_OUT EQU .2 +ADC_IN EQU .3 +CCP4 EQU .4 +;; PortB +SDI EQU .1 +SDO EQU .2 +INT EQU .3 +SCK EQU .4 +CS EQU .5 +FILTER_EN EQU .7 + + ;; variables + ;; all Pages +CNT0 EQU H'0070' +CNT1 EQU H'0071' +CNT2 EQU H'0072' +TMP EQU H'0073' ;; ------------------------------------- ;; OFFSET @@ -53,8 +72,8 @@ int_spi bcf PIR1,SSP1IF movlb b'00000100' movf SSP1BUF,w - incf INDF0,f - movf INDF0,w + incf TMP,f + movf TMP,w movwf SSP1BUF movlb b'00000000' bcf PORTA,7 @@ -103,12 +122,9 @@ init bcf PORTA,7 bcf PORTB,3 + - clrf FSR0H - movlw TMP - movwf FSR0H - clrf INDF0 - + ;; ------------------------------------- ;; MAINLOOP main |