Page 1 of 1

TXD timing issues

Posted: Fri Feb 15, 2013 4:46 pm
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

Re: TXD timing issues

Posted: Fri Feb 15, 2013 11:44 pm
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.

Re: TXD timing issues

Posted: Sat Feb 16, 2013 10:07 pm
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

Re: TXD timing issues

Posted: Thu Sep 19, 2013 11:20 pm
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