12F683 Startup


Closed Thread
Results 1 to 5 of 5

Thread: 12F683 Startup

Hybrid View

  1. #1
    GregK's Avatar
    GregK Guest


    Did you find this post helpful? Yes | No

    Default 12F683 Startup

    Hi Ralph,

    Thanks for your reply.

    Let me explain a little more about the problem. The "Loop" is just to debug a problem I am having when I first power up the pic. The two input pins used in the program are pulled up through 10K resis. The third input pin (gpio.3) is always an input, and internally pulled up.

    The problem I don't understand is why both LED's are ON when I first power up the pic, with no input pins grounded. I set the outputs Low before the "Loop" and yet they are High when I power the Pic up. I have tried other 12F683's with the same results.

    Greg

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    See if this configuration works for you. Note - you won't need the external pull-ups.
    Code:
    @ device pic12f683, fcmen_off, ieso_off, intrc_osc, wdt_off
    @ device pic12f683, pwrt_on, mclr_off, protect_off 
    
    GPIO = %00000000 ' All outputs low
    CMCON0=7         ' Comparators off
    ANSEL=0          ' All digital
    TRISIO=%00111000 ' Setup ins & outs
    WPU=%00110000    ' Pull-ups on for GPIO.4 & 5 inputs
    OPTION_REG.7=0   ' Enable internal pull-ups
    The default PBP header file for this device doesn't call-out the power-up timer (PWRT), so it defaults to off. This can cause some odd things to happen if your power supply is slow rising.

    You don't need to configure ADCON0 or VRCON unless you're using A/D & comparators.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    GregK's Avatar
    GregK Guest


    Did you find this post helpful? Yes | No

    Default 12f683

    Hi Bruce,

    I tried your changes and it works like a charm!
    Now if I can get the rest of the program to work.

    Thanks for your help.

    Greg

Similar Threads

  1. 12F683 - Pin1 not working
    By ruijc in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th February 2014, 18:38
  2. 12F683 Programmer
    By Red_Stafford in forum Schematics
    Replies: 9
    Last Post: - 2nd October 2008, 22:44
  3. 12F683 HPWM Usage
    By MARAD75 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th November 2007, 03:16
  4. 16f677a to 12f683
    By ChrisHelvey in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 25th July 2007, 07:16
  5. 12f683 comparator and pwm
    By Automan in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd May 2007, 19:05

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