Hi, I am using the Keil uVision 2 software to develop a firmware driver. I have one technical related to the sbit definitions. Lets say i have couple of sbit definitions as follows: sbit JTAG_TDO = 0xB0+0; sbit ALT_JTAG_TDO = 0x80+0; In the course of program execution, based on some condition I want JTAG_TDO point to the ALT_JTAG_TDO pin so that whatever i write to JTAG_TDO gets written to ALT_JTAG_TDO at the port address 0x80+0 instead of the original 0xB0+0. I tried doing &JTAG_TDO = &ALT_JTAG_TDO and that raised a compiled error. Please let me know how to dynamically change the port pin addressing?
ah .... one other possibility put the whole kit and kaboodle into a aubroutine using pin a. Then make a copy, rename it and change globally pin a to pin b. then it is a simple matter of if (ralph) { funca(); } else { funcb(): } Erik
My funca() is huge and making a copy to create funcb() may not fit in the internal RAM as I think it has only 8K bytes of space.
RAM??? what are you talking about, in a '51 the code is in ROM/PROM?Flash. Erik
If you mistyped and mean ROM, get a device with more, stepping up from e.g. 8k to 16 k will cost you only pennies. Erik