Dear all,
I have been Googling around and checked the electronic diagram of the GIGA R1. Maybe i overlooked it all. But i am trying to find which TX and RX pin i should use if i want to read serial data through the USB-A port.
Any ideas? Thanks
Hi @MeandMrsJones.
I'm not sure I understood correctly what you mean by this. Please provide more details to allow us to understand what you are hoping to accomplish.
If you want to read serial data from pins on the GIGA R1 WiFi board, you should connect the device producing the serial output to the standard GPIO pins on the board (keeping in mind that the GIGA R1 WiFi uses 3.3 V logic levels and so you should not connect it directly to any device that would expose the pin to higher voltages).
The USB-A port is used to connect USB devices to the board. It is perhaps possible to connect USB devices that produce a USB CDC serial port to the USB-A port of the board, then do serial communication with that device, but this is done via the USB protocol so asking about TX and RX pins is nonsensical in this context.
Thank you. The background of my question is that I have a special cable for Victron devices which on one end is a serial Tx Rex connection to a Victron device and on the other end a usb connector. This cable is intended for reading out a Victron device from a computer using USB. The serial protocol is known.
Therefore my straightforward question: to which pins is the USB connector connected and can these pins be used for serial protocol.
Or maybe the usb is not directly connected to one of the ports of the arduino?
Thanks.
Part of your question is easy to look up: If you go to the product documentation( GIGA R1 WiFi | Arduino Documentation), there is link to pinout, which has:
And from STM documents you can deduce what pin PB14 and PB15 can do:
Port | AF0 | AF1 | - | AF2 | AF3 | AF4 | AF5 | AF6 | AF7 | AF8 | AF9 | AF10 | AF11 | AF12 | AF13 | AF14 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PB14 | - | TIM1_CH2N | - | TIM8_CH2N | USART1_TX | SPI2_MISO /I2S2_SDI |
DFSDM1_ DATIN2 |
USART3_ RTS/ USART3_ DE |
UART4_ RTS/ UART4_DE |
SDMMC2_ D0 |
- | - | OTG_HS_ DM |
- | EVENT OUT |
|
PB15 | RTC_RE FIN |
TIM1_CH3N | - | TIM8_CH3N | USART1_RX | SPI2_MOSI /I2S2_SDO |
DFSDM1_ CKIN2 |
- | UART4_ CTS |
SDMMC2_ D1 |
- | - | OTG_HS_ DP |
- | EVENT OUT |
And yes it looks like there is a possibility of a USART1... Have not looked to see if other alternate pins for UART1 are in use...
But not sure how much this would help you. As your device (at least through this cable) does not communicate using simple Serial, but instead it uses USB protocol. Could be USB CDC ACM, or could be some converter device protocol like FTDI, Prolific.
You might try using one of the libraries mentioned in the USB document:
Guide to Arduino GIGA USB Features | Arduino Documentation
Note: the release usb to serial support in these libraries is(was) pretty limited, like only some CDC ACM. Earlier I played with building my own support, which I have mentioned in other threads.
I have not played with this for awhile, but did have some of my own drivers talking to a few more usb to serail adapters, like some of the FTDI or prolific, ... There is at least one example in that library where I forward evertying betwee the USB Host serial object and the USB on the GIGA...
Not sure if that will help you or not