Access array in PBP and .asm


Closed Thread
Results 1 to 6 of 6

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Already done for you http://www.melabs.com/resources/samp...p/serbufAx.bas

    Just change the buffer size & tweak to your specs.
    Regards,

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

  2. #2
    Join Date
    Nov 2004
    Posts
    61


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    Already done for you http://www.melabs.com/resources/samp...p/serbufAx.bas

    Just change the buffer size & tweak to your specs.
    Don't know how I missed that in my searching.

    Many thanks, Bruce. That looks perfect.

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


    Did you find this post helpful? Yes | No

    Default

    Hi John,

    One problem that you will probably have is in trying to send serial data using SEROUT(2).

    Those commands are timed by software, which will be continuously interrupted by the USART RX handler, which throws off the baud rate.

    A possible solution can be found here ...
    http://www.picbasic.co.uk/forum/showthread.php?p=53931

    It uses a Timer as the baud rate generator, which overcomes the software timing problems.

    HTH,
    DT

  4. #4
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    Could you possibly use a PIC with two hardware UARTS? That would make things *so* much easier.
    Charles Linquist

  5. #5
    Join Date
    Nov 2004
    Posts
    61


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Charles Linquis View Post
    Could you possibly use a PIC with two hardware UARTS? That would make things *so* much easier.
    Actually, that's the part I didn't mention. I'm looking at the 18F6310, which appears to be only a couple dollars. Unless I've missed something, that's the smallest of the 18Fs with two ports, and it comes in a 64-TQFP package.

    It has two hardware ports and two separate interrupt generators.

    However, the ability to receive data into an array in the .asm routine is still very desirable. I can do my array massaging in the main program, then dump it out the door.

    Darrel's link above describes some neat tricks too.

    The depth of knowledge & willingness to share on this board is always amazing. Thanks to all who have taken a moment to reply.

Similar Threads

  1. ASM code
    By Bill Legge in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 1st March 2010, 23:55
  2. PBP 2.6/MPLab 8.33 ASM "COD" error message
    By reddog24 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 3rd December 2009, 20:09
  3. Tracing & Stepping: PBP & MPLAB
    By chicowoodhill in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 7th September 2008, 01:23

Members who have read this thread : 1

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