PIC12F675 not working


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2006
    Location
    New Hampshire, USA
    Posts
    107

    Default PIC12F675 not working

    I have use this configuration before with no problem, I don't know what is wrong. GPIO.0 never goes high.

    REM DEVICE = 12F675
    CMCON = 7 'SETS DIGITAL MODE
    ANSEL = 0 'GPIO.0 TO GPIO.3 SET AS DIGITAL
    OPTION_REG = 0 'WEAK PULLUPS ENABLED
    TRISIO = %00001100 'GPIO.2 AND GPIO.3 SET AS INPUT
    VRCON.7 = 0 'TURN OFF VOLTAGE REFERENCE
    ' ************************************************** ***************
    'CONDITIONS: INTERNAL OSC CLOCK OUT, WDT DISABLED, PWR UP TIMER DISABLED,
    'MCLR FUNCTION: INPUT PIN, BROWN OUT RESET DISABLED, NO PROTECTION
    DEFINE OSCCAL_1K 1 'SAVES OSCILLATOR CALIBRATION
    START:
    HIGH GPIO.0
    PAUSE 100
    LOW GPIO.0
    PAUSE 100
    IF NOT GPIO.2 AND NOT GPIO.3 THEN START 'IF BOTH ARE LOW, THEN LOOP
    LOW GPIO.0
    PAUSE 500

    IF GPIO.2 OR GPIO.3 THEN HIGH GPIO.0 'ENERGIZE RELAY
    IF NOT GPIO.2 AND NOT GPIO.3 THEN DELAY
    GOTO START


    DELAY:
    PAUSE 2000 '2 SECONDS
    LOW GPIO.0 'DE-ENERGIZE RELAY
    GOTO START
    END

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Looks like a faulty device, bad hardware (socket/breadboard) or device programmer issue to me.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Assuming the chip is all right, check if your osccal value has been inadvertently erased.

    Regards,

    Anand

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi Russ,
    You have not included any config statement, check your 12F675.inc file to make sure you have not commented them out. I am thinking maybe you have none going into your code.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Talking Detail

    Hi, Russ

    WPU register settings are missing .... WHICH inputs must be pulled up ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Jan 2006
    Location
    New Hampshire, USA
    Posts
    107


    Did you find this post helpful? Yes | No

    Default

    Thanks for your insight, I pulled the mosfet that was being driven and now the IC works. The mosfet was shorted.

Similar Threads

  1. PIC12F675 problem with port 5
    By NL2TTL in forum mel PIC BASIC
    Replies: 2
    Last Post: - 5th June 2009, 01:23
  2. SERIN with a PIC12F675
    By ewandeur in forum Serial
    Replies: 4
    Last Post: - 30th July 2007, 15:04
  3. PIC12F675 trouble
    By russman613 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 27th February 2006, 18:40
  4. Erratic PIC12F675 behavior
    By russman613 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 27th February 2006, 14:46
  5. Input not working with PIC12F675
    By Henque19 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 15th January 2006, 11:27

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts