The purpose is to enable port A & B become digital IO. But with this instruction, only PortA.6 & 7 not responded while Porta.5 become MCLR.
According to datasheet, i should access Config1 but PBP product syntax error.
The code is :
INCLUDE "modedefs.bas"
'Set clock source to internal @ 4MHZ
osccon = %01100010
'Set all analog pin as digital pin
ansel = %00000000
'Set Pin direction
TRISA = %00000000 'All PortA as output
TRISB = %00000000 'All PortB as output
Bookmarks