We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am developing and testing software in a circut useing 89C51RD+ chip. My circuit isn't very testable since it doesn't have any human interfaces just Parallel I/O to and from a ARINC 429 interfaces and a RS422 serial output. The circuit takes data from the input ARINC interface, massages it with data from the RS422 interface and transmitts the data on the output ARINC interface.
The RS422 recieve portion is controlled by a serial interrupt routine
void serialCom(void) interrupt 4 using 2
. I am looking for a way to watch (track) the operation on a Keil U 3 Vision development platform. The entire operation is keyed upon reciept of a serial data interrupt.
How do I set up for interrupts and feed data in? Ist there a way to simulate serial input data? any other suggestions would be appreciated- I am new at the Kiel system.
The "Hello, World" sample illustrates simulating serial IO: http://www.keil.com/support/man/docs/uv3/uv3_ex_hello.htm
See also: www.keil.com/.../uv3_sm_uartcommunication.htm
http://www.keil.com/support/man/docs/uv3/uv3_cm_assign.htm
http://www.keil.com/support/man/docs/uv3/uv3_cm_mode.htm
www.keil.com/.../uv3_db_exp_pvar_serial.htm
When using serial IO on an 8051 - real or simulated - you need to understand how SBUF works:
Writing to SBUF loads the UART Transmitter; Reading SBUF reads the last byte from the UART Receiver
In particular, note that reading SBUF does not return the same value that you last wrote to it!
See p2 and pp9-15 in Chapter 3 of the so-called "bible" for the 8051:
Chapter 1 - 80C51 Family Architecture: www.nxp.com/.../80C51_FAM_ARCH_1.pdf
Chapter 2 - 80C51 Family Programmer's Guide and Instruction Set: www.nxp.com/.../80C51_FAM_PROG_GUIDE_1.pdf
Chapter 3 - 80C51 Family Hardware Description: www.nxp.com/.../80C51_FAM_HARDWARE_1.pdf