12f675 making me a crazy person


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    You have RETURNs with GOTOs .
    Try going to the subroutines with GOSUB and then RETURN. Not both GOTO and RETURN.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Oct 2006
    Location
    Edmonton AB Canada
    Posts
    52


    Did you find this post helpful? Yes | No

    Default

    Dave,

    There are two iterations of that, in a somewhat silly attempt to validate that the RETURN was working - or failing. No difference. Irrespective, they've been removed.
    The TRIG output goes high and low exactly as it should, when the CHUBB input goes high or low. That tells me the loop is looping. (Loopy?)
    After startup, the TWO led routines do work. ONCE.
    I can't see anything that is unhappy in the counting, the compiler likes it, and it seems to read ok, it just doesn't work.

    What the heck....

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


    Did you find this post helpful? Yes | No

    Default

    Hi Gary,
    try ADCON0 = 0
    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.

  4. #4
    Join Date
    Oct 2006
    Location
    Edmonton AB Canada
    Posts
    52


    Did you find this post helpful? Yes | No

    Default

    Joe,

    No better.
    This is very very strange....

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Something is strange.

    I just tried your code for giggles and this is what happened.
    Executing: "C:\PBP\PBPW.EXE" -ampasmwin -oq -z -p12F675 "C:\MAC\PIC PROGS\TEST\12f675.bas"
    PICBASIC PRO(TM) Compiler 2.50c, (c) 1998, 2008 microEngineering Labs, Inc.
    All Rights Reserved.

    ERROR: RAM END must be defined.
    ERROR: RAM BANKS must be defined.
    ERROR: No LIBRARY statement or LIBRARY parameter.
    ERROR: No LIBRARY statement or MACRO parameter.
    ERROR: Unable to open file PBPMAC.INCHalting build on first failure as requested.
    BUILD FAILED: Tue Sep 15 20:40:41 2009
    It is not your code, something else is the matter. A lot of folks seem to be having problems with this chip....
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Oct 2006
    Location
    Edmonton AB Canada
    Posts
    52


    Did you find this post helpful? Yes | No

    Default

    Dave,

    That's interesting.....
    I tried with various settings in the config, watchdogs on and off, etc. I always use a 4k7 from MCLR to +5. That's just a "standard" here, and I always use the internal osc, and have never strayed far from 4mhz, so suffice to say that the config is pretty "plain".

    Most of the timing floats someplace around variations of 1000 so that an aprox count in seconds should tell me when things happen.

    The ONLY change here since the last functional chip is 4.31 software on the MELabs Programmer. And it's interesting that there's another thread nearby that the fellow is using the same programmer (although a much older code) and having "odd" issues.

    Once again I've shipped it over to MELabs with a request for help.

    Thanks to all who have responded. This kind of discussion is enlightening..

    Cheers
    Gary

  7. #7
    Join Date
    Oct 2006
    Location
    Edmonton AB Canada
    Posts
    52


    Did you find this post helpful? Yes | No

    Default

    Jerson,

    The only change I see in your suggestion is an "else" for the Chubb. That part of the code is the only part that works repeatedly....

    There is something whacked in the way the counter stuff is getting either compiled or put to the chip, or interpreted by the chip. That part is going off into lala land.

    Gary

Similar Threads

  1. 12F683 vs 12F675.
    By sccoupe in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th July 2009, 05:58
  2. Instant Interupts with a 12f675
    By wlundonly in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 26th January 2008, 02:52
  3. 12F675 won't reprogram or erase
    By modifyit in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 19th May 2006, 06:07
  4. 12f675 serial pic2pic
    By tagan in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 12th March 2006, 23:55
  5. Multitasking 12F675 I/O
    By jpeakall in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 26th November 2003, 01:57

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