Bit Angle Modulation (BAM) in a PIC


Results 1 to 40 of 151

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    What's the processor utilization per MHz per LED?
    Utilization is less than 6% of total.

    The limiting factor is the Least Significant Bit in the dutycycle. It's so short that it doesn't give much time to do anything. The mirror image helped some, because I was able to combine the LSB of both halves of the mirror for a longer period, but it's still only 68 instructions (worst case).

    It has to get into the interrupt handler, save context, reload the Timer, service all the LEDs dutycycles, keep track of the bit sequencing, restore context and exit the interrupt within those 68 instructions.

    Each PIN uses 6 instructions, and the rest of the handler uses about 40.
    So @ 4 mhz you can only get 4 LED's (40 + 24 = 64).
    Refresh rate @ 4mhz = 80 hz with 4 LEDs.

    With higher OSC freqs, refresh rates can be as high as 650hz, depends on how many LEDs there are.
    The rate can be set lower with a DEFINE if needed.

    Warnings from the assembler will indicate if your setup is out of range.
    <br>
    Last edited by Darrel Taylor; - 13th February 2009 at 13:28. Reason: Change to less than 6%, forgot the othe half of the cycle.
    DT

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