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
You really need to study the available materials before posting.
For a start, the clearly stated instructions on how to post source code:
www.danlhenry.com/.../keil_code.png
Then, the Datasheet for your particular chip will tell you what modes its serial port supports, and how to configure them.
For general background on the 8051 family, see: www.8052.com/.../120112 http://www.8052.com/tutorial