Performing a loop every 10ms


Closed Thread
Results 1 to 40 of 41

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    I do hope that people like wasssup will wise up. If they do not, and more of the world is filled with people like that... I fear for the future.
    I had a guy in my shop this morning, 32 years old, and I thought he was a smart guy, messes with electronics, etc.etc. Had a flat tire and didn't know how to change it so he called a tow truck. $200USD for the call!!! And he was here at the shop. He could've walked 15 feet and asked me to help him out...
    That's the kind of crap the world is facing sooner more than later...

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    I had a guy in my shop this morning, 32 years old, and I thought he was a smart guy, messes with electronics, etc.etc. Had a flat tire and didn't know how to change it so he called a tow truck. $200USD for the call!!! And he was here at the shop. He could've walked 15 feet and asked me to help him out...
    That's the kind of crap the world is facing sooner more than later...
    That fellow could have been just plain LAZY. Either way, he has a problem.

    Does this all boil down to the way kids are raised now days?
    Dave
    Always wear safety glasses while programming.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    That fellow could have been just plain LAZY. Either way, he has a problem.
    Does this all boil down to the way kids are raised now days?
    I don't think so... I acted up, my parents/relatives/adult around the block/etc, they all let me know it up-side the head.
    Might be the way those morons in 'high places' on their high-horses are telling us we have to raise kids nowadays...
    Remember getting slapped up-side the head in the grocery store by Mom 'cause you were messing around? Try and do that these days... Amazing how much a guy CAN'T get away with these days...

    Oh....you're talking about the guy in my shop!!!
    Ya, I've just figured out he's an idiot and/or Lazy...
    So we're all rubbing it in that the guy can't change a flat tire...and we'll probably continue to do so for another few weeks/months. (BTW - I took a look at his vehicle, the instructions, with pictures, are right there in his owner's manual in the glove box and a picture diagram in plain view on the trunk lid (boot cover?)...this guy is now in my book as useless...)

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


    Did you find this post helpful? Yes | No

    Default

    When I was growing up and Mom said that she was getting a SWITCH...She was not referring to an electrical component
    Dave
    Always wear safety glasses while programming.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    When I was growing up and Mom said that she was getting a SWITCH...She was not referring to an electrical component
    Ya, mine too...it think it was an OKMU switch...One kid, multiple uses...for some reason, I begin to think that I was always the one that turned that switch on........and it seems like it never turned off!

  6. #6
    Join Date
    Feb 2008
    Posts
    10


    Did you find this post helpful? Yes | No

    Thumbs down

    There you go people, my point has been backed up by these last few replies. I notice there are alot of assumptions being made.
    E.g. 1 From skimask: "You wanted it handed to you on a platter so you could modify it and call it your own and impress your teachers or your buddies...whatever..."

    Now that is some assumption. You jumped to that conclusion skimask, I know some other people on this form may do that, but all I needed was a somewhere to start. Go and look at my first post. See how innocent that looks? I guess the assumptions started right there. (:

    E.g. 2 From mackrackit: "Whatever happened to people that want to learn.. Seems like all anyone wants these days is their problems solved for them with as little effort as possible on their part."
    This person made the same assumption. What made you think I just wanted the answer straight up? It would have helped if someone could step me through how to set up Timer0.

    Acetronics thought this was a cut and paste party. All I needed was some guidance.

    Hmm I wonder what's going to be said next?
    Last edited by wasssup1990; - 15th February 2008 at 03:20.

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by wasssup1990 View Post
    Hmm I wonder what's going to be said next?
    Allow me.... ('cause most will )
    Post #1 = +
    Post #2 = +
    and so on...
    Post #15 = +
    Post #16 = +
    Post #17 = NEGATIVE - and it'll all downhill from there...thanks to...anyone...anyone...yep, you guessed it...

  8. #8
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    It's suppoased to be a loop every 10ms.
    Not an insult every 10 ms.

    It's like a "Pack of Wolves".
    And wasssup didn't start anything.

    Y'all need to mellow out, and write some code.

    Here's mine...

    Code:
    ReadingTaken VAR BIT
    TRM0IF       VAR INTCON.2
    TMR0IE       VAR INTCON.5
    TimerReload  CON 60
    
    OPTION_REG = %11010111   ; Assign Prescaler to TMR0, 1:256, internal clock
    TMR0 = TimerReload       ; Load timer for first delay
    TMR0IF = 0               ; Clear the interrupt flag
    ReadingTaken = 0         ; indicate reading hasn't been taken yet
    
    TMR0IE = 1               ; Enable TMR0 interrupt
    ON INTERRUPT GOTO TakeReading
    
    Main:
        If ReadingTaken then ; Wait for reading to be taken
            ReadingTaken = 0 ; Indicate the reading has been handled
    
            ; -- Reading has been taken, do something with it here --
        endif
    
    GOTO Main
    
    DISABLE
    TakeReading:
        TMR0 = TimerReload   ; reload timer for next period
        TMR0IF = 0           ; Clear the interrupt flag
    
       ; -- this is called every ~10.036ms -- (with 20mhz OSC)
       ;    Take your reading
    
       ReadingTaken = 1      ; Tell main loop that a reading has been taken
    RESUME
    ENABLE
    HTH,
    DT

Similar Threads

  1. Controlsystem for compact sporting (clay shooting)
    By Fredrick in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 30th July 2009, 16:48
  2. Serin to Serin2 ??
    By Gixxer in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th January 2008, 03:56
  3. Serial Relays
    By tazntex in forum General
    Replies: 3
    Last Post: - 17th May 2007, 17:42
  4. newbie Q - edge detection?
    By RMCRAVEN in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 9th October 2006, 08:20
  5. Newbie question:
    By Izone in forum mel PIC BASIC
    Replies: 2
    Last Post: - 26th February 2006, 16:24

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