Proton PICBASIC vs MeLabs PICBASIC


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by dhouston View Post
    For those wanting to do it with interrupts, download the Soft Uart for P12 by Warren Schroeder project from http://www.mikroe.com/en/projects/

    It's an excellent tutorial as well as an interrupt driven full-duplex software UART. The code is quite simple and easy to follow.
    Hi,

    Full-duplex software UART is not possible or possible only if the baud rate
    is very low and interrupts are used. (Software UARTs use bit-banging).

    Soft Uart for P12 by Warren Schroeder:

    If you look at the code you will see that RX uses an interrupt and that in
    the SUB TX_19200 interrupts are disabled. This means that while
    you are sending data you cannot receive data at the same time. (Not Full-duplex).

    Best regards,

    Luciano
    Last edited by Luciano; - 9th January 2008 at 18:31.

  2. #2
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Luciano View Post
    Full-duplex software UART is not possible or possible only if the baud rate is very low and interrupts are used. (Software UARTs use bit-banging).
    It could be done if you send and receive in the interrupt. Set it to interrupt at 2*baud, and alternate Tx/Rx. At 9600 baud, with 19200kHz interrupt rate on a 20MHz crystal, you get 260 code cycles to perform each...that should be more than enough, and cycles left over for other regular code. You might even get close to that rate with a 4MHz crystal if you are thrifty with your code.

    Or, in the interrupt do the Tx send first, then all Rx work, then Tx setup for the next bit, without alternating, so the "Tx send" portion is actually very short and always the same length. This might be more efficient, but maybe a little more coding.

  3. #3
    Join Date
    Feb 2003
    Location
    Sydney, Australia
    Posts
    126


    Did you find this post helpful? Yes | No

    Default MikroE Basic

    Luciano -

    I will try that code. The last time I tried the Soft_Uart_Read was blocking. I see v6.0.0.0 has a heap of changes.

    I just found it frustrating when trying to convert a simple working PBP program to MikroE Basic. What better way to learn a new language than to convert code you already know and understand in PBP.

    I'll stick with PBP for now until I need ethernet or have some time to do some test projects.....

    bill.

Similar Threads

  1. PICBasic Pro vs. Proton Dev System
    By hjsong in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th February 2007, 04:17
  2. PICBasic Pro vs Proton PICBasic
    By CosMecc in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 3rd November 2006, 16:11
  3. help me Proton PICBASIC version compl
    By samirouf in forum mel PIC BASIC
    Replies: 2
    Last Post: - 1st May 2005, 19:25
  4. Question for all that use MELABS PICBASIC PRO
    By oskuro in forum Off Topic
    Replies: 2
    Last Post: - 24th March 2005, 17:15
  5. Proton development board with Picbasic
    By pjsmith in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 25th July 2004, 22:19

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