English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I've got two frequencies (converted to a digital signal with a schmitt trigger), however, I need to measure them, preferably using a PICmicro, compare them and output the difference on a multiplexed 7 Segment Display.

2007-02-07 06:22:04 · 2 answers · asked by Alexander M 1 in Science & Mathematics Engineering

2 answers

The key is picking a PIC that has 2 or more CCP or ECCP inputs. Like the PIC16F74.
ECCP = Enhanced Capture Compare PWM

The output of the schmitt triggers are captured by the CCP and you can now take the timer values that are saved in the buffer (during your CCP ISR), and calculate the difference.

Using a lookup table (or const array (if using C)) you can display each 7-seg digit of the calculated DIFFERENCE using a third timer interrupt.

In the timer ISR you would
1- turn off all 7-segments and all digit outputs
2- increment digit position and output digit-enable accordingly
3- using the look-up table (or const array) described above output correct 7-seg output for the digit you are at

2007-02-07 09:09:49 · answer #1 · answered by Ware 2 · 0 0

Using a schmidt trigger, I assume you're just converting the positive part to a 1 and the negative part of the analog to a 0. Just count the zero crossings over a period of time and compare them over a fixed time..

2007-02-07 06:37:51 · answer #2 · answered by Gene 7 · 0 0

fedest.com, questions and answers