I have successfully programmed the ATMEGA8 with an AVRISPv2 but am now trying to use the serial monitor for debug as well. I took an Arduino Uno and removed the ATMEL micro on it and connected the Reset, Tx, Rx, 5V and GND pins between the boards as on this page http://arduino.cc/en/Tutorial/ArduinoToBreadboard. I cannot figure out how to make the serial monitor work with this setup
I have a simple program below:
void setup() {
// put your setup code here, to run once:
Serial.begin(14400);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.print("Have a nice day\n");
delay(1000);
}
When I try to serial monitor it, I get this gobbledygook:
Have you defined a corresponding board type in boards.txt with the cpu speed set correctly? I don't know if that's all that's needed to get the serial speed correct, but I'd have thought it was.
Osgeld:
arduino software is defined to run at 8 or 16, anything else and your going to have timing issues
try doubling your serial speed on the chip, and leaving your com program set to 14400
How do I double the serial speed on the chip? I tried the following code:
void setup() {
// put your setup code here, to run once:
Serial.begin(28800);
// initialize the digital pin as an output.
DDRB = 0xFF;
}
void loop() {
// put your main code here, to run repeatedly:
Serial.write("Can you see me?\n");
PORTB=B11100000;
delay(100); // wait for a second
PORTB=B11111111;
delay(100);
}
and left the serial comm on the arduino window @ 14400 but still got garbage.
I tried using an 8MHz crystal, setting "Serial.begin(14400)" and still get garbage btw
Is there some sort of protocol settings I need to set for the FTDI (parity, newline, etc)? I am using an OSEPP FTDI breakout board.