Bit Angle Modulation (BAM) in a PIC


Closed Thread
Results 1 to 40 of 151

Hybrid View

  1. #1
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default

    Someone asked about the diagonal line on my Charlieplexed display sketch. It's what I refer to as the "float" pin and it's connected to the LEDs that occupy positions in the matrix that would otherwise share a common column and row (RB0/RB0, RB1/RB1, etc.).

    I apologize if the diagonal line has thrown you off. It's a remnant from some of my sketches of Charlieplexed 7-segment displays.

    Both drawings below are electrically the same but the second drawing below may make more sense. Basically I just slid those LEDs in the bottom row up into the empty spaces in the matrix.

    Kind regards, Mike

    Attached Images Attached Images  

  2. #2
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default

    Darrel,

    I was just wondering -- is MIBAM even necessary on a multiplexed display due to the long pauses between LED activation. You know, column one LEDs would be BAM'ed then turned off while we sequencially BAM column two LEDs, then BAM column three LEDs, etc.?

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


    Did you find this post helpful? Yes | No

    Default

    Hi Mike,

    I wholeheartedly agree.
    MIBAM with multiplexed display doesn't seem like it's worth it, because you loose so much of the available dutycycle.

    Thanks for the explanation of the diagonal line.
    I did get your example working, with only 8 leds (2 columns).
    I made enough changes to not know if it's actually the way yours works or not.

    But I don't see a way to incorporate it into the MIBAM routines (because of the duty cycle losses), so I'm officially tossing Charlie out the window.
    Good thing I live at ground level.

    I'll complete the modifications for your previous idea (full port updates) and get this thing done.

    Thanks for all your assistance Mike, much appreciated.
    DT

  4. #4
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default

    Yes, LED duty cycle is decreased with any multiplexed display and while we normally pump up the "peak" current to get better "average" current (and brightness) we can't do that with a Charlieplexed display (or any other multiplexed display that uses "direct drive" for matrix columns or rows).

    Anyway, I thought you might enjoy taking a peek at a multiplexed 8-channel RGB display demo' (24 discrete LEDs) with 256-level BAM driver and a pretty amazing 868-Hz refresh rate. The display is fashioned as a 3x8 matrix (33% duty cycle) so biasing the LED "peak" current to approximately 3x desired "average" current will be necessary. This assembly language program just contains the driver. No animation or anything like that, yet.

    Regards, Mike

    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by Mike, K8LH; - 18th February 2010 at 23:06.

  5. #5
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default

    Is there any way I can get temporary access to locked post above to update the program listing? I posted incorrect version which has some bugs. Sorry!

  6. #6
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default

    Darrel (and gang),

    A long overdue assembly language Charlieplexed BAM example for 20 LEDs on a 12F683. Example uses 8-bit 256 step BAM driver with a 1-usec step size. Refresh rate is 781-Hz with a 1280-usec frame rate. LED "0" is animated. That is, it ramps from duty cycle value of 0 up to 127 and then back down to 0. LED "10" through LED "19" are lighted with duty cycle values of 1 through 10 so you can check out "low end" illumination.

    You might just hook up a single LED for LED "0" to check out the program. Just connect the LED cathode to GP5 and the LED anode to GP0.

    Kind regards, Mike
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by Mike, K8LH; - 5th March 2010 at 18:29.

  7. #7
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default

    Has anyone tried "gamma" correction to smooth out LED brightness level changes? I just added a 64 level rom "gamma" array to the program in the previous post and it made an amazing difference in the smoothness of the fade.

Similar Threads

  1. decoding quadrature encoders
    By ice in forum mel PIC BASIC Pro
    Replies: 93
    Last Post: - 28th February 2017, 09:02
  2. Cordic trig assembly code for PIC18f
    By ScaleRobotics in forum mel PIC BASIC Pro
    Replies: 54
    Last Post: - 8th September 2015, 05:36
  3. AT/PS2 Keybord - PIC Interface?
    By Kamikaze47 in forum Code Examples
    Replies: 73
    Last Post: - 9th August 2009, 16:10
  4. MIBAM - (Mirror Imaged Bit Angle Modulation)
    By Darrel Taylor in forum Code Examples
    Replies: 2
    Last Post: - 15th February 2009, 16:02
  5. Bit Angle Modulation
    By BH_epuk in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th November 2008, 07:01

Members who have read this thread : 3

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