??? 03/07/07 13:28 Read: times Msg Score: -1 -1 Answer is Wrong |
#134464 - you need to understand the parameters. Responding to: ???'s previous message |
one thing that needs to be understood is the value.
For example: MOV SBUF,#A is moreso invalid than valid. Some people assumed that #A is an actual number. However, this is more valid: MOV SBUF,#AH because the "H" represents hexadecimal, and AH is equivalent to 10. so that above instruction sends code "10" to the serial port. If you want to easily send a string, you can send the equivalent ascii codes of it, one at a time. below is an example of sending the letters A, and B, one right after the other. After each letter sent, it checks the internal transmit buffer to see if the whole byte has been sent. Once it has, the transmit indicator flag (TI) is cleared so that the next character can be processed. Failing to clear TI could cause some characters to be missed. clr TI MOV SBUF,#65 w1: jnb TI,w1 clr TI MOV SBUF,#65 w2: jnb TI,w2 |