i have to generate 25khz digital signal. so i wrote some simple pwm generator program and assigned that pin 12 will be ouput. it is generating 25khz but the problem is that the magnitude of the signal is not 5volts rather it is 7.5 volts!! is there anything wrong with my board??? please give your valuable solution.
Wonder how you are getting 7.5V from transistors that only connect to Gnd and 5V inside the chip? Can you confirm with an oscilloscope?
How is the Arduino powered?
I'd suspect your measuring equipment. Are you perhaps using an AC scale on a multimeter?
Or using a scope in the 10x setting without a 10x probe?
Or maybe not properly referencing to the arduino GND.
Either it is being measured incorrectly (possibly it's trying to measure the PWM output as if it were AC, but it's getting confused by the square wave? ), or you've got your Arduino powered incorrectly and the chip is getting a full 7.5v, and it's a miracle that it's still working.
a AC meter uses 0.7 of mean (rms) however the shape is not sinus but square so the meanis higher resulting in higher reading. so noting wrong.
Unless, of course, it is TRMS.
Move your GND lead from Vin to GND