Keil Logo

Impulse Patterns

The following Signal Function generates a signal impulse pattern as it is typical in many embedded systems. In this case it is the input of a DTMF receiver as they are common in telecom applications.

//
// Generate Input Signal Pattern from a DTMF Receiver
//
signal void SendDtmf (unsigned char digit)  {
  if (digit == 0)  digit = 10;
  PORT2 = (PORT2 & 0x07) | (digit << 4);
  swatch (0.06);
  PORT2 |= 0x8;
}

signal void Send (void)  {
  SendDtmf (12);    // send digit 12 = '*'
  swatch (0.12);
  SendDtmf (7);     // send digit 7
  swatch (0.12);
  SendDtmf (2);     // send digit 2
  swatch (0.12);
  SendDtmf (11);    // send digit 11 = '#'
}

The above Signal Function generates the following input pattern on Port 2.

Logic Analyzer Impulse Pattern Display

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.