Hi im currently working on PIC16C745 using MPLAB in assembly language..I have this GSm modem, when the OUTPUT is "ON" it be connected to GND and once it is connected to GND, it wil light up the LED RB0. ( the RTC i have not it work out yet) So after an hr ltr, the PIC will send a Signal to the GSM input, then the GSM will detect the Signal thus the modem will send a SMS to the User.So on and so for... But the problem is the LED does not light up..And i cant figure out why..PLEASE HELP!
I have this message shown on the output window after i build the source code:
Message[302] C:\DOCUMENTS AND SETTINGS\PROJECT\MY DOCUMENTS\ASHLEY055162R\TRAIL\ASH\P16C745\GSM\GSM.ASM 12 : Register in operand not in bank 0. Ensure that bank bits are correct.
( AND it is pointed to TRISA and TRISB)
This is my Soure code:
I have this message shown on the output window after i build the source code:
Message[302] C:\DOCUMENTS AND SETTINGS\PROJECT\MY DOCUMENTS\ASHLEY055162R\TRAIL\ASH\P16C745\GSM\GSM.ASM 12 : Register in operand not in bank 0. Ensure that bank bits are correct.
( AND it is pointed to TRISA and TRISB)
This is my Soure code:
Code:
#include <p16c745.inc> ; include the defaults for the chip
org 0x00000020
Start
clrf STATUS
clrf PORTB ; clear PORTB output latch
clrf PORTA ; Clear PORTA output latch
movlw b'00000000' ; Set all pins PORTB as output
movwf TRISB
ON
btfsc PORTA,4 ; Is GSM output ON?
goto ON ; No, go back check again
bsf PORTB,0 ; turn on RB0 (LED) only!
; RTC will start counting 1hr
;----------------After RTC finish counting 1hr------------
Start1
clrf PORTA ; clear PORTA output latch
movlw b'00010000' ; Set RA4 as Input port,and the rest as output
movwf TRISA
bsf PORTA,3 ; Set RA3 and Send signal '1' to modem input
;-----------------Application turn off--------------------
DebounceA
btfss PORTA,4 ; Is Modem output OFF?
goto DebounceA ; No, wait somemore
OFF
bcf PORTB,0 ; Turn off RB0 (LED) only
Start2
bcf PORTA,3 ; Clr RA3 and Send signal "0" to Modem input
goto Start
end