protocol serial comm


I'm trying to communicate my Arduino Mega with an old VFD ( brand IEE) using serial comm, but the datasheet specify that requieres 1 start bit and 2 stop bits, in a 11 bits word (??) so, I can't use the Serial library. Am I cocrect ?

How can I solve this?

All tips are wellcome !!!

I don't know how you can change the USART config at arduino, but i think that the inside USART at the CPU can be configured for any baudrate and any bits types.

I'm think you must take a look to the CPU pdf and try to found the USARTS registers that let to you setup the USART for that configuration.

I take a look at HardwareSerial.cpp but i can't see them.

Please read the CPU sheet to know if it accept that configuration at the USART. :o

Best Regards Frank

Thanks, FrankRadio…
Comparing the data sheet w/ the hardwareSerial.h there is a difference: There is a variable (USRC) that is not in the HardwareSerial.h
This variable seems to be the one that program the start / stop bits…

This is a part of the datashet (page 212): Sample code to configure the USART

void main( void )
…} // main
void USART_Init( unsigned int ubrr){
/* Set baud rate /
UBRRH = (unsigned char)(ubrr>>8);
UBRRL = (unsigned char)ubrr;
Enable receiver and transmitter /
UCSRB = (1<<RXEN)|(1<<TXEN);
Set frame format: 8data, 2stop bit */
UCSRC = (1<<USBS)|(3<<UCSZ0);

So, can I initialize the USART in the setup of my sketch or should I add the variables in the library ???