Serial write function.

If the UART baudrate is set, can you easily check ready status of the AVR UART transmit buffer?
Can you write a char directly to that and it just transmits automatically?

I want to make no-wait serial TX that runs as a task and uses a char pointer to send each next char only when the TX buffer is available or until a terminating 0 is reached, then flag that process off till next string to print.

Serial is one of my big performance under fire limiters. That shouldn't have to be for any of us.

Can Serial be gotten through and gone around, derived-class with tx-queue-ectomy and the 2 functions as above?

Verbose debug prints would no longer be a timing issue. Do sprintf(), set the task to point to the string, and change the state to make it run next time through loop() until it's done, all if(), no blocking while() or for().
Let loop() "do the work". That's why it's there instead of main().

You call Serial.print to print one character. The character is put into the transmit buffer and print returns very quickly. The first character is essentially no-wait.

You continue calling Serial.print to output data. At some point, the transmit buffer becomes full and Serial.print blocks until space is available.

Is that the problem you are trying to overcome? That Serial.print blocks because the transmit buffer is full?

I think it would be a great help if you write a short sketch that illustrates the problem so other people here can try it out and understand exactly what you experience.

...R

Yes, the blocking affects loop() response time.

What you outlined is good for writing to the hardware register but what about how do I know when that byte is finished being sent, ready for the next char?

GoForSmoke:
Can Serial be gotten through and gone around, derived-class with tx-queue-ectomy and the 2 functions as above?

a) The source code for "Serial" is in the Arduino installation, there's nothing to stop you going in there and modifying Serial.write() to no block when there's no space.,

GoForSmoke:
Let loop() "do the work". That's why it's there instead of main().

b) The UART is easy to program directly, there's no need to use Serial.write() if your loop() is looping

Use Serial.begin() to initialize it then just do "UDR0=d" to send bytes when there's some space - see the datasheet.

How to know when there is space? The missing part for me is that.
I will have to dig is all.

Between serial available, my loop() runs many many times. Just one character's wait loses all that, unless serial sends faster than it receives?

Serendipity. Paul Stoffregen (mastermind of the Teensy) has proposed a new function that should help...
https://groups.google.com/a/arduino.cc/forum/#!topic/developers/ls3hkviFYM4

The final name ended up being writeBufferFree.

There is some discussion here...
http://forum.arduino.cc/index.php/topic,165574.0.html

I don't think anyone has changed the Arduino core but this should give you an idea of what needs to be done...

If you need a hand getting that merged into the Arduino core just say so.