سلام دوستان من یک ماژول sim900 خریدم بعد کلی سرو کله زدن با این مازول برای دریافت اس ام اس و ارسال دیدم فقط ارسال بعضی وقت ها میشه سپس با یه پورت TTL ماژول رو تست کردم دیدم کاملا درسته و بعد وصل کردم به میکرو دیدم میکرو داره چیزای نا مفهومی رو ارسال می کنه !!!
مثلا :

کد برنامه هم به صورت زیر است :[tt][/tt]
ممنون می شم کمک کنید چون هرکاری کردم نشد و به مشکل بر خوردم . چون خروجی برنامه و میکرو من درست نیست نمی تونم با ماژول ارتباط برقرار کنم
پیشاپیش از کمک هاتون ممنونم
مثلا :

کد برنامه هم به صورت زیر است :[tt]
[code=vb]
'-----------------------------------------------------------------------------------------
'name : rs232buffer.bas
'copyright : (c) 1995-2005, MCS Electronics
'purpose : example shows the difference between normal and buffered
' serial INPUT
'micro : Mega161
'suited for demo : yes
'commercial addon needed : no
'-----------------------------------------------------------------------------------------
$regfile = "m16def.dat" ' specify the used micro
$crystal = 8000000 ' used crystal frequency
$baud = 9600 ' use baud rate
Config Portd = Output
'first compile and run this program with the line below remarked
Config Serialin = Buffered , Size = 20
Dim Na As String * 10
'the enabling of interrupts is not needed for the normal serial mode
'So the line below must be remarked to for the first test
Enable Interrupts
Print "Start"
Do
Set Portd.7
Reset Portd.6
'get a char from the UART
Print "Start"
If Ischarwaiting() = 1 Then 'was there a char?
Input Na
Print Na 'print it
End If
Set Portd.6
Wait 1 'wait 1 second
Loop[/code]
'-----------------------------------------------------------------------------------------
'name : rs232buffer.bas
'copyright : (c) 1995-2005, MCS Electronics
'purpose : example shows the difference between normal and buffered
' serial INPUT
'micro : Mega161
'suited for demo : yes
'commercial addon needed : no
'-----------------------------------------------------------------------------------------
$regfile = "m16def.dat" ' specify the used micro
$crystal = 8000000 ' used crystal frequency
$baud = 9600 ' use baud rate
Config Portd = Output
'first compile and run this program with the line below remarked
Config Serialin = Buffered , Size = 20
Dim Na As String * 10
'the enabling of interrupts is not needed for the normal serial mode
'So the line below must be remarked to for the first test
Enable Interrupts
Print "Start"
Do
Set Portd.7
Reset Portd.6
'get a char from the UART
Print "Start"
If Ischarwaiting() = 1 Then 'was there a char?
Input Na
Print Na 'print it
End If
Set Portd.6
Wait 1 'wait 1 second
Loop[/code]
ممنون می شم کمک کنید چون هرکاری کردم نشد و به مشکل بر خوردم . چون خروجی برنامه و میکرو من درست نیست نمی تونم با ماژول ارتباط برقرار کنم
پیشاپیش از کمک هاتون ممنونم
دیدگاه