Connect with us

Need help with 16f88 outputs

Discussion in 'Microcontrollers, Programming and IoT' started by sideburn, Jun 30, 2013.

Scroll to continue with content
  1. sideburn


    Jun 14, 2013
    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.


    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;
    PORTA = 0xFF;
    } 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: Jun 30, 2013
  2. sideburn


    Jun 14, 2013
    Oops, I think I solved it. I had a GND pin wrong on my breadboard! :eek:
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day