I'm working on a project with a GPS device that communicates over UART. I have sucessfully conntected the GPS device directly to RPI uart and was able to read GPS data. I have now connected the GPS to the atemega on the gertboard. The RX pin of the atmega goes to the tx pin of the GPS. The tx pin of the atmega goes to the rx of the RPI.
What I'm trying to set up is a very basic test where the atmega reads data from the gps and sends it to the RPI. I'm using minicom on the rpi to see output. I'm using peter fluery's libarary for UART on the atmega. No matter what settings I try for baud all i see in my minicom window on the PI is garbage characters. I know data is being sent sucessfully, however it appears baud is not set correctly.
What clock speed does the atmega on the gertboard run at? Based on the fuse readings I've done high is 0xd9 and low is 0xe7 which means its using an external full swing crystal from what I have found. I'm still kinda new to clocking and oscialltion so I'm wondering what i need to set my F_CPU to in order to get correct data.
As a debugging measure I've even put a _delay_ms(30000) after the intial uart_puts("blah blah"); first line in peter's library. I see garbage characters, then 30s delay, then it starts sending all the data from the GPS, again, all garbage chars. So I know its communicating correctly just my baud/clock is not set correctly.
Any help is greatly appreciated.