UART buffer maximum

I am currently working with serial communication on the Orangutan X2 and Tera Term Pro. I have run in to a problem of the UART buffer reaching the 32 byte maximum. I send data to the buffer, and Tera Term retrieves and displays the data. However, unless I reset the hardware, the buffer does not clear. Thus, for the entire duration of my program I can only send 32 bytes. I need to send more than that. Is there a way to clear the buffer? From reading through the documentation my understanding is that as soon as Tera Term retrieves data, the UART buffer is suppose to automatically get rid of the retrieved data. Am I missing something? Any help would be appreciated.



Unfortunately, I still need to look into this potential bug. I’ll try to have some info on it for you by Monday.

- Ben

Thanks Ben. I appreciate the help.

Unfortunately, I haven’t had time to do anything about this yet. I’ll do my best to look into it tomorrow.

- Ben

Well, I looked at the firmware and everything seems fine, and when I tested transmitting serial data via the auxiliary MCU’s USB connection I didn’t encounter any problems. Can you post the simplest program that exhibits the problem you’ve described? The program that I tested with is:

#define BUTTON1			( 1 << PC1 )
#define BUTTON4			( 1 << PC4 )
#define BUTTON6			( 1 << PC6 )

int main()
	SPIInit();			// allows the mega644 to send commands to the mega168
	while ( 1 )
		if (PINC & BUTTON6)
			playNote(A(4), 100);
			int i;
			for (i = 0; i < 10; i++)
				sendSerial('0' + i);
			while (PINC & BUTTON6);

	return 0;

It initializes the UART to run at 115,200 bps with no parity and one stop bit, and it turns on all five user LEDs while leaving the button pins as inputs. It then endlessly loops while waiting for the top (PC6) button to be pressed, at which point it transmits the ASCII characters ‘0’ - ‘9’ and beeps. I connected to the X2’s virtual COM port with Tera Term Pro and was able to see all ten characters appear every time I pressed the button. Does something different happen for you when you run this program?

- Ben