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

Is there any facility to have pins of C167 processor made short in Keil Simulator

Hi,
Could any one of you please tell me how can i make two pins of C167 processor short. For my real time embedded application, i need to analyse my application behaviour if the pins of the processor get short. So, in Keil simulator, is there any facility to have two pins made short. I would like to know the behaviour of my application for all combinations of all pins of C167 processor.
Thanks
Regards
Srinivasa

Parents
  • That,s easy.

    First, create a debugger signal function that watches the I/O port you write to. In my example, I write to P7.0 and read from P7.7. So, I want a "wire" connected between P7.0 and P7.7. The following signal copies P7.0 to P7.7 whenever PORT7 is changed.

    signal void watch_p7 (void) {
    while (1)
      {
      wwatch(PORT7);
    
      if (PORT7 & 0x01)
        PORT7 |= 0x80;
      else
        PORT7 &= ~0x80;
      }
    }

    Second, you'll need to configure P7.0 as an
    output and P7.7 as an input.

    Have fun.

    Jon

Reply
  • That,s easy.

    First, create a debugger signal function that watches the I/O port you write to. In my example, I write to P7.0 and read from P7.7. So, I want a "wire" connected between P7.0 and P7.7. The following signal copies P7.0 to P7.7 whenever PORT7 is changed.

    signal void watch_p7 (void) {
    while (1)
      {
      wwatch(PORT7);
    
      if (PORT7 & 0x01)
        PORT7 |= 0x80;
      else
        PORT7 &= ~0x80;
      }
    }

    Second, you'll need to configure P7.0 as an
    output and P7.7 as an input.

    Have fun.

    Jon

Children