Hello,
I'm working on a project that uses ATMELs' m328p on a custom board.
The micro-controller is configured to run at internal 1Mhz to save ~4mAh.
I've modified arduinos' environment to fit the diffrent frequency (bootloader and boards.txt).
The board contains a GPS that uses NMEA protocol at 4800 bps and a cellular module at 2400 Bps.
I have modified SoftwareSerial source code to work perfectly at 2400 Bps but the GPS at 4800 is more problematic:
I'm getting random errors in the read:
$GPGGA,235952.800,,,,,0,0,,,M,,M,,*4A
$GPGGA,235953.800,,,,,0,0,,,M,,M,,4B
$GPGGA,235954.800,,,,,0,0,,,M,,M??)4C
$GPGGA,235955.80?.,,,,0,0,,,M,,M,,4D
$GPGGA,235956.800,,,,,0,0,,,M,,M?&*4E
$GPGGA,235957.800,,,,,0,0,,,M,,M,,*4F
$GPGGA,235958.800,,,,,0,0,,,M,,M,,40
$GPGGA,235959.800,,,,,0,0,,,M,,M,,41
$GPGGA,000000.800,,,,,0,0,,,M,,M.,*40
And sometimes two errors in the same sentence 'fix' them self and the checksum doesn't help to identify this.
Also, I have a few identical boards and when I upload the same software on them, the communication at 4800 acts diffrently (more\less errors).
I understand that this is because I use the internal oscillator and there is an error %.
Can someone help me with the calculation to know if its even possible to get a software driven UART at 4800bps with 1Mhz clock with a low error %, and maybe a code or a tip to get there...
Thank you...
Roman.