Shop OBEX P1 Docs P2 Docs Learn Events
question on MSComm — Parallax Forums

question on MSComm

Drud0616Drud0616 Posts: 26
edited 2004-11-05 20:12 in General Discussion
In an MSComm tutorial (http://www.developerfusion.com/show/21/5/)·I saw this code in order to output a string to·a modem.·

MSComm1.Output = "ATDT01992245365" & Chr$(13)

I understand what the string itself is, but what does & Chr$(13)mean?· I also noticed it in http://www.rentron.com/sending_data.htm·


MSComm1.Output = Chr$(255) & Chr$(PinNumber) & Chr$(PinState)

This was explained as synch byte (255), followed by the pin number, followed by the pin state.· I'm alittle confused here

Comments

  • Drud0616Drud0616 Posts: 26
    edited 2004-11-04 01:24
    Another question I have is in the MSComm settings property...

    MSComm1.Settings = BBBB,P,D,S

    Where BBBB is the baud rate, P is the parity, D is the number of data bits, and S is the number of stop bits.

    How do I choose the values needed?· I am sending information to a BS2.· When would I need to use a parity bit?· How do I know how many data bits to send? etc

  • Jose I QuinonesJose I Quinones Posts: 3
    edited 2004-11-04 01:51
    It looks like a carriage return character. That would be useful when sending a message to a text terminal. I don't see why it would be useful on a BS application. Of course, when dealing with serial communications you can always design your own protocol. Hence, you could use character 13 for an End of Message if you wanted. However, I think 0 is the conventional EOM.

    JIQ
  • Fast MiconFast Micon Posts: 16
    edited 2004-11-05 20:12
    It is definitely a carriage return code so the modem knows when the AT code finishes and can dial the number in the sentence.

    ·
Sign In or Register to comment.