Electronics > Microcontrollers

Voltage spikes on PIC ADC PIN.

(1/7) > >>

SajjadBro:
Guys Please help me solving my problem. I have a simple setup on my bread board having PIC16f876A. I am using AN0 as ADC input and connected it to ground via 1.5k resistor. all other Pins are grounded and declared as digital input. PWM2 is activated on RC1 pin. of frequency 12KHz and duty cycle of 30%. Lm7805 is being used as regulator and 12Mhz crystal OSC is used with 27 pF caps..

Now i am having voltage spikes on pin AN0 as pwm pulses goes from high to low. Solution?

Mechatrommer:

--- Quote ---Solution?
--- End quote ---
dont use AN0 (analog ZERO)

amspire:

--- Quote from: SajjadBro on February 09, 2012, 06:17:49 am ---Guys Please help me solving my problem. I have a simple setup on my bread board having PIC16f876A. I am using AN0 as ADC input and connected it to ground via 1.5k resistor. all other Pins are grounded and declared as digital input. PWM2 is activated on RC1 pin. of frequency 12KHz and duty cycle of 30%. Lm7805 is being used as regulator and 12Mhz crystal OSC is used with 27 pF caps..

Now i am having voltage spikes on pin AN0 as pwm pulses goes from high to low. Solution?

--- End quote ---

You first have to work out if the spikes are real or not. Connect the yellow trace scope probe to circuit 0V and see if the spikes are still there. Also remove the blue trace probe completely and see if the spikes go away.

Richard.

SajjadBro:

--- Quote from: Mechatrommer on February 09, 2012, 06:36:49 am ---
--- Quote ---Solution?
--- End quote ---
dont use AN0 (analog ZERO)

--- End quote ---

Why not?

SajjadBro:

[/quote]

You first have to work out if the spikes are real or not. Connect the yellow trace scope probe to circuit 0V and see if the spikes are still there. Also remove the blue trace probe completely and see if the spikes go away.

Richard.
[/quote]

Ok i have connected the yellow channel to GND while blue channel was measuring the PWM. Still same result.
I have disconnected the blue channel(even from the scope). and Spikes changed their behavior like in a delayed manner. I am posting the Pictures and also zoomed version of single spike.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version