I just wanted to test my EM-406A GPS module,by,-
1. Connecting GPS's TX to Atmega8's RX via a 2.8V to 5V level converter
2. Connecting MCU's TX to my PC via standard MAX-232 IC and the serial port
3. I haven't connected my GPS's RX to anything as at present I don't want to send any commands to it.
I wrote a simple code to see what my module was spitting out--
#include#include #include "usart.c" void init() { USART_init(155);//BAUD corresponding to Baud Rate 4800 UCSRB |= (1 << RXCIE); // Enable the USART Recieve Complete interrupt (USART_RXC) sei();// Enable the Global Interrupt Enable flag so that interrupts can be processed } ISR(USART_RXC_vect) { char c; c = UDR; // Fetch the recieved byte value into the variable "ByteReceived" UDR=c; // Echo back the received byte back to the computer } void main() { init(); while(1) { //Interrupts will do the job } }
But I didn't see any data on my terminal. It's probably a hardware problem, but just wanted to know if there could be anything wrong with the code?.
Also ,does the module work indoors,mine isnt getting a fix(LED not flashing) inside my house. Lot of trees and wires near my window.