Dear all, My board will have several inputs connected to P0-P3. The PC will instruct the microcontroller using RS232, to monitor some of the inputs. The communication between the PC and the 8051 will be somewhat like below:
PC->8051: count the state changes on P0.3 count the state changes on P0.6 : : inform me on any change of the state of P1.5 inform me on any change of the state of P3.4 : :
Ahhh. If you pass the Port information to a program that is already compiled and linked then you must do something like the switch statement. I seem to recall that someone did something similar but either they use von Neuman RAM and wrote the instruction to XDATA (and executed it from CODE) or created an assembly switch that was really efficient. Jon