Usart Questions


Closed Thread
Results 1 to 6 of 6

Thread: Usart Questions

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Unless the compiler optimizes your code, any code written in a high level language is going to be slower than a single function or procedure call for that high level language. Something like the HSEROUT function is probably written in assembly. And as Darrel points out, there are other things HSEROUT is doing that your replacement code does not.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Something like the HSEROUT function is probably written in assembly
    Every single line of code in the PBP library is in assembly.

    any code written in a high level language is going to be slower than a single function or procedure call for that high level language
    OK. I'm a little slow. Could you explain this statement in laymans terms..;o}
    Last edited by Bruce; - 6th March 2008 at 22:20.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Basically, what I mean is if you write code in BASIC to perform a function it will generate more assembly code than the same function written in assembly. That is because typically there is overhead code generated by the BASIC routines that you can avoid when you write directly in assembly.

    So your example of controlling the UART with BASIC code will be more inefficient that the HSEROUT call because of all those extra assembly code lines that the BASIC procedures create.

  4. #4
    Join Date
    Dec 2004
    Location
    nebraska
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Thanks for the answers guys

    Shawn

Similar Threads

  1. byte Tx w/ USART 16f876a problem
    By GargamelDigi in forum mel PIC BASIC
    Replies: 2
    Last Post: - 15th July 2008, 06:50
  2. problem with USART
    By leemin in forum Serial
    Replies: 4
    Last Post: - 11th December 2006, 18:56
  3. I ammm Looosssst (USART Help)
    By shawn in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th May 2006, 06:05
  4. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 02:07
  5. Replies: 5
    Last Post: - 1st December 2004, 13:49

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