| |||||
Technical Support Support Resources
Product Information | DSCOPE: SERIAL WINDOW SBUF DOES NOT FUNCTION AS EXPECTEDInformation in this article applies to:
QUESTIONI have written a small program that uses the on-chip UART. When I simulate my program in dScope with the Serial Peripheral window open, I notice that the SBUF entry does not show the correct value. The value stays at 0x00. If I type a value into the window, it is not received by my program. ANSWERThe SBUF item in the Serial Peripheral window only represents the transmit part of SBUF. The receive part is not represented. The result is that this item can only be used to see bytes that are being transmitted. In order to send a byte to your program, type the following on the dScope command line: sin = 0x55 The value is placed into SBUF and RI is set. If you have the serial interrupt turned on, then it is triggered. To see the bytes being received, set a watchpoint on the variable you are copying SBUF into, on a receive triggered serial interrupt. MORE INFORMATIONRefer to Appendix A. CPU Driver Files, on page 295 of the dScope for Windows manual (01.97) for more information on sin and other VTREGs. Last Reviewed: Thursday, June 10, 2004 | ||||
| |||||