Hello ... I'm trying to get data from GPS (LS20031, NewSoftSerial, 57600) on "LilyPad Arduino ATmega328" and getting garbage. When the same code is run on "Arduino Duemilanove ATmega328" it works perfectly fine.
- Yes, I DO switch board names in Arduino IDE before programming the chip.
- Yes, built in Serial works fine. ( eq. Serial.print("test!")
#include <NewSoftSerial.h>
NewSoftSerial mySerial(2, 3);
void setup()
{
Serial.begin(9600);
mySerial.begin(57600);
}
void loop()
{
if (mySerial.available()) {
Serial.print((char)mySerial.read());
}
if (Serial.available()) {
mySerial.print((char)Serial.read());
}
}
Any ideas? Could it be an issue with NewSoftSerial ...?
Below are exempts from my boards.txt file.
##############################################################
lilypad328.name=LilyPad Arduino w/ ATmega328
lilypad328.upload.protocol=stk500
lilypad328.upload.maximum_size=30720
lilypad328.upload.speed=57600
lilypad328.bootloader.low_fuses=0xFF
lilypad328.bootloader.high_fuses=0xDA
lilypad328.bootloader.extended_fuses=0x05
lilypad328.bootloader.path=atmega
lilypad328.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex
lilypad328.bootloader.unlock_bits=0x3F
lilypad328.bootloader.lock_bits=0x0F
lilypad328.build.mcu=atmega328p
lilypad328.build.f_cpu=8000000L
lilypad328.build.core=arduino
##############################################################
atmega328.name=Arduino Duemilanove or Nano w/ ATmega328
atmega328.upload.protocol=stk500
atmega328.upload.maximum_size=30720
atmega328.upload.speed=57600
atmega328.bootloader.low_fuses=0xFF
atmega328.bootloader.high_fuses=0xDA
atmega328.bootloader.extended_fuses=0x05
atmega328.bootloader.path=atmega
atmega328.bootloader.file=ATmegaBOOT_168_atmega328.hex
atmega328.bootloader.unlock_bits=0x3F
atmega328.bootloader.lock_bits=0x0F
atmega328.build.mcu=atmega328p
atmega328.build.f_cpu=16000000L
atmega328.build.core=arduino