USART Bit Time Error


Closed Thread
Results 1 to 7 of 7

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by JEC View Post
    Then, I re-added my TMR0 interrupt routine, using DT_INTS 18. It ticks every 60 uS and does about 4 uS of PBP work before returning.
    A lot of times, the handlers don't use any "heavy duty" PBP commands. Often just counting, setting a flag or something similar. If it's only using 4us, this may be one of those times.

    If none of the PBP system registers are used, you can just change the handlers TYPE to ASM, and leave it as PBP statements, instead of having to convert it to ASM. This eliminates that overhead, (which is pretty large).

    I'd like to see the handlers to verify it though.
    <br>
    DT

  2. #2
    Join Date
    Nov 2004
    Posts
    61


    Did you find this post helpful? Yes | No

    Default

    Thanks, DT, for the suggestions.

    Update: I re-spun the code entirely. Got rid of the interrupts altogether and set up everything to poll the needed register flags.

    UART2 works perfectly to capture the MIDI data - all of it - and the numbers generated by Mister-E's baud rate calculator are spot-on.

    My main loop is massaging UART2's data and re-transmitting at a different baud rate through EAURT1.

    Thanks to all for the input. At some point I may re-visit this program and try using interrupts...

Similar Threads

  1. Optimizing DIV
    By skimask in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 22nd September 2008, 04:58
  2. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  3. pbp245 compliation error
    By Woodzy in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 25th July 2006, 05:59
  4. encoder wowes
    By wallaby in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 6th December 2005, 21:56
  5. 16F88 Compile error
    By Toley00 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 2nd November 2005, 00:22

Members who have read this thread : 0

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