electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

PLZ I need this Code Urgently


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> PLZ I need this Code Urgently
Author Message
cool_guy4ever15



Joined: 11 Mar 2009
Posts: 8


Post31 Mar 2009 22:23   

2313def.dat


Hello Every Body

my graduation project is SMS Remote COntrol,i'm using t290i ericsson i've tested it with AT Commands and hyper terminal it works well when i send message to mobile i could read it on hyperterminal.but now i don't know how can i make the MCU when i connect it to the mobile recieve the msg an switch on/off devices.

plz i want the full code so i can burn it. may be i'll connect devices on port2 p2.0 ...p2.4. assume any port NOP but tell me.

plz i want this code as soon as possible.
Back to top
cool_guy4ever15



Joined: 11 Mar 2009
Posts: 8


Post01 Apr 2009 19:20   

PLZ I need this Code Urgently


???????????????????????????????????
Back to top
blueroomelectronics



Joined: 17 Sep 2006
Posts: 1681
Helped: 99
Location: Toronto, Canada


Post02 Apr 2009 2:46   

PLZ I need this Code Urgently


It's your project aren't you supposed to write the code?
Back to top
aanand_44



Joined: 25 Jul 2007
Posts: 24
Helped: 2
Location: India


Post02 Apr 2009 5:54   

Re: PLZ I need this Code Urgently


Hi,
Tell me which MCU you have to use this project????? After that I'll give you solution for that.

Regards,
Anand.A
Back to top
cool_guy4ever15



Joined: 11 Mar 2009
Posts: 8


Post02 Apr 2009 15:49   

PLZ I need this Code Urgently


i am not expert in programming C for Microcontroller. and i don't think it'll be a problem that any one helps me in the project.as i see many ppl in the forum writing codes for each other.

and for Mr.aanand_44 i'm using AT89s52.thanks for your help. i'll be waiting the code plz. and if u want me to explain to you any information about the code which pins i connect the device to and the switch on/off messages.
Back to top
cool_guy4ever15



Joined: 11 Mar 2009
Posts: 8


Post03 Apr 2009 23:56   

PLZ I need this Code Urgently


hi Mr. Anand.A where r you?
Back to top
cool_guy4ever15



Joined: 11 Mar 2009
Posts: 8


Post07 Apr 2009 0:14   

PLZ I need this Code Urgently


I THINK U WERE FORCED NOT TO WRITE THE CODE :@
Back to top
Google
AdSense
Google Adsense




Post07 Apr 2009 0:14   

Ads




Back to top
RBB



Joined: 02 Jul 2007
Posts: 115
Helped: 11
Location: USA


Post07 Apr 2009 0:35   

PLZ I need this Code Urgently


Maybe he was forced or maybe, just maybe he didn't want to do your homework.
Back to top
zahak



Joined: 09 Dec 2008
Posts: 3
Helped: 1


Post07 Apr 2009 2:33   

Re: PLZ I need this Code Urgently


Connect Your mobile or your GSM modem to serial port of your uC!
This is code you asked, you can Send & Receive SMS using this code.
You can find this code is Sample folder of your BASCOM too...
Hope to help!
Regards,
Shahram H.Farmanesh


'------------------------------------------------------------------------------
' SMS.BAS
' (c) 2002-2007 MCS Electronics
' This sample shows how to use AT command on a GSM mode
' The GSM modems are available from www.mcselec.com
'------------------------------------------------------------------------------

$regfile = "2313def.dat"

'XTAL = 10 MHZ
$crystal = 10000000

'By default the modem works at 9600 baud
$baud = 9600

'HW stack 20, SW stack 8 , frame 10
$hwstack = 20
$swstack = 8
$framesize = 8


'some subroutines
Declare Sub Getline(s As String)
Declare Sub Flushbuf()
Declare Sub Showsms(s As String )


'used variables
Dim I As Byte , B As Byte
Dim Sret As String * 66 , Stemp As String * 6

'we use a serial input buffer
Config Serialin = Buffered , Size = 12 ' buffer is small a bigger chip would allow a bigger buffer

'enable the interrupts because the serial input buffer works interrupts driven
Enable Interrupts

'define a constant to enable LCD feedback
Const Uselcd = 1
Const Senddemo = 1 ' 1= send an sms
Const Pincode = "AT+CPIN=1234" ' pincode change it into yours!
Const Phonenumber = "AT+CMGS=+31653123456" ' phonenumber to send sms to

#if Uselcd = 1
Cls
Lcd "SMS Demo"
#endif

'wait until the mode is ready after power up
Waitms 3000

#if Uselcd = 1
Lcd "Init modem"
#endif


Print "AT" ' send AT command twice to activate the modem
Print "AT"
Flushbuf ' flush the buffer
Print "ATE0"
#if Uselcd = 1
Home Lower
#endif

Do
Print "AT" : ' Waitms 100
Getline Sret ' get data from modem
#if Uselcd = 1
Lcd Sret ' feedback on display
#endif
Loop Until Sret = "OK" ' modem must send OK
Flushbuf ' flush the input buffer
#if Uselcd = 1
Home Upper : Lcd "Get pin mode"
#endif
Print "AT+cpin?" ' get pin status
Getline Sret
#if Uselcd = 1
Home Lower : Lcd Sret
#endif
If Sret = "+CPIN: SIM PIN" Then
Print Pincode ' send pincode
End If
Flushbuf
#if Uselcd = 1
Home Upper : Lcd "set text mode"
#endif
Print "AT+CMGF=1" ' set SMS text mode
Getline Sret ' get OK status
#if Uselcd = 1
Home Lower : Lcd Sret
#endif

'sms settings
Print "AT+CSMP=17,167,0,0"
Getline Sret
Print "AT+CNMI=0,1,2,0,0"
Getline Sret

#if Senddemo = 1
#if Uselcd = 1
Home Upper : Lcd "send sms"
#endif
Print Phonenumber
Waitms 100
Print "BASCOM AVR SMS" ; Chr(26)
Getline Sret
#if Uselcd = 1
Home Lower : Lcd Sret 'feedback
#endif
#endif


'main loop
Do
Getline Sret ' wait for a modem response
#if Uselcd = 1
Cls
Lcd "Msg from modem"
Home Lower : Lcd Sret
#endif
I = Instr(sret , ":") ' look for :
If I > 0 Then 'found it
Stemp = Left(sret , I)
Select Case Stemp
Case "+CMTI:" : Showsms Sret ' we received an SMS
' hanle other cases here
End Select
End If
Loop ' for ever


'subroutine that is called when a sms is received
's hold the received string
'+CMTI: "SM",5
Sub Showsms(s As String )
#if Uselcd = 1
Cls
#endif
I = Instr(s , ",") ' find comma
I = I + 1
Stemp = Mid(s , I) ' s now holds the index number
#if Uselcd = 1
Lcd "get " ; Stemp
Waitms 1000 'time to read the lcd
#endif

Print "AT+CMGR=" ; Stemp ' get the message
Getline S ' header +CMGR: "REC READ","+316xxxxxxxx",,"02/04/05,01:42:49+00"
#if Uselcd = 1
Lowerline
Lcd S
#endif
Do
Getline S ' get data from buffer
Select Case S
Case "PORT" : 'when you send PORT as sms text, this will be executed
#if Uselcd = 1
Cls : Lcd "do something!"
#endif
Case "OK" : Exit Do ' end of message
Case Else
End Select
Loop
#if Uselcd = 1
Home Lower : Lcd "remove sms"
#endif
Print "AT+CMGD=" ; Stemp ' delete the message
Getline S ' get OK
#if Uselcd = 1
Lcd S
#endif
End Sub


'get line of data from buffer
Sub Getline(s As String)
S = ""
Do
B = Inkey()
Select Case B
Case 0 'nothing
Case 13 ' we do not need this one
Case 10 : If S <> "" Then Exit Do ' if we have received something
Case Else
S = S + Chr(b) ' build string
End Select
Loop
End Sub

'flush input buffer
Sub Flushbuf()
Waitms 100 'give some time to get data if it is there
Do
B = Inkey() ' flush buffer
Loop Until B = 0
End Sub
Back to top
cool_guy4ever15



Joined: 11 Mar 2009
Posts: 8


Post12 Apr 2009 15:03   

PLZ I need this Code Urgently


thank u mr zahak i really really approtiate your help

and for u mr. RBB i don't want some one to do my job coz am lazy NO But i want so because i don't know programming language especially MicroC and am newBie so if i learn to program this code i'll be running out of time ...

thank you again mr.zahak i really approtiate your work and i'll test it and tell you the results
Back to top
ahmadabad



Joined: 17 Sep 2009
Posts: 2


Post30 Oct 2009 10:13   

PLZ I need this Code Urgently


Dears
I connect sim 300 to avr microcontroller and connect one LCD to microcontroller.How can I process received SMS. For example how can I indicate received SMS on LCD.please note that I will use codevision . please inform sample code if you have.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> PLZ I need this Code Urgently
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
Need help with this code Urgently!!!!!!! (1)
Need a simple schematic and code plz plz plz (14)
help me in this code plz (1)
what wrong in this VHDL code plz help me (3)
I need this paper urgently (1)
can someone plz help with this verilog code of mine? (5)
Need VHDL code urgently...plllzzzz guys (1)
I urgently need this article. PLS HELP!!! (2)
i need MATLAB code for DS-BPSK fading simulation urgently (2)
i need this book plz (3)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS