Communication between a USB/serial device and an AVR (atmega/Arduino) microcontroller

USBserial device and an AVR atmegaArduino microcontroller

I have a device which provides a USB port. If I attach it to a Windows PC it is recognized as a “CP2103 USB to UART Bridge Controller”. According to the device documentation, it should communicate in serial format at 38400bps.I have to talk to this device with a atmega microcontroller.

 USBserial device and an AVR atmegaArduino microcontroller

Since the USB pinout is different from the serial UART of the uC, firstly I thought I would need a circuit to convert the signals. I found the AVR-CDC project and put on a CDC-232 in order to convert USB (GNDD+D-VCC) to RS232 (TXRXGND):

To make it I used another atmega328 as uC, flashed with the specific hex, with a 16Mhz crystal instead of the 12Mhz one specified into the diagram.

Then I built another piece of circuit to convert the RS232 signal to TTL:

So the signal conversion should be USB -> RS232 -> TTL. USB serial dvice and an AVR atmega Arduino microcontroller Schematic

Read more: Communication between a USB/serial device and an AVR (atmega/Arduino) microcontroller

Leave a Comment

Your email address will not be published. Required fields are marked *