Serial Output Buffer Size

Status
Not open for further replies.

Ausplex

Active member
Is Teensyduino serial port output buffer limited to 64 bytes as with standard Arduino?

I would like to have an output buffer size of several hundred bytes, so that I can write some periodic large bursts of data. In this case using Serial3

thanks
 
I would like to have an output buffer size of several hundred bytes, so that I can write some periodic large bursts of data. In this case using Serial3

Yes, you can have this, but you will need to edit serial3.c to get it. Look for the defines and comments near the top of that file for details.

Future versions will probably provide a way to enlarge the buffer without editing the core library code. But the API is still being discussed and the Arduino people haven't agreed on a definition yet. I'm considering just doing something in Teensyduino and risking it later being incompatible with whatever Arduino might someday decide. But for now I'm still hoping Arduino will choose and "official" API for this, so we can be fully compatible with them and all other boards.
 
This seems to be a common requirement for many users. We're a commercial business, and hate modifying libraries, as history shows that when you transfer the project to another PC, and the programmer changes, the customised settings get forgotten, and the result is a lot of pain and heartache.

I assume we can do the same with the ADC library to increase the ADC resolution? I'm assuming you are truncating the 16 bit ADC result to 10 bits - we want to go up to 12.

Thanks again for the reply.
 
As for Analog, have you looked at: analogReadResolution
I believe you can simply do: analogReadResolution(12);
 
Status
Not open for further replies.
Back
Top