Camola, from your code it seems that you are using portC.6 and PortC.7 for communication with cellphone. If this is correct then:
Connect pic portC.6 to max232 pin 11 (TTL Tx)
Connect pic portC.7 to max232 pin 12 (TTL Rx)
Connect max232 pin 14 to phone serial cable pin 3 (Should be Rx ?)
Connect max232 pin 13 to phone serial cable pin 2 (should be Tx ?)
Connect circuit ground to phone serial cable pin 5
(If you connect it to the PC I assume you have a 9 pins DB female connector)
It should work. If it doesn't invert connections at the serial cable pins 2 & 3
Al.
Last edited by aratti; - 4th December 2008 at 15:47.
All progress began with an idea
Did you powered the cable working with hyperterminal? If not you don't need to do it with max232.Yes it have and there are nokia cables to conect it to pc rs232 i have one from nokia and works fine with hyperterminal.
Al.
All progress began with an idea
Yes you can. But when you service one device you don't see the others (If device A will send data while you are servicing device B, device A data will be lost"Can i use in same code more the one Serout2/in2 on diferent ports to control phone and gps and others serial devices?
Al.
Last edited by aratti; - 4th December 2008 at 22:44.
All progress began with an idea
I have not done phones, but the others many times.
As long as the pin is set for digital SERIN/OUT/2 will work on any pin that is an I/O, You can have as many pins as you want taking turns doing serial.
You can mix and match SERIN, SERIN2, and HSERIN.
If you are slick, you can HSERIN on the hardware and SEROUT on another.
Dave
Always wear safety glasses while programming.
Hi,
I have used Serin2 and works not in any 16f877a port it works on B.7 as Rx and in B.6 as Tx.
Serout2 PortB.6, 84,["AT",13,10]
Serin2 PortB.7,84, [wait ("ok")]
High PortB.0
Dont work in C.7 and C6, C4 and C5 big mess.....
Can i used 2 diferents Serin2 and Serout2 in same code because i need to control phone and gps i was using hserin/out to phone and Serin2/out2 for gps.
Thanks
Last edited by camolas; - 4th December 2008 at 17:35.
Bookmarks