Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/04/05 23:52
Read: times


 
#96560 - Beware! The 90:10 rule...
Responding to: ???'s previous message
Kurnia,

You code assumes that the modem response will be precisely 4 characters, and that those characters will be cr,lf,'O','K'

While this may be fine for a quick hack just to see something happening, your final code must handle the case where the modem's response does not match this precise requirement!

As I've said before, the effort to drive things when everything goes right amounts to only 10% or so of the effort to handle all the things that could possibly go wrong!
http://www.8052.com/forum/read.phtml?id=81002
http://www.8052.com/forum/read.phtml?id=76017

Also, the response strings - known as Verbose responses - such as "OK" and "CONNECT 28800/V44" are designed for interpretation by a human operator.
You will save yourself a great deal of unnecessary work by switching to Terse responses - these are simply numeric codes, specifically dsigned for easy interpretation by software:
http://www.8052.com/forum/read.phtml?id=75948

List of 6 messages in thread
TopicAuthorDate
Hyperterminal read, but uC does'nt.            01/01/70 00:00      
   Level Converter ?            01/01/70 00:00      
      Level converter            01/01/70 00:00      
   UART initialization            01/01/70 00:00      
      UART initialization, thank you.            01/01/70 00:00      
   Beware! The 90:10 rule...            01/01/70 00:00      

Back to Subject List