YEAH!!!, almost.....
The config statement helped a bit, now the LEDs on PORTC blinks. But nothing on PORTB.
I set MCLRE_OFF instead of MCLRE_ON and now I even can have the programmer connected and the chip works.
I have a pull-up resistor on MCLR also, but it works without it too. And current limiting resistors on the LEDs.
Now all I want is to get PORB to blink, then im up and running. I really want to migrate to PBP. GCB was great, but a little too many bugs for me.
PORTB.6 and PROB.7 is always connected to the programmer circuit (a homemade AN589 programmer).
The thing is that when I used the original circuit and wrote the code in GCB, everything worked...
New code...
_______________________________________
#config
__config _CONFIG1, _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF
#endconfig
DEFINE OSC 4
OSCCON = %01100001
PORTB = 0
PORTC = 1
TRISB = %00000000
TRISC = %00000000
ADCON0 = %00000000
ANSEL = %00000000 ' Make AN0-AN7 digital
ANSELH= %00000000 ' Make AN8-AN13 digital
WHILE 1
TOGGLE PortB.0
toggle portc.0
toggle portc.1
pause 300 ' just to see something ...
WEND
END
_____________________________
Bookmarks