raichen WROTE:did you mean output from the oscillating switches uses as input to the MCU unit? and that for displaying the frequency selection? And then output from the step up circuit uses as analog input to measure amplitude of pulses? both of this then being displayed? is that right?
I dont understand what you meant by "oscillating switches" and "frequency selection"? Can you explain in simple sentences?
Yes both the frequency and pulse amplitude can be displayed on the LCD.
raichen WROTE:how about the voltage that is varied using variable resistor.. the voltage would be around 9 -80v like that? my intention is to display the voltage selection, freq and also pulse width.
That semi-variable resistor is used as a voltage divider for the ADC input. The PIC can only tolerate 5V input, so the 80V has to be scaled down by a factor of 16 so that 0-80V will appear as between 0-5V on the PIC. Inside the PIC, the 0-5V is converted to a "number" between 0-1023 by ADC (10 bit resolution). So 1023 will be corresponding to 80V. The amplitude can be calculated by dividing the "number" by 12.8 to get the actual voltage from your circuit. Which means every 12.8 counts is equivalent to 1 volt of the amplitude measured.
Your voltage selection has nothing to do with the mcu. The mcu only measures what is outputted from your circuit. As for the pulse width measurement, I have not yet come out with a solution. May be other members here can help.
I am not sure if the ADC can take AC waveform. If it cant, the 80V pulses has to be rectified before entering the voltage divider. A 5.1V zener is recommended to be placed at the input of the PIC to prevent any high voltage burning off the PIC.
BTW I am just curious whether you an engineering student or a medical student?
Allen