PWM Error

Moderator: Benj

Post Reply
alaahima
Posts: 6
Joined: Fri Apr 11, 2014 12:54 pm
Has thanked: 3 times
Been thanked: 2 times
Contact:

PWM Error

Post by alaahima »

Hello , I have a problem with using pwm on flowcode v5 ... When I try to compile the attached flowchart to hex ,This message appears:
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Launching the compiler...
C:\Program Files\Flowcode(AVR)\v5\Tools\MX_bats\avra.bat atmega32 "C:\DOCUME~1\GFG\Desktop\pwm for boost jinx.elf" "C:\DOCUME~1\GFG\Desktop\pwm for boost jinx.c" "C:\DOCUME~1\GFG\Desktop\pwm for boost jinx.lst"

C:\Documents and Settings\GFG\Desktop>"C:\PROGRA~1\FLOWCO~1\v5\Tools\MX_bats\..\bin\avr-gcc.exe" -mmcu=atmega32 -Os -funsigned-char -o "C:\DOCUME~1\GFG\Desktop\pwm for boost jinx.elf" "C:\DOCUME~1\GFG\Desktop\pwm for boost jinx.c" -lm
In file included from C:\Program Files\Flowcode(AVR)\v5\CAL\includes.c:227,
from C:\DOCUME~1\GFG\Desktop\pwm for boost jinx.c:316:
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c:101:5: warning: #warning "PWM Channel Uses Resource Timer 0"
In file included from C:\Program Files\Flowcode(AVR)\v5\CAL\includes.c:227,
from C:\DOCUME~1\GFG\Desktop\pwm for boost jinx.c:316:
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c: In function 'FC_CAL_PWM_Enable_Channel_1':
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c:671: error: 'COM0A0' undeclared (first use in this function)
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c:671: error: (Each undeclared identifier is reported only once
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c:671: error: for each function it appears in.)
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c:676: error: 'COM0A1' undeclared (first use in this function)
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c: In function 'FC_CAL_PWM_Disable_Channel_1':
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c:702: error: 'COM0A1' undeclared (first use in this function)
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c: In function 'FC_CAL_PWM_Set_Duty_8Bit_1':
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c:845: error: 'OCR0A' undeclared (first use in this function)
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c: In function 'FC_CAL_PWM_Set_Duty_10Bit_1':
C:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c:1121: error: 'OCR0A' undeclared (first use in this function)

Error returned from [avr-gcc.exe]
Return code = 1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks in advance for anyone willing to help ... cheers
Attachments
pwm for boost .fcf_avr
attached Flowchart
(6.5 KiB) Downloaded 323 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 Error

Post by Benj »

Hello,

Here is an updated FCD that should resolve the issue for you. Pop the file into your "C:\Program Files (x86)\Flowcode(AVR)\v5\FCD" folder and restart Flowcode and the problem should go away.
ATMEGA32.fcd
(9.97 KiB) Downloaded 379 times

alaahima
Posts: 6
Joined: Fri Apr 11, 2014 12:54 pm
Has thanked: 3 times
Been thanked: 2 times
Contact:

Re: PWM Error

Post by alaahima »

Thank you so much , I really appreciate your fast reply ... Have a great day!

Post Reply