Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Using PIC16F84A as SMS controller

Status
Not open for further replies.

kasamiko

Member
Hi,
I trying to send an SMS message using PIC16F84A and Nokia 6210 unsing DLR3P. I'm using a PICBasic language but I can't make it works..
I'm using PORTB.1 (pin 7) of PIC to send this command..

Begin:
SerOut PORTB.1, 84,["AT+CMMS=1",44,34,"+MyNumber",34,44, "129",13]
DelayMs 1000
SerOut1 PORTB.1, 84,["Test Message",26]
DelayMS 3000
GOTO Begin


PORTB.1 (pin 7) is connected to RX of Nokia 6210..
Any help will be appreciated.
TIA
 
Is the pic just connected straight to the Mobile ?

If this is the case the mobile may have a proper rs232 port and require +12 / -12 volt in stead of 0 and 5V.
Also check how picbasic outputs the serial data, it might do it inverted (for use with inverting level shifter) or non inverted - you need to use the same as the mobile expects.
 
As far as I know most data cables have driver ICs embedded into them and they derive power from RTS and DTR pins of the RS232 port. So if you have just connected only RX, TX and GND PIC (MAX232) to the cable, it won't work.
You need to construct extra +-12V supply in order to power the cable's internal circuitry.
 
I just finished my circuit below a PIC to cellphone interface to send text messages..I can succesfully SEND a pre-programmed text message using this code:

Device 16F84A
Declare Xtal = 4

Start:
LOW LED
DelayMS 1000
SerOut2 PORTB.1, 84,["AT+CMGS=",34,"MyNumber",34,13]
DelayMS 1000
SerOut2 PORTB.1, 84,["TEST",13]
DelayMS 1000
SerOut2 PORTB.1, 84,[26]
DelayMS 3000
GOTO Start

I can send an endless "TEST" text messages to "MyNumber" but I can't make it work to read received text messages..

I need a code sample that will READ the received text message and will text back to the sender the word "GOOD"

I don't have the idea how to strip the sender phone number and the sent text message "GOOD" from this data using SERIN command..

+CMGR: "REC READ","+631234567890",,"05/05/26,17:19:23+00"
GOOD
OK


Maybe a STR function will do..

@ice*
PIC16F84A don't a hardware UART.

TIA
 

Attachments

  • pic_sms.jpg
    pic_sms.jpg
    284.3 KB · Views: 2,375
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top