Increasing resolution of DTs MIBAM library?


+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2013
    Posts
    1,136

    Default Increasing resolution of DTs MIBAM library?

    Hello.
    Currently this "library" or whatever it is correctly called, has resolution of 8 bits, which can be somewhat limiting.
    Is there a chance to "increase" resolution to 9 or 10 bits, or it has to be re-written completely?

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,143


    Did you find this post helpful? Yes | No

    Default Re: Increasing resolution of DTs MIBAM library?

    It hsa to be done from scratch. Though I doubt it can be a general include file for any PIC chip.

    Better use a chip with higher PWM resolution.

    Ioannis

  3. #3
    Join Date
    Feb 2013
    Posts
    1,136


    Did you find this post helpful? Yes | No

    Default Re: Increasing resolution of DTs MIBAM library?

    Unfortunately, there are no PIC chips with like 8-16-32 independent PWM outputs.
    Sure, there are chips like LT8500, with 48 channel PWM output, but they're way too expensive...

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,143


    Did you find this post helpful? Yes | No

    Default Re: Increasing resolution of DTs MIBAM library?

    More channels is totally a different thing from resolution as you stated on post 1...

    Maybe you can do that in assembly. A bit difficult though.

    Ioannis

  5. #5
    Join Date
    Feb 2013
    Posts
    1,136


    Did you find this post helpful? Yes | No

    Default Re: Increasing resolution of DTs MIBAM library?

    I'm using MIBAM because with 64mhz PIC18 CPU, I can have 48 independent PWM channels. But they're 8 bit. I want 48 channels with 9 or 10 bits resolution (12 - preferable)

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default Re: Increasing resolution of DTs MIBAM library?

    Darrels documentation says
    The number of LED's you can use is limited by the OSC frequency. It's not that the module uses so much processor time that it needs more speed.The limitation is the LSB (Least Significant Bit) of the DutyCycle, which is so short that it doesn't leave much time to do a whole lot of code.

    @ 4Mhz, you can only run 4 LEDs MAX. This can be useful for RGB LED's on small chips.
    @ 20Mhz, you can run 20 LEDs since there are more instructions available per period.
    @ 48Mhz, you can run 48 LEDs, and anywhere in-between you can have the equivelant number of LEDs to match the OSC frequency.
    In order to increase the resolution to 10 bits the LSB would need to be 1/4 of its current length meaning you'd need the PIC to run at 192MHz. Or you'd need to reduce the cycle time by 4. The documentaion doesn't say what the cycle time is but I imagine it's not excessive so reducing by a factor of 4 would likely result in flicker ( [speculating mode on] ).

    Here's an idea that may or may not fly: Use a PIC with a couple of CCP or PWM modules and PPS. "Scan" the CCP/PWM module outputs across the I/O-pins, changing the duty cycle accordingly creating a multiplexed PWM scheme.

  7. #7
    Join Date
    Feb 2013
    Posts
    1,136


    Did you find this post helpful? Yes | No

    Default Re: Increasing resolution of DTs MIBAM library?

    Well that's nice idea, but selection of pins to where you can map HPWM - is quite limited as I know.

    I had another idea - use MIBAM as is, but feed outputs to logical AND gate and use built in PWM generator to "chop" these outputs for better resolution. However, in case of 48 outputs, this will require 12 additional chips (considering that 1 chip is 4 AND gate), making such implementation less practical.

Similar Threads

  1. Dts int 18f26j50
    By mpardinho in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd October 2013, 09:02
  2. Library tools? Library Specs?
    By PickyBiker in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 21st May 2010, 02:54
  3. MIBAM resolution
    By david parish in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 8th October 2009, 23:04
  4. DTs instant Interrupts
    By Mugelpower in forum PBP Wish List
    Replies: 5
    Last Post: - 22nd February 2008, 17:26
  5. Replies: 14
    Last Post: - 4th October 2006, 05:45

Members who have read this thread : 7

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