This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ACK, SOH , STX ascii format

Private Function negotiate() As String Dim nego As String = Chr(6) + Chr(48) + Chr(53) + Chr(49) + Chr(13) + Chr(10) sp1.Output(nego) End Function

THIS IS A vb FUCTION,i need to send this string in assembly lnaguage from 8051 through serial port, first character is ACK, i dont understand how to send ACK, and CR and LF in assembly, the receiver sysem requires ASCii data, can i put their HEX values?? i tested the system with hyper terminal, and sent ctrlF for ACK,and it worked. can i use
MOV, A, '^F'
lcall TRANS
TRANS: SETB TR1 MOV SBUF,A ;load SBUF

HERE: JNB TI,HERE ;wait for the last bit

CLR TI ;get ready for next byte RET

will it be treated as ACK? 'value has been trucated to 8 bits' this is assembler's response

secondly, the receiver works with 7 data bits and even parity, how do i select thses settings using 8051

Parents
  • Have you spent any time googling for ASCII table? Then you should know the numeric values for your control characters. And when you play with DB, the assembler don't care if the data you enter represents specific ASCII characters or are numbers for some math algorithm. So you can enter the numeric values you did find in the ASCII table.

Reply
  • Have you spent any time googling for ASCII table? Then you should know the numeric values for your control characters. And when you play with DB, the assembler don't care if the data you enter represents specific ASCII characters or are numbers for some math algorithm. So you can enter the numeric values you did find in the ASCII table.

Children