Maker Pro
Maker Pro

Need help with 16f88 outputs

sideburn

Jun 14, 2013
75
Joined
Jun 14, 2013
Messages
75
Hi all,

I am having trouble getting outputs to work properly with a 16F88.
Everything works as expected when using the debugger but when I run the program by itself the outputs are not activating high.
I have tried pulling up MCLR to VCC though a 10K resistor but that did not help. I have tried setting MCLRE both ON and OFF as well.

__CONFIG(WDTE_OFF & MCLRE_ON & CP_OFF & BOREN_OFF & FOSC_INTOSCCLK & PWRTE_OFF & LVP_OFF);

INTCON = 0x0; // Disable interupt
CMCON = 0x7; // Comparators OFF
ANSEL = 0x00; //set digital inputs
ADCON0 = 0x00;
ADCON1 = 0x00;

//enable weak pullups on portB
nRBPU = 0;

TRISB6 = 0;
TRISA3 = 0;
TRISA2 = 0;
TRISA1 = 0;
TRISA0 = 0;

do {
PORTA = 0x00;
__delay_ms(1000);
PORTA = 0xFF;
__delay_ms(1000);
} while(1);

All outputs alternate high and low (LED's flash) when running with the debugger but they do not light at all when not running in the debugger.

Any ideas?
 
Last edited:

sideburn

Jun 14, 2013
75
Joined
Jun 14, 2013
Messages
75
Oops, I think I solved it. I had a GND pin wrong on my breadboard! :eek:
 
Top