shirazmacuff
New Member
First I want to thank everyone for all the help in the past.
I’ve have now started on my pic project.
I cannot seem to get data out to pin RA0,RA1 in mpsim
I don’t know if the port is configured correctly
Here is the code
Thanks
//////////////////////////////////////////////
#define Bank0 0x00 ;
#define Bank1 0x80
;/////////////////////////////////
PORT_A_OUTPUT
banksel Bank1
clrf TRISA
return
;/////////////////////////////////
PORT_A_DIGITAL
banksel Bank1
clrf ANSEL ;analog select
return
;/////////////////////////////////
PORT_A_OUT_HIGH
call PORT_A_OUTPUT
call PORT_A_DIGITAL
banksel Bank0
bcf PORTA,0 ;not working
bcf PORTA,1 ;not working
bsf PORTA,2 ;working
bsf PORTA,4 ;working
bsf PORTA,5 ;working
return
I’ve have now started on my pic project.
I cannot seem to get data out to pin RA0,RA1 in mpsim
I don’t know if the port is configured correctly
Here is the code
Thanks
//////////////////////////////////////////////
#define Bank0 0x00 ;
#define Bank1 0x80
;/////////////////////////////////
PORT_A_OUTPUT
banksel Bank1
clrf TRISA
return
;/////////////////////////////////
PORT_A_DIGITAL
banksel Bank1
clrf ANSEL ;analog select
return
;/////////////////////////////////
PORT_A_OUT_HIGH
call PORT_A_OUTPUT
call PORT_A_DIGITAL
banksel Bank0
bcf PORTA,0 ;not working
bcf PORTA,1 ;not working
bsf PORTA,2 ;working
bsf PORTA,4 ;working
bsf PORTA,5 ;working
return