TXD timing issues

Questions on UARTs, and serial communication
Post Reply
firepuppy
Posts: 6
Joined: Fri Feb 15, 2013 4:14 pm

TXD timing issues

Post by firepuppy »

A while back I started using TXD0/1 in place of SEROUT to take advantage of the hardware UARTs and allow my program to continue working. However, I recently noticed that I was spending a LOT of time in my subroutine that was writing out data and put in some code to calculate timing on TXD1. It appears that a call to TXD1 takes whatever amount of time is needed to write out a single character at the current BAUD rate (e.g. 0.1msec @ 115K or 0.5 msec @ 19.2K). I thought at first that it was perhaps the device I was talking to (a Bluetooth chip) but changed my code to use TXD0 talking to the PC running BASICtools and saw the same behavior.

I am using the ProPlus board running v8.15 ARMbasic and v8.14b (or 5.14 ??) of the BASICtools compiler.

Am I doing something wrong? If not, how is using the TXD interface any better than SEROUT??

Thanx,
e



basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: TXD timing issues

Post by basicchip »

I just ran a similar test and yes the current firmware does not use a transmit buffer, though most of the hooks for it are in there.

Just not all of the hooks needed are there, so we are working on a new version. I'll let you be a guinea pig when we get a version working.

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: TXD timing issues

Post by basicchip »

We've got a version of BASIC firmware that uses interrupts on TX and has a buffer of 64 bytes on the PROplus 128 bytes in other parts so far. Firepuppy, contact me for a firmware update

Still working on the LPC812 version

AMDlloydsp
Posts: 99
Joined: Mon Apr 15, 2013 3:51 pm
Location: NE Central FL

Re: TXD timing issues

Post by AMDlloydsp »

I'm using SuperPros at Basic V8.25.

I, also, find the BASIC TXD(1) has only a one-character buffer; as of today 9/19/13.
I can make it work with wait delays between characters, but overrun the one-character buffer instantly if I slam more into it faster.

No, my terminal watching it cannot be overrun at 4800 baud (not at 115200, either).

I assume I have not included the appropriate library routines to support it.

Can you explain how?

Thanks,
LS

Post Reply