Timer PIC16F57


Closed Thread
Results 1 to 26 of 26

Thread: Timer PIC16F57

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    personnaly if i want to jump out of a while statement i would prefer to validate the WHILE condition and set a JUMP or FLAG bit to do XYZ task...

    well code will talk by itself...

    Code:
    Start:
         While AVar!=50
              if AVar==20 then 
                   AVar=50
                   FlagBit=1
                   endif
              Wend
         IF FlagBit=1 then Start
    BUT i would also prefer another approach... like two WHILE statement one after the other... case by case i guess.

    I don't belive that the Stack will be a problem since it's not a GOSUB...
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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


    Did you find this post helpful? Yes | No

    Default

    Hello Steve,

    Steve>>i would prefer to validate the WHILE condition and set a JUMP or FLAG bit to do XYZ task...<<

    Great minds think alike <grin>... (Hope you don't take that as a insult)

    I am like you... I like to force the while to do its job...

    Thanks Bud!... I hope things are well in Canada...

    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
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Great minds think alike ... (Hope you don't take that as a insult)
    i don't see why i should ;o]
    I hope things are well in Canada...
    couldn't be better thanks!!!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Feb 2005
    Location
    Portugal
    Posts
    79


    Did you find this post helpful? Yes | No

    Default Thankīs

    What i understand that itīs better to put a flag bit in a while do a goto in an if statement!! Ok...
    Thank 's to all of you for your help...

Similar Threads

  1. Elapsed Timer Demo
    By Darrel Taylor in forum Code Examples
    Replies: 111
    Last Post: - 29th October 2012, 18:39
  2. High Resolution Timer & Speed Calculator
    By WOZZY-2010 in forum Code Examples
    Replies: 4
    Last Post: - 7th February 2010, 17:45
  3. Timer + rc5
    By naga in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th November 2009, 08:56
  4. Timer interrupt frequency
    By Samoele in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th January 2009, 00:49
  5. timer interupt help 16f73
    By EDWARD in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd July 2005, 09:41

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