12F683 - Pin1 not working


Closed Thread
Results 1 to 4 of 4

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Code:
    inp:
    if but=1 then
    mem1=mem1+1
    endif
    if mem1>12 then
    mem1=1
    endif
    write eep1,mem1
    return <<--- return to where? Maybe GOTO Init?
    RETURN should only be used when you GOSUB to get there.

    Also this;
    Code:
    high stops
    low turnsign 
    low bottom
    May also lead to trouble. It can cause read-modify-write. Sometime it's best to write to the whole port at once instead of multiple high low statements together.

    What happens if you place a PAUSE 500 after each line where you try to set or clear turnsign?

    Sometimes there may be a little more capacitance on one output than others, and setting of clearing port bits one-after-another will cause read-modify-write. The value you expect on an output may not be what you expect since the 2nd bsf or bcf operation causes the previous pin to be read back (before it has changed) and written back to the pin.
    Regards,

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

  2. #2
    Join Date
    Jan 2007
    Posts
    78


    Did you find this post helpful? Yes | No

    Default Re: 12F683 - Pin1 not working

    Just one thought ruijc
    Since your trying to troubleshoot the functionality of a pin to a particular device (perhaps an LED) , why not consider reducing down to the lowest level?
    Create a program to control that one device and nothing more.
    You can swap the code and wiring from gpio.0 to gpio.1 to see if the device is acting differently. That would allow you to verify if the issue is hardware vs code.
    In some cases, I have had to sink a device rather than source it due to current limitations on the PIC. Hope that helps. :-]

  3. #3
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: 12F683 - Pin1 not working

    The original post is dated more than 5 years ago. I suspect his son is old enough to help figure out what is wrong by now.

Similar Threads

  1. 16F877A with 20MHz XTAL not working?
    By ustredna in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 19th August 2011, 15:04
  2. Blink.Bas on 18f45k20 Newbie seeks working example.
    By DiscoEd in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 29th December 2009, 03:36
  3. New project help rapidfire on 12f683
    By thm ov3rkill in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 27th December 2008, 19:59
  4. 16f677a to 12f683
    By ChrisHelvey in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 25th July 2007, 06:16
  5. Hserin not working...
    By robert0 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 22nd August 2005, 12:25

Members who have read this thread : 1

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