Page 1 of 1

pwm of atmega16 not compile

Posted: Sun Jun 28, 2015 12:27 am
by nnnnff
pwm of atmega16 not compile.why? for help!thank!
atmega16_pwm.fcf_avr
atmega16_pwm.fcf_avr
(6.5 KiB) Downloaded 574 times
E:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c: In function 'FC_CAL_PWM_Set_Duty_10Bit_1':
E:\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
Flowcode was unable to compile the flowchart's C code due to the following errors:
If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.
FINISHED

Re: pwm of atmega16 not compile

Posted: Sun Jun 28, 2015 1:35 am
by medelec35
Hi nnnnff,

Can you back up a copy of your original ATMEGA16.fcd
I have modified ATMEGA16.fcd for you to try.

Can you place it in your fcd folder below is the path depending on if you have a 32 or 64 bit operating system

C:\Program Files (x86)\Flowcode(AVR)\v5\FCD\

C:\Program Files\Flowcode(AVR)\v5\FCD\

You will need to restart flowcode after replacing modified file

Martin

Re: pwm of atmega16 not compile

Posted: Sun Jun 28, 2015 11:52 am
by nnnnff
thank!compile!
But the simulation is not correct in proteus!
for help!

Re: pwm of atmega16 not compile

Posted: Sun Jun 28, 2015 3:27 pm
by medelec35
Hi nnnnff ,
I can't comment about proteus as its very pricey so cant test with that.
But you need to take in account if project does not work within external simulator. then the issues could be either simulator or flowcode.
Should blame flowcode straight away.

I have just looked at your flowchart and you have got SetDutyCycle d
but you have not got anyway of setting d,
E.g analogue component.
So will only be assigned a random value.


Of course when its corrected there is still no guarantee all will work.
The only way of knowing is with actual hardware.

Martin