PWM FLOWCODE 6.1 AVR DISPLAY ERROR

A forums to allow bugs and problems with Flowcode v6 to be reported and resolved.

Moderator: Benj

Post Reply
coffy
Posts: 24
Joined: Tue Feb 12, 2013 5:31 pm
Location: france
Been thanked: 3 times
Contact:

PWM FLOWCODE 6.1 AVR DISPLAY ERROR

Post by coffy »

hi,
display error PWM Avr ATMEGA 324P: 20 000 000 Hz clk/8 period register n=255
You forgot to divide by 2 the frequency

reading the file avr_cal_pwm.c, you choose the mode:
Phase and Frequency Correct PWM Mode
fOCnxPFCPWM = fclk_I/O/(2 ⋅ N ⋅ TOP)

F = 4.88 kHz
Period = 204.8 microseconds
can you change the display,the macro works very well.

actual measurement f = 4.88 kHz :
http://tsin.langevin-la-seyne.fr/SIN/attelle.html
thank you
BRUNO
Attachments
PWM_avr.png
(11.71 KiB) Downloaded 1603 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PWM FLOWCODE 6.1 AVR DISPLAY ERROR

Post by Benj »

Hello Bruno,

Thanks for the bug spot, I have had a go at fixing the bug and it seems to be working correctly.
cal_pwm.fcpx
(7.21 KiB) Downloaded 254 times
The file needs to be placed here before starting Flowcode "C:\Program Files (x86)\Flowcode 6\components".

Let me know how you get on.

coffy
Posts: 24
Joined: Tue Feb 12, 2013 5:31 pm
Location: france
Been thanked: 3 times
Contact:

Re: PWM FLOWCODE 6.1 AVR DISPLAY ERROR

Post by coffy »

hi,
I tested
thank you, it works very well :D :D
bruno

Post Reply