Interrupt won't execute.


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default We all know the answer .... again...

    If you have not looked at AND REJECTED the instant interupts that is made by DT (DT´s instant interupts) you should really look into that now.
    It is a way to solve all problems without even knowing how to spell to ASM.

    /me

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


    Did you find this post helpful? Yes | No

    Thumbs down

    Hi, Jumper

    DT Basic Interrupts are wayyy too slow, here ... and overall their execution time is not predictable for timing corrections ...

    so, no joy nor !

    You do have to deal with ASM ... or write the program in pure PBP, without any interrupts ...

    Alain

    PS: and do not forget DT Bas ints consume a lot of RAM ...

    @ BB

    Does this mean there's another way of doing this without interrupts?

    Bear in mind that I need to expand this to running two servos at once.
    I alredy built a 4 channels fail-safe in pure PBP ... 4 Channels to read and 4 channels to output ... so, your project looks quite doable.
    Writing a neat timechart ... of course.
    Last edited by Acetronics2; - 25th March 2010 at 10:33.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Mar 2010
    Posts
    12


    Did you find this post helpful? Yes | No

    Unhappy One last question.

    alright Ace, I give in, you've got me in dispair with this project, I'll look for a totally different way.

    I alredy built a 4 channels fail-safe in pure PBP ... 4 Channels to read and 4 channels to output ... so, your project looks quite doable.
    Writing a neat timechart ... of course.
    Is this something you've released that I can learn from or even adapt?

    If I can't see the code, can you give me some hints about the way forward?

    I don't mind all the time charts in the world, but what's it for?

    I'll stop bothering you now, time for bed.

    Either way, thanks for the help, it's good to know when the idea you've got is impossible, that way you can move on; even if it is disheartening. Sniff...

    I'll check out DT's interrupts anyway - always learning.

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


    Did you find this post helpful? Yes | No

    Wink

    Ok BB

    First of all ...

    explain with clear words what your device has to do :

    from which inputs (w/ details ) to which outputs ( w/details ) ...

    50% of the work is here ...

    Alain

    PS: and stop thinking " C " ... you must think " Basic " now ! ( ROFL)
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    DT Basic Interrupts are wayyy too slow, here ... and overall their execution time is not predictable for timing corrections ...
    Too Slow???
    For a Servo??? Get real.
    I've run 16 servo's simultaneously with DT_INTS.

    Timing not predictable??? What???
    It's extremely predictable. What are you talking about?

    PS: and do not forget DT Bas ints consume a lot of RAM ...
    oooo, ~50 bytes to have super easy interrupts, yeah too much RAM.

    Quote Originally Posted by bison_bloke
    alright Ace, I give in, you've got me in dispair with this project, I'll look for a totally different way.
    Don't listen to Alain.
    He's just being obstinate.
    DT

  6. #6
    Join Date
    Mar 2010
    Posts
    12


    Did you find this post helpful? Yes | No

    Default Ok, let's see if we can make something of this mess...

    I've run 16 servo's simultaneously with DT_INTS.
    Does this mean there's code out there that I can directly adapt?

    Where would I find this?

    explain with clear words what your device has to do :

    from which inputs (w/ details ) to which outputs ( w/details ) ...
    I have two inputs: start/stop button and a 'selector switch' which I already have working with that if statement you see above.

    I have three outputs: two servos that I need to 'bounce' independently of each other. I need them to simulate the somewhat random movements that a passenger in a car would experience whilst driving. The third input is for vibration, this is just an unbalanced DC motor - np.

    I also want to run a countdown timer so that it gets turned of after 20mins.

    50% of the work is here ...
    So now that my project is exactly half done, which way do I head?

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by bison_bloke View Post
    Does this mean there's code out there that I can directly adapt?

    Where would I find this?
    Well, that program is extensive ... each channel has it's own Center Trim, Gain and 10-bit positions, with stored programmed movements.
    Never released it. Because I'd have to support it.

    But since you don't seem to mind ON INTERRUPT ... there's a sample at meLabs for the LAB-X1 board.
    It drives 2 servos using interrupts.
    Has buttons, an LCD ... sounds just like what you wanted.

    servosx.bas
    http://melabs.com/resources/samples.htm
    <br>
    DT

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


    Did you find this post helpful? Yes | No

    Question

    Quote Originally Posted by bison_bloke View Post
    I have two inputs: start/stop button and a 'selector switch' which I already have working with that if statement you see above.

    I have three outputs: two servos that I need to 'bounce' independently of each other. I need them to simulate the somewhat random movements that a passenger in a car would experience whilst driving. The third input is for vibration, this is just an unbalanced DC motor - np.

    I also want to run a countdown timer so that it gets turned of after 20mins.



    So now that my project is exactly half done, which way do I head?
    Hi, BB

    Just missing : is both servos position given by a unique " selector pot " ( 6 positions , if I have correctly understood ) , so both servos receive same driving pulse ???

    Alain

    For the Heading ...

    I'd propose you a " system clock " @ 50 Hz ... with a timer interrupt ( very, very simple kind of interrupt ). And as 20 mins = 60000 " ticks " @ 50 Hz ... it's done

    If you think to it, tasks are done in a linear way and the whole sequence is repeated @ 50 Hz ...

    so, just let me an hour to open the '690 Datasheet ( never worked with this chip to the day ) ...
    Last edited by Acetronics2; - 26th March 2010 at 08:28.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  9. #9
    Join Date
    Mar 2010
    Posts
    12


    Did you find this post helpful? Yes | No

    Default

    Both servos will run on different signals. There will be no pots involved.

    The user selects a 'program' from the selector switch, hit's start, and a predefined program controls everything from there. The servos will almost always be in different positions to each other.

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


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Have a look to your PMs ... and enjoy

    @ Darrel : Do not look at it ... you won't like at all ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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