Communicate with RUMBA board via alternate TX/RX connections?
Hello,
I think I may have damaged the on-board USB-to-TTY converter (i.e. the Atmega16u2 chip) on my RUMBA control board. Normally as a workaround I would just use a separate USB-to-TTY converter, connected to a TX0/RX0 pin breakout in order to upload firmware and communicate with the Mega2560 chip.
Unfortunately on this version of the RUMBA board there are no breakout pins for the TX0/RX0 connections, but there are pins accessible for the TX1/RX1 and TX3/RX3 serial connections. Knowing that the bootloader is programmed only to allow firmware uploading from the Arduino IDE via the specific TX0/RX0 connections, I know I won't be able to load new firmware onto the board via USB-to-TTY; rather, I'd have to use an AVR programmer and the ICSP connector. But if I were able to load firmware using an AVR programmer, is there a way I could modify the firmware so that I could use one of the other serial connections besides TX0/RX0 to communicate with the board through Repetier-Host?
I tried modifying some pin assignments in the fastio.h firmware file, as it seemed to be the only place where TXD/RXD pins could be assigned explicitly. Here is the code:
#if defined (__AVR_ATmega1280__) || defined (__AVR_ATmega2560__)
// UART
#define RXD DIO15
#define TXD DIO14
// SPI
#define SCK 52
#define MISO DIO50
#define MOSI DIO51
#define SS 53
I changed the DIO0 and DIO1 assignments to DIO15 and DIO14, respectively, in accordance with the ATmega2560 digital pins that correspond to the RX3 and TX3 serial connections. However, when I compiled and uploaded the firmware via USB to a separate, fully functioning Arduino Mega board for testing, I was unable to connect to the board in Repetier-Host using the external USB-to-TTY adapter connected to digital pins 14 and 15 (TX3 and RX3). The connection was not refused, but it just wouldn't connect fully.
Upon checking the serial monitor in the Arduino IDE, there was no output. When I connected the TX/RX wires from the USB-to-TTY adapter to the RX0/TX0 pins on the Arduino board, I received the expected output 'wait' repeatedly on new lines. Furthermore, despite the firmware pin assignment change I made, Repetier-Host would only communicate with the board when the USB-to-TTY adapter was wired to the TX0/RX0 pins and not the TX3/RX3 pins on the Arduino board.
So it looks like my firmware change didn't accomplish what I wanted, which again is to be able to communicate with the board using Repetier-Host and the TX3/RX3 serial connection on the board. I suspect the way to accomplish this has little to do with the Repetier firmware and more to do with some modification to an Arduino library that the Repetier firmware uses. Is there a way to do this?
Thanks for your help and advice!
Comments