I can't get the Arduino IDE to see the serial port on the ATmega328 on the
Gertboard. The serial port selection is grayed out and when I select monitor
serial port I get a message saying that it could not find /dev/ttyAMA0. I have
removed or commented out all entries in cmdline.txt and inittab that reference
/dev/ttyAMA0. I changed the .arduino/preferences.txt entry for the serial port
to /dev/ttyAMA0 at 9600 baud. I can loop back by shorting the GP14 pin to the
GP15 pin on the Gertboard and it works perfectly with minicom. avrdude also
seems to have no problem finding /dev/ttyAMA0 but it does not seem to be able to
communicate with the bootloader either.
Trouble shooting this has been made more complicated by a couple of hardware
factors.
1) The ATmega328 that came with the Gertboard is unprogrammed and the only one I
have programmed is from a Rev 3 Arduino Uno that runs at 16 MHz @ 5V.
2) When running at 12 MHz @ 3.3V it produces the wrong baud rate.
3) There is no automatic reset but there is a reset button I use.
As it turns out the first two are fixed because I am working on a project that
has required me to modified the Gertboard to allow the ATmega328 on it to run at
12 MHz @ 3.3V or 16 MHz @ 5V (all 3V3 connections to the ATmega328 are isolated
from the 3V3 bus on the Gertboard and I have installed a socket for the
resonator). It uses two active 3.3V to 5V translators to connect to the serial
RX/TX pins at GP14 and GP15 on the Gertboard when using 5V. Using an oscilloscope
I have verified that the voltage translators are working properly. I can loop
back by shorting a header at the 5V logic levels and it works with minicom as
well. There is a program that was downloaded into the ATmega328 when it was in
the Arduino that sends data to the serial port continuously and I can see that
this output is correct by using minicom to monitor it so I know that the
ATmega328 is working and that the baud rate is correct. I have monitored the
serial input pin on the ATmega328 with the oscilloscope and verified that what I
type in using minicom is being received at that pin also at the correct baud
rate.
At this point I think I have eliminated hardware problems so I am primarily
looking for software or configuration suggestions. Thanks.