This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Question about sbit definitions

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?

Parents
  • So it is mandatory to handle this in software without asking for any changes in the hardware for backward compatibility reasons.
    yeah, yeah, have heard that one before - are you management?

    1) you evidently must reprogram the uC, what hinders a reprogram of the FPGA.
    2) whatever "is mandatory to handle" you cant' make the '51 grow new instructions.
    3) you never answered "may not fit in the internal RAM" --- "RAM??? what are you talking about, in a '51 the code is in ROM/PROM?Flash."

    Erik

Reply
  • So it is mandatory to handle this in software without asking for any changes in the hardware for backward compatibility reasons.
    yeah, yeah, have heard that one before - are you management?

    1) you evidently must reprogram the uC, what hinders a reprogram of the FPGA.
    2) whatever "is mandatory to handle" you cant' make the '51 grow new instructions.
    3) you never answered "may not fit in the internal RAM" --- "RAM??? what are you talking about, in a '51 the code is in ROM/PROM?Flash."

    Erik

Children