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

Global variable for signal functions

I want to simulate an external pulse arriving to an input pin on my LPC1778 using Keil.

I have written the following code:

SIGNAL void GPIO_Test_Pulse (void)  {
 int j;

  PORT4 = 0x0;
  while (1)
  {
    PORT4 |=   (1 << 18);          // set    pin 0.18
    swatch (0.001);                //1ms
    //j= ((PORT4 >> 18) & 1);
    PORT4 &=  ~(1 << 18);          // reset  pin 0.18
    swatch (0.001);                //1ms
    //j= ((PORT4 >> 18) & 1);
  }
}


I have configured pin 18 of port 4 as an output(GPIO).
There are 2 concerns:
1. How do you add just the pin of interest to the logic analyser and not the entire PORT? Logic analysers are able to only probe global variables.If so, how do i add variable 'j' in my code to the logic analyser?
2.This pulse should be made as input to port 1 pin 1(which is configured as input GPIO).What addition code must i add to make this available as input to port 1 pin 1?

Where am i going wrong?

Thanks