Already done for you http://www.melabs.com/resources/samp...p/serbufAx.bas
Just change the buffer size & tweak to your specs.
Already done for you http://www.melabs.com/resources/samp...p/serbufAx.bas
Just change the buffer size & tweak to your specs.
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
Could you possibly use a PIC with two hardware UARTS? That would make things *so* much easier.
Charles Linquist
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.
Bookmarks