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

    Hi Terry, K9HA,

    Attached is assembler source with "gamma" table. I also slowed down LED "0" fade loop time considerably to look for "stair stepping" effect since I was only using 64 "gamma" steps but the fading is remarkably smooth.

    I'm using Fairchild MV57164 Bar/Dot displays but almost any LED should work fine.

    A couple observations;

    (1) I'm very surprised at the light produced from LED "10" which is set to a duty cycle of 1 (1-usec -> 1/1280th or 0.078125% duty cycle).
    (2) Mirrored BAM doesn't seem to be necessary to correct the 127-128 duty cycle transition visual artifact when using a multiplexed display (with gaps between LED updates).

    Regards and "very 73", Mike, K8LH
    Attached Files Attached Files
    Last edited by Mike, K8LH; - 9th March 2010 at 16:02.

  2. #2
    Join Date
    Nov 2007
    Location
    Lake Villa Il.
    Posts
    40


    Did you find this post helpful? Yes | No

    Default

    Mike,
    Thank you for the part data AND the assembly code.
    It will be fun experimenting with this!

    73
    Terry
    K9HA

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


    Did you find this post helpful? Yes | No

    Default

    I'm geeked!

    Just added a 256-step BAM driver to an old project which had a 4-digit 7-segment display (direct I/O drive) and using it for brightness control works great (488-Hz refresh rate @ 4-MHz INTOSC).

    I've got a few of these old three or four digit 'pnp' (practically no parts) type projects around and I had always wanted to implement a form of PWM brightness control on them but nothing worked as well or was as 'clean' as this K8LH BAM driver method.

    Only "down side" so far is that I haven't figured out a way to implement "cycle accurate" delays in BoostC which means I'm stuck writing in assembler which no one can understand (lol).

    Regards, Mike, K8LH
    Attached Images Attached Images  
    Last edited by Mike, K8LH; - 10th March 2010 at 16:45.

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