higher voltage on output pin 8 & 9 - due

Im using the following code to generate 65khz pwm at pin 8 & 9, and im getting an output voltage higher that 3.3V at these pins.....is this normal? am i doing something wrong? The board is powered via programming port and connected to my laptop.....DSO outputs are attached...

void setup()  { 
pinMode(9, OUTPUT);
pinMode(8, OUTPUT);
}
  

void loop()  { 
PWMC_ConfigureClocks(65000 *256, 0, VARIANT_MCK); 

DutyRatio_Boost=200;
analogWrite(9, DutyRatio_Boost);
DutyRatio_Buck=127;
analogWrite(8, DutyRatio_Buck);}

F0002TEK.JPG

F0003TEK.JPG

Are you connected to a circuit? Where are your test leads attached?

nope..i havent connected the outputs to any circuit, i just got the required pwm and freq. and connected the leads to an oscilloscope..?why?

Can you post a screenshot of your scope?

Marco

hi...the screen shots are already uploaded..

Ooops.... sorry I missed them...

It seems to me that the peak to peak measure function is reading the undershoot and the overshoot of the signals, even if these are not visible in the second shot and that your signals are completly normal.

Please see the last post in this thread.

undershoot overshoot

Marco

hi..

ive generated the waveform with the code in this post, and the output is directly taken from the PWM pin 9 & 8 , i cant understand why im getting spikes in the initial portion of the waveform? is this ok?? i m going to use it to drive a buck boost converter..?

read your post.................thank you!!