Square wave Monitoring

Content originally posted in LPCWare by kalevikrant on Thu May 22 10:00:50 MST 2014 I have designed small project for monitoring Square wave input from 2 External device. I have connected 1st device as input to one port. Similarly square coming from second device goes to another port. Need to write program for monitoring input from both the source, and give alarm on any port ,if any one signal gets discontinued. Can any one help me in developing coding to accomplish this task

Content originally posted in LPCWare by wmues on Fri May 23 00:34:23 MST 2014Configure these 2 Ports to generate interrupts on rising or falling edge.In your interrupt function, use 2 timers, one for each port. If a port has a rising edge, (re)start the corresponding timer.In normal operation, the timer does not overflow, because it is restarted by the next rising edge.Configure the timers to rise an interrupt on overflow.If your overflow interrupt function is called, trigger the alarm.

Content originally posted in LPCWare by mc on Fri May 23 12:37:00 MST 2014Hi Kalevikrant,As suggested by starblue you can use SCTimer block to measure and monitor input signal frequency as well as On/Off time of the waveform . Please have look at SCtimer/PWM cookbook example SCT_pwm_decode and SCT_rc5_receive. Cookbook is available at