Microcontroller › AVR › gsm based water pump controller using atmega16
- This topic has 7 replies, 3 voices, and was last updated 11 years, 4 months ago by Shashank Rao.C.
-
AuthorPosts
-
May 24, 2013 at 7:08 am #2435Shashank Rao.CParticipant
hi every one,
I want to do gsm based water pump controller using atmega16 microcontroller. Can anyone tell me how ti interface sim300 with mcu using rs232?
only simple connection is enough or any handshake or extra signals needed? Please help me for coading
May 25, 2013 at 4:19 am #9823AJISH ALFREDParticipantHi Shashank,
You need a RS232 to TTL convereter cable. Connect the TX pin at the TTL end of the cable to RX of MCU and RX of MCU to TX pin of the TTL end of the cable. No need of other pins.
May 27, 2013 at 5:38 am #9827Shashank Rao.CParticipantsir can you give me coding for that? i am very very new to embedde c.
i got similar coding from efy. i did some changes. but it is for 8051. i am confused that how to covert that for atmega16 please help me…
coding is as bellow. i am unable to understand that how it works. means how mcu will know that msg has been recived, what it tells and how it will take action….
#include<reg51.h>
sbit rs=P3^7;
sbit rw=P3^6;
sbit e=P3^5;
sbit pump=P1^0;
void gsmcmdsend(unsigned char *cmd);
void cmm(char value);
void dat(char value);
void compare();
unsigned char card_id[96];
unsigned char header[]=”SRC”;
unsigned char gsm_cmd3[]=”AT&W”;
unsigned char gsm_cmd4[]=”AT+CMGF”;
void gsmcmdsend(unsigned char *cmd)
{
unsigned char i;
for(i=0;*cmd!=’