Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

pic18f4520 with sim800 with implementing different states of authentication

Status
Not open for further replies.

raushankumar586

Junior Member level 1
Junior Member level 1
Joined
Jun 26, 2017
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
191
hey Embedded geek,
Respect!!

I am able to communicate from pic18f4520 to sim800 modules through uart and one I2C connection is established between PIC and arduino2560 to see the received output in pic through arduino serial monitor. Basically , I am writing from pic to sim800 and then sim800 respond back to pic, that response data I am storing in a buffer and sending through I2C to arduino mega 2560.

I now what I want to implement to have a kind of state machine where if I send ---
AT ------ OK(get response from sim) ---state 1
AT+CGMR---- Revision:1418B02SIM800C24_BT \n\n OK (get response from sim) ---state 2

similarly there can be more than 10 states, I want untill once state is passed program should not move in second state.
I have an external RTC ready with connected to pic for timing reference, Can any one suggest me how to do it , I am stucked here for 3 days..... finally posting .....
 

there can be more than 10 states, I want untill once state is passed program should not move in second state.
I have an external RTC ready with connected to pic for timing reference, Can any one suggest me how to do it

The suited procedure is to draw a complete flowchart or another textual language description on how do you expect to have the system working, not necessarily with inline code as you did. There are a lot approaches, but I often choose the switch-case to that. Perhaps there will be needed more than one layer, I mean, more than one state, being one within another, such as a submenu.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top