Quick Question About Using Serial0 for Wired Communication on Cyton
Hi!
I have a quick question regarding serial communication with the Cyton board.
Can I use Serial0 to communicate with the Cyton board via a USB-TTL connection?
From the forum discussions and codebase (e.g., Board_Defs.h), I understand that Serial1 is typically reserved for debugging and used in conjunction with the WiFi shield. However, in my current wired setup, I've removed the RFduino module and instead connected the wired interface directly to the RFduino's Tx and Rx pins.
Given this, can I continue to use the default Serial0 configuration—specifically, Serial0 Tx on pin 14 and Rx on pin 6—to support the wired communication?
Thanks!
Comments
Mods to the board or firmware are generally NOT recommended. The very old threads you refer to, regarding Serial1 and Serial0 'wired connection' are from an unsupported, user initiated, one-off 'hack', from around 2016, 2017, (almost 10 YEARS ago). Which was forked from the now obsolete level of the firmware. This 'hack' was never promoted or recommended as a way to increase the Cyton sample rate. It was only an 'experimental' workaround. That was eventually even more obsolete because of AJ Keller's revised firmware (V2 and V3). This revised firmware is absolutely needed to support the functionality of the OpenBCI_GUI and Brainflow.
https://openbci.com/forum/index.php?p=/discussion/915/using-wired-usb-connection-with-firmware-2-x-x
https://openbci.com/forum/index.php?p=/discussion/712/prospects-for-higher-sample-rates
https://docs.openbci.com/Cyton/CytonSDK/
Additionally, unless carefully compensated for in the voltage isolation hardware, a 'wired' connection via a usb serial port, potentially exposes the EEG subject to dangerous levels of voltage and current, should a usb or serial port chip malfunction occur. (Most of these USB serial port chips are from China, and not medically approved.) This is why wireless operation is preferred because of the mains isolation aspects.
Mentioning @Shirley, @Support_Staff, @retiutut.
Regards, William
Hi William,
First of all, I sincerely appreciate all the useful information and your detailed reply.
I understand the importance of handling the hardware carefully for voltage levels. The main goal of using the wired connection is to develop an EEG data streaming experiment. I would like to confirm whether it is possible to stream EEG data directly via Serial0 (instead of Serial1) for this purpose. If Serial0 can be used for data streaming, it might not be necessary to modify the firmware, since Serial0 would already be handling the data output. Please correct me if I'm wrong.
Additionally, I have been validating the wired connection by checking the data transmission from the MCU to the USB pins using an oscilloscope. The observed waveforms appear consistent, suggesting that the physical transmission is functioning correctly. However, when I attempt to convert the streaming data to LSL, I encounter some warnings and notice that some data packets are not transmitted successfully. May I ask if you have any suggestions or recommended testing procedures to further validate and troubleshoot this issue?
Thank you very much for your support.
Best regards,
Cindy