Life after 2k w/ 16F648


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Talking

    Hi, Bruce

    You'll laugh ... that's exactly what I'd like the program to do !!!

    let's see closer :

    if value is between A and B ... test fails and program computes the mean value. That runs well.

    if value is out from A to B , it means signal is out of limits ( Wrong signal ) or no signal at all ( pulsin returns 0 - note pulsin_max defined 12500 @ 20 Mhz).
    Then, loop is supposed to be endless and generating spare signals to outputs until a correct input signal is found.

    I had a closer look lighting a led as a "pass flag": Even with no incoming signal at all, test for value never comes true ... led do not light up when High led is placed
    right after "value2 = ..."
    But the Pulsin statement is run well.

    Note between the end of this bit of program and the sub, there's a goto to the "good incoming pulse section" ...

    If you want the full prog. ( source is ~ 500 lines ...) to have a better view, it will be without any other than the copyright limitations.

    The most confusing thing is those lines ( they are Copied and pasted from other program ... with same variables !!! ) work perfectly on shorter programs aboard 16F628s.

    As I told Dwayne, an IF THEN statement placed after those lines also always returns YES. ...
    EVEN values must return NO ...

    I seriously think the problem is located in the IF THEN tests ( all the tests... )as Pulsin returns the correct value for the incoming pulse !!!

    Alain
    Last edited by Acetronics2; - 24th June 2005 at 10:34.

  2. #2
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Ace,

    Did you try that While and endwhile code I gave you???

    What that code is doing, is ridding you of a "Burp" jump out of a "IF" statement.

    Take a look at that while /endwhile code I posted.

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

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


    Did you find this post helpful? Yes | No

    Default

    Hi, Dwayne

    Thanks

    I'll try that this week-End ... on the Breadboard, Electronics is not my job !!!

    What feds me up is that ALL the IF THEN tests I place after this part of code( wich crosses the 2K limit ...) have a YES answer ... whatever the test does.

    I'll try to confirm with a " IF 1 = 0 THEN ..." ... we'll see then.

    I'll also try to move my subs at the real END of the program ( I have a GOTO - GOTO part added after the subs ) REMEMBER it runs like that on a 16F628 ....
    AND everything has END separators not to punch through.

    IF you want the source ... it's the R/C magic box !!! ( parallelling and trimming center and half travel for two servos driven by one channel )

    Alain
    Last edited by Acetronics2; - 24th June 2005 at 16:02.

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi, Folks ...

    The problem is solved ... but that doesn't give me the explanation !!!

    I Only placed better the GOTO - GOTO part BEFORE THE SUBs ... Then everything works well !!!
    So, I note Subs MUST be placed before or after any program ...

    But the return pile should not have been affected by a GOTO-GOTO section ...

    Some compiler secrets are still alive ....

    Alain

Similar Threads

  1. Worst day of my life
    By brid0030 in forum USB
    Replies: 6
    Last Post: - 12th March 2008, 23:27
  2. EEPROM life expectancy?
    By muddy0409 in forum General
    Replies: 3
    Last Post: - 1st May 2007, 13:44
  3. Replies: 5
    Last Post: - 12th February 2007, 00:55
  4. Any chance of Life being easy?
    By josegamez in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 2nd November 2006, 21:52
  5. above 2k with 16F877
    By Peter Oors in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 6th March 2006, 13:43

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