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.

Internet dongal result put to the MCU

Status
Not open for further replies.

micropad

Member
Dear ALL,THis is related to PIC16f877a MCU and USART
Following message was received to my Hyper terminal from my Internet dongle. which is SMS I sent to Dongal SIM

+CMGL: 1,"REC UNREAD","+96712720102",,"13/02/2,21:41:34+22" RB0

My message is "RB0"

Now I need to send this message to MCU using USART and in the MCU, I need to light on RB0 LED
Please advice step by step

Thanks in advance
 
What do think is the best way to do it?

Maybe you could just capture the last 2 characters B and 0? That gives the port and the pin.

In my 16F1827 based SMS system I read the entire message in to a buffer (hence the use of the 1827), and do a text search on the buffer.

I consider it important to be pretty to be specific about the instructions you're searching for, just 'B0' would be a bit to easy to occur accidentally - I choose a five letter system such as "SET= - which would work well in this case, you could have "RB0=ON" and "RB0=OFF" for example. So you search for "RBO= and once that is found read the following characters and look for the subsequent " which signifies the end of the instruction, then simply check if it's ON or OFF.
 
Status
Not open for further replies.

Latest threads

Back
Top