pic12f683 being picky about pins...


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2007
    Posts
    74

    Default pic12f683 being picky about pins...

    So I have this PIC12F683 played with it for hours now, finally got one pin to act on a switch. I tried moving the working setup to another pin, and change just that in PBPro but it doesnt work! I change it back, and flash the program, it works... ? what gives

    ========Working Version======
    define OSC 4 'Set oscillator (clk) to 4MHz
    GPIO = %000000 'Set High/Low
    TRISIO = %100001 'Set Input/Output

    symbol IND = gpio.4
    symbol BUT = gpio.5

    ISR:
    while but = 1
    low ind
    pause 100
    high ind
    pause 100
    wend
    goto pp

    PP:
    low ind
    pause 5
    goto isr

    NP:
    high IND
    pause 5
    goto isr

    only change in the 'broke' version is

    symbol BUT = gpio.0

  2. #2
    Join Date
    Jul 2007
    Posts
    74


    Did you find this post helpful? Yes | No

    Default

    figured it out, needed to add in the

    ANSEL = %0110000

Similar Threads

  1. 16F877A Pullups/Pulldowns and unused pins
    By DavyJones in forum General
    Replies: 6
    Last Post: - 17th April 2009, 01:39
  2. Problem setting pins on 12f675
    By srnet01 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 19th February 2009, 15:58
  3. Change On Interrupt, PIC16F884
    By elec_mech in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 14th November 2008, 17:25
  4. PIC - 8 Pins - 6 Output Pins ?
    By DanPBP in forum Off Topic
    Replies: 0
    Last Post: - 22nd October 2007, 00:23
  5. PIC PORT 'special' pins
    By barkerben in forum General
    Replies: 1
    Last Post: - 18th January 2005, 21:40

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