Electronic – How does a microcontroller development board use USB cable to transmit serial data

ambamicrocontrollerserialstm32usb

I'm trying to understand every section of the journey of data from a microphone via a microcontroller to a pc terminal.

I realize now after reading about serial data transfer that real-time audio data transfer through a serial port is not possible, since the maximum data transfer rate is around 115 kb/s, However, I would still like to know about serial data transfer in a microcontroller.

I have an electret microphone connected to an analogue input on a stm32 nucleo-144 development board with a stm32F746ZG microcontroller (https://os.mbed.com/platforms/ST-Nucleo-F746ZG/) and the development board is connected to a pc via a USB cable.

My understanding is that the audio signal is sampled by the adc on the microcontroller chip, this new digital data is then moved to memory via one of the Advanced peripheral buses (APB) and then the Advanced High-performance bus (AHB) it then comes back out of memory and goes via the APB and AHB into a UART within the microcontroller and after into a (RS-232/RS-485) line driver (don't know if this is in the microcontroller on on the development board) where the voltage is increased and then after this I'm lost.

Does the data just progress along the tx line from the line driver to the USB port on the development board? And is it then transmitted as USB data or as serial data using one of the USB data lines?

Best Answer

The serial interface is actually a virtual com port that communicates using the USB interface. Your microcontroller does not need to convert the serial input/output between normal logic levels and the higher RS-232 voltages...the logic signals from the UART go directly to the USB interface. Software on the host computer must be able to recognize the virtual serial port and provide the appropriate driver, so it looks just like an old fashioned serial port to the host software.