PDA

View Full Version : Reading PIC serout in hyperterminal



financecatalyst
- 21st October 2009, 23:40
Hi
I bought an EM 406A gps module. I want to see the data output in hyperterminal, so I gave +5v and Gnd to relevant pins of the GPS and attached the Tx pin of the GPS to the pin 11 of MAX232, and pin 14 of max232 went to pin2 of rs232 and gnd were made common by attaching rs232 pin5 to gps gnd as well.
Nothing appeared on my hyperterminal. I then realised that TTL level of my GPS module is 0 - 2.85V.
I put my GPS module aside.

I have an already working project where PIC is attached to an GSM modem TC35i. It works fine. As it gets boring when things are working fine so I did an experiment to read the commands PIC is sending to my GSM in Hyperterminal.
My connections stayed the same PIC tx >......Max 232 pin11 & max232 pin14 >......pin2 of rs232. Gnd common, BUT I still couldnīt read anything. I was hoping to see the AT commands PIC is sending regularly.

Please help.

mackrackit
- 22nd October 2009, 01:57
Not sure but I do not think the GPS need the RS232. I think the data is already inverted.

Might be a similar problem when sending the AT commands.

A code snippet might help.

financecatalyst
- 22nd October 2009, 02:53
Ok, I did as advised and its working now i.e.I removed the max 232 and connected pin2 or RS232 and Tx of the GPS module direct. Also can this GPS Tx pin be connected to any input pin on my pic direct?

I am receiving somthing but it all seems garbage to me. Its not NMEA type data for sure.

mackrackit
- 22nd October 2009, 07:08
Almost any pin will work. Just remember the analog ones need setup for digital.

You may want to check th baud rate, and if 8,N,1 is set and the flow control is none. (normally)

financecatalyst
- 22nd October 2009, 14:58
Ok, made it work, I needed to convert 2.85 to 5 V and then to RS232. Getting the required data from the GPS on my hyperterminal.
BUT
Upon connecting the hyperterminal to PIC I can only see the commands PIC is sending and I am unable to reply to my PIC via hyperterminal. Has it got anything do with RTS & CTS and what do these pins do excatly?

If my PIC sends AT command to my GSM, should it request an CTS first to be safe (As it is working without it now)?

AND

How can I also reply to my PIC via hyperterminal?

Thanks in advance

mackrackit
- 22nd October 2009, 15:13
All you need are the TX and RX lines.
Micro Code Studio has a nice terminal built in. Much better than hyperterminal.
It has a send and receive area. Type what you want to send and hot enter.