PDA

View Full Version : SMS with pic12f675 using Serout



camilen
- 6th June 2008, 19:14
Hello,
I can't send SMS text with pic12f675 using Serout and Nokia 6131

I'm using external osc 4Mhz

From nokia 6131 pin Rx R1k serial to gpio.0

code :


include "modedefs.bas"

DEFINE OSC 4

loop:

pause 500
Serout gpio.0,N1200,["AT",13]
pause 1000

Serout gpio.0,N1200,["AT+CMGF=1",13]
pause 1000


Serout gpio.0,N1200,["AT+CMGS=",34,"+1555963754",34,13]
pause 1000

Serout gpio.0,N1200,["Hello world"]; ascii 26
pause 1000


Serout gpio.0,N1200,[26,13]
PAUSE 500


Goto loop
End

skimask
- 6th June 2008, 19:37
Are you sure your PIC is even running?
(sounds/looks real familiar)
And have a look at Section 6.2 of the PIC12F675 datasheet and the very first thread mentioned on these forum's home page in the FAQs about PortA.
Are you sure the PIC is running on the external oscillator vs the internal oscillator?

phoenix_1
- 6th June 2008, 20:16
Hello,
I can't send SMS text with pic12f675 using Serout and Nokia 6131

I'm using external osc 4Mhz

From nokia 6131 pin Rx R1k serial to gpio.0

code :


include "modedefs.bas"

DEFINE OSC 4

loop:

pause 500
Serout gpio.0,N1200,["AT",13]
pause 1000

Serout gpio.0,N1200,["AT+CMGF=1",13]
pause 1000


Serout gpio.0,N1200,["AT+CMGS=",34,"+1555963754",34,13]
pause 1000

Serout gpio.0,N1200,["Hello world"]; ascii 26
pause 1000


Serout gpio.0,N1200,[26,13]
PAUSE 500


Goto loop
End

Nokia phones need DLR3P cable and work at 2.7V logic level.
regards