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 tenaja View Post
    I don't use Mikrobasic, but here is an easy way to do it without interrupts...just translate the code to proper syntax. (And set the symbols of cTxReg etc. to the appropriate values. Leading characters are: c=constant, b=byte.)

    bDelayTime = 0
    CheckForData:
    if cTxReg = cDataWaiting then 'check hardware Tx register for incoming data.
    serin = bSerialDataIn 'get data...
    goto SerialDataReceived
    else 'no data waiting...
    pause 1 'wait 1ms...change to match your baud rate, since some speed may overwrite
    bDelayTime = bDelayTime + 1
    if bDelayTime = cMaxWaitTime then
    goto NoSerialDataReceived
    endif
    goto CheckForData
    endif
    Hi,

    Your code does not work with software UARTs.

    Software UART routines use bit-banging techniques and can use almost any I/O pin
    of the microcontroller. Software UARTs have big limitations and if the microcontroller has
    hardware UARTs just use them!

    Best regards,

    Luciano

  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
    Your code does not work with software UARTs.
    This is absolutely true.

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


    Did you find this post helpful? Yes | No

    Default

    One nice thing about Proton+ is in the forum, Les the compiler author occasionally posts misc. PDS code. (In addition to helping out on the forum when needed.) For instance, he's posted a full Space Invaders game that works with the Crownhill development board... which is modeled in the VSM simulator so you can play it right on your PC screen (or the actual development board).

    He's also posted code to use as a serial buffer for the hardware usart, so it will receive data in the background, and fill it in when you get around to using a hserin command. More examples are speech decompression routines, and a full .wav file player design with CF FAT and audio out routines.

    These are just a few examples. Some of them can easily be ported to PBP; others may take some work.

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