Bit Angle Modulation (BAM) in a PIC


Results 1 to 40 of 151

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    Hi Bo,

    At 4800 baud, each byte takes about 2.1 mS.
    The USART has a 2.8 byte buffer, so at around 6 mS the USART buffer will overflow.

    In the DlyTime2 section, it will loop 50 times with a 2mS delay without checking the USART.
    By the time it's finished, the buffer is very likely to have overflowed.

    I think if you do the same thing you did in DlyTime1, and check the RCIF bit inside the loop, it will have a better chance.

    And as you work on the rest of the program, look for any of those Evil PAUSE statements.
    Anything more than 4ms will have to be broken in smaller loops with RCIF checks in the middle.

    Added:
    Another method might be to use ON DEBUG, with only the Delay routines ENABLEd.
    Then it would be able to check RCIF in-between each and every statement in the delay routine without actually having to write the checks into the routine.

    hth,
    Last edited by Darrel Taylor; - 20th September 2009 at 21:04. Reason: Added
    DT

Similar Threads

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

Members who have read this thread : 2

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