DT Instant Interrupts


Closed Thread
Results 1 to 39 of 39

Hybrid View

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


    Did you find this post helpful? Yes | No

    Thumbs up

    That's a good one to learn.
    You'll need some variation of it in almost every program you write.

    Also, Since the TMR0_INT handler is only toggling a pin, it's not using any PBP system variables.

    You can change the TMR0_INT's "Type" to ASM.
    Then it won't be saving all the system variables when it doesn't need to. Time is critical with that many simultaneous PWM's.

    Then you can remove the ReEnterPBP-18.bas include file, which will save some RAM and Code space.
    DT

  2. #2
    Join Date
    Sep 2007
    Posts
    50


    Did you find this post helpful? Yes | No

    Default

    Thanks again Darrel,

    I just fully tested the SPWM_INT running 16 channels @ 100Hz 0-100 resolution. I tested each channel with a 7 amp led cluster (Agilight Brightstrip see below) of typical sign led strips powered through a MOSFET. This worked great. I am able to dim all the way down to 1% without any flicker and smoothly fade up to 100% with no flicker or noticeable stair stepping effect. This is smoother than when I used the older multi SPWM program.

    I really appreciate you help

    http://www.agilight.com/brightstrip/index.htm
    Best Regards,

    Kurt A. Kroh
    KrohTech

    “Goodbye and thanks for all the fish”

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


    Did you find this post helpful? Yes | No

    Thumbs up

    Great Testimonial Kurt!

    Mind if I use it on my website?
    <br>
    DT

  4. #4
    Join Date
    Sep 2007
    Posts
    50


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    Great Testimonial Kurt!

    Mind if I use it on my website?
    <br>
    Darrel,

    Feel free to use my testimonial in any way you see fit.
    Best Regards,

    Kurt A. Kroh
    KrohTech

    “Goodbye and thanks for all the fish”

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


    Did you find this post helpful? Yes | No

    Default

    Thanks Kurt!

    Ioannis,

    I've mentioned it a couple times here in the forum, but I just spent about an hour trying to find them, and failed.

    I really should write some more pages for the website.

    Anyone got a Cloning Machine? I need another Me.
    DT

  6. #6
    Join Date
    Sep 2007
    Posts
    50


    Did you find this post helpful? Yes | No

    Default

    Hay Darrel,

    In the DT_INTS-14 (SPWM_INT - Multiple Software PWM) It says:

    Code:
    DutyVars   VAR BYTE[3]              ; DutyCycle Variables
      DutyVar1 VAR DutyVars[0]          ; group them in an array for easy access
      DutyVar2 VAR DutyVars[1]          ; with FOR loops etc.
      DutyVar3 VAR DutyVars[2]
    I do not know how to use arrays or how it can benefit in loops. The way I am doing it now is very cumbersome and code intensive. I have searched the forum and RTFM but I can't get my head around how this concept. Can anyone point me in the correct direction.
    Best Regards,

    Kurt A. Kroh
    KrohTech

    “Goodbye and thanks for all the fish”

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


    Did you find this post helpful? Yes | No

    Default Simple example ...

    If you wanted to set all LED's to the same brightness, you could ...
    Code:
    LoopCount  VAR BYTE
    
    FOR LoopCount = 0 to 15         ; 16 channels
        DutyVars(LoopCount) = 50    ; 50% (0-100)
    NEXT LoopCount
    <br>
    DT

  8. #8
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    ...
    You can change the TMR0_INT's "Type" to ASM.
    Then it won't be saving all the system variables when it doesn't need to. Time is critical with that many simultaneous PWM's.

    Then you can remove the ReEnterPBP-18.bas include file, which will save some RAM and Code space.
    I may missed that little but critical details. Are these described somewhere Darrel?

    And may be others too that I am not aware off...

    Thanks,
    Ioannis

Similar Threads

  1. DT instant interrupts with mister_e keypad
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th November 2008, 20:02
  2. DT Instant Interrupts help
    By perides in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 26th November 2008, 18:41
  3. 12F683 and DT Instant Interrupts
    By jderson in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 22nd November 2008, 12:47
  4. 18F1220 and DT Instant Interrupts
    By jderson in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 30th June 2008, 05:37
  5. Replies: 1
    Last Post: - 1st November 2006, 03:11

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