Bit Angle Modulation (BAM) in a PIC


Closed Thread
Results 1 to 40 of 151

Hybrid View

  1. #1
    Join Date
    Aug 2009
    Posts
    16


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Mike, K8LH View Post
    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.
    yep... tryed it in 3 ways:
    1. Simple ISR-based software PWM with floating (table-generated) pulse widths.
    2. Strobing /OE of external latches (54 PWM channels/PIC16f877a) with HW PWM output (table-generated) + SW PWM (i had to slightly increase LED current to get more brightness, as the full duty cycle hadn't been achievable, almost like with 1.5x charlieplexing)
    3. Increased bit depth to 13(14) bit and PWM speed (refresh rate) to 610Hz on 18F for better perfomance.

  2. #2
    Join Date
    Aug 2009
    Posts
    16


    Did you find this post helpful? Yes | No

    Default OFFTOPIC (maybe))

    2 ALL...
    There is one small problem with high speed BAM/MIBAM. Problem exists if u use simpler MOSFET driving scheme (or if u use slower bipolar schemes like darlinghton's transistor pairs and if actual switches are controlled by MCU's outputs directly) or if u need higher current per channel, especially if currents on some channels are significantly different. This happens because switching delays differ too. Check out datasheets for gate driving characteristics for higher current applications and compare it with needed signal discretization. PWM methods don't solve the problem but it need less signal transitions per cycle and work slightly better for lower bit depths without additional gate drivers (for reasonable currents, of course). Actually this problem just increase duty_cycle/brightness relation's non-linearity, but combined with longer wires, bad PCB layouts etc. it may cause unpredictable results for visual perception. So don't be surprised). sorry, can't describe problem in detail because of my poor english (lack of practics) and lazyness. Anyway, best solution is to check your application's requirements in advance))).
    Last edited by sanch0; - 1st April 2010 at 01:03.

  3. #3
    Join Date
    Mar 2009
    Posts
    19


    Did you find this post helpful? Yes | No

    Default

    hi,sanch0.

    how r u?

    i am waiting for ur codes for 16 channels of 14-bit BAM, at 610Hz.

    where are them?

    thank u.

  4. #4
    Join Date
    Aug 2009
    Posts
    16


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lanyong View Post
    hi,sanch0.

    how r u?

    i am waiting for ur codes for 16 channels of 14-bit BAM, at 610Hz.

    where are them?

    thank u.
    done and working already... for now my code gives 16 bit (E)BAM at 610hz (actually 14bit at 610 hz (1 Tcy discretisation) + 2 bits at 610/2 and 610/4 Hz and channel values are updated at 610/4Hz) my code gives real 610hz refresh rate because i don't use MIBAM, which would steal additional frame giving in result twice lower framerate (for visual perception). for now 16 channel code is working (with same 28-pin PIC18xxxx PCB, i've posted it's photo before), more channels may be easily added if needed (it's possible to make up to 64 channels with external latches upto my calculations, more with internal latches). Actually my algo has some more improvements compared to MIBAM. but i'm slightly drunk for now to describe it)))...
    Sorry guyz, i got no access to internet from home, checking mail very rarely. have no normal job for long time to pay for all stuff i need... Stupid country, stupid government, stupid myself)
    best regardzzz

  5. #5
    Join Date
    Mar 2009
    Posts
    19


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by sanch0 View Post
    done and working already... for now my code gives 16 bit (E)BAM at 610hz (actually 14bit at 610 hz (1 Tcy discretisation) + 2 bits at 610/2 and 610/4 Hz and channel values are updated at 610/4Hz) my code gives real 610hz refresh rate because i don't use MIBAM, which would steal additional frame giving in result twice lower framerate (for visual perception). for now 16 channel code is working (with same 28-pin PIC18xxxx PCB, i've posted it's photo before), more channels may be easily added if needed (it's possible to make up to 64 channels with external latches upto my calculations, more with internal latches). Actually my algo has some more improvements compared to MIBAM. but i'm slightly drunk for now to describe it)))...
    Sorry guyz, i got no access to internet from home, checking mail very rarely. have no normal job for long time to pay for all stuff i need... Stupid country, stupid government, stupid myself)
    best regardzzz
    hi,i want to watch ur codes.

    thanks.

    i advise u read some works of liening's(Влади́мир Ильи́ч Ле́нин). u will find the hope.

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 : 1

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