Hello, I am new to Arduino but I'm NOT new to ATmega devices. I'm writing an application for the ATmega128 but at this stage I'm using an ATmega2560 as it comes with the Atmel STK600 development kit. The application uses two async data streams at 9600bps & I've written code to monitor either stream using the 'spare' two usarts on the 2560. One usart reads everything from the selected data stream while the other reformats it and presents it as a hex dump for debugging purposes. This output stream is fed at 38400bps into an Arduino serial-to-USB converter, which is viewed on a PC via the Arduino serial monitor screen. All well and good.
When I switch my hardware to an ATmega128, I will lose the two spare usarts and so I want to set up a freestanding monitoring unit with a USB interface into the Arduino serial monitor.
The first question is, can you load code into an Arduino Mega which was produced by the Atmel AVR assembler? (meaning via the presumed SPI facility that must exist behind the USB port on the Mega).
I'm fairly confident that the Mega will be able to push the 'output' data stream from my monitor code into the usart behind the USB port and have it come out in the serial monitor. I'm also fairly confident that I could set up a JTAG header on a prototyping shield and program the Mega that way.
I would appreciate an insight into how Arduino actually uploads its code.
Second question: The Uno is based on the ATmega328 which only has one true usart. I believe the USB port is attached to the SPI facility. Is the USB port capable of doing any kind of output into the Arduino serial monitor?