Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Parity and Stop Bits options for Serial Monitor? (Read 118 times)
Scott H.
Newbies
*
Offline


Posts: 5
Joined: Feb 24th, 2022
Parity and Stop Bits options for Serial Monitor?
Dec 2nd, 2024 at 7:37pm
Print Post  
I'm working with a board that suffers from some electrical interference. With a default serial connection like

Code
Select All
Serial.begin(921600); 



This is the equivalent serial port setting to Parity=None, Stop Bits = 1. With this setting, I get some occasionally garbled information in transmit and receive. So, I've switched to using an Even parity and two stop bits, which is the equivalent of:

Code
Select All
Serial.begin(921600, SERIAL_8E2); 



When I connect to my device over a serial connection in my own Windows app like the below, everything works great!

Code
Select All
serialPortSOC = new SerialPort(portName)
{
    BaudRate = 921600,
    Parity = Parity.Even,
    StopBits = StopBits.Two,
    DataBits = 8,
    Encoding = Encoding.UTF8,
    Handshake = Handshake.None,

}; 



However, the serial monitor in Visual Micro doesn't let me set these settings. As a result, my communication is garbled in the VM serial monitor. 

I've set the COM port settings in Device Manager to match what I want and restarted all instances of Visual Studio, but no dice.

Is there a way to make the VM serial monitor obey my parity and stop bit settings?
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2500
Joined: Feb 13th, 2019
Re: Parity and Stop Bits options for Serial Monitor?
Reply #1 - Dec 2nd, 2024 at 8:17pm
Print Post  
Thanks for the report.

Currently there are no options available in Visual Micro for the Parity or Stop Bits to be configured which we will look into.

Have you tried lowering the baud rate to a slower speed to help reduce the impact of the interference?

Shorter serial lines often also help, but it depends on what you are trying to achieve (e.g. RS485 will travel a lot further more reliably than serial if long physical connections are needed, or go wireless etc...).
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint