Connect with us

PIC12F629 problem

Discussion in 'Electronic Design' started by DesignElect, Aug 7, 2003.

Scroll to continue with content
  1. DesignElect

    DesignElect Guest

    Hello,

    I'll try to explain what's happening as simply as possible:

    I've designed a fairly simple circuit based around a PIC12F629.

    It is configured as follows;

    GP0=digital O/P
    GP1=Analogue comparator input (Comparator mode 04h)
    GP2=Digital O/P
    GP3=digital I/P
    GP4=digital I/P
    GP5=digital I/P
    Internal voltage reference set to low voltage 01. Fed internally to CIN+.
    All Interrupts disabled, Internal oscillator, internal MCLR, pull-ups enabled
    on I/Ps except GP3.
    What happens is that the circuit works fine, but only when GP3 is pulled low.
    When it goes high, it appears to generate a reset, fairly regularly, but mostly
    at a point in the program just following reading the comparator status bit.
    (ie, the program re-starts). I have ran the program on the simulator and it
    goes fine. (It's not supported by my emulator)

    Has anyone come across this problem before? I am starting to think that there
    is a problem with this chip.... or does anyone know if it's possible that a
    problem with the programmer could cause something like this.

    Many thanks for any help,

    Peter
     
  2. Brian Logan

    Brian Logan Guest

    Could it be the watchdog that's resetting it? Maybe you're setting the config on
    the PIC when you program it, but not doing so on the simulator?
     
  3. Brian Logan

    Brian Logan Guest

    I notice GP3 is also the Vpp pin. Is it possible you are allowing this pin to go
    high enough to enter programming mode?

    How about decoupling? I know that the power needs VERY closely positioned
    decoupling for the internal oscillator to work reliably.
     
  4. Could it be the watchdog that's resetting it?
    If you think that is how the watchog works better read the datasheet
    (again).



    Wouter van Ooijen

    -- ------------------------------------
    http://www.voti.nl
    PICmicro chips, programmers, consulting
     
  5. DesignElect

    DesignElect Guest

    It's definitely disabled. And I can't see anywhere it can be re-enabled in
    I only wrote that for clarity
     
  6. DesignElect

    DesignElect Guest

    I notice GP3 is also the Vpp pin. Is it possible you are allowing this pin to
    That seems to have been the problem. Presumably, it can't have been going into
    reset mode through a MCLR as it's set to internal, that only leaves programming
    mode.
    A bit extra decoupling has sorted it out.

    Many thanks.

    Pete
     
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

-