pwm of atmega16 not compile

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
nnnnff
Posts: 107
Joined: Tue Oct 04, 2011 8:55 am
Has thanked: 3 times
Been thanked: 6 times
Contact:

pwm of atmega16 not compile

Post by nnnnff »

pwm of atmega16 not compile.why? for help!thank!
atmega16_pwm.fcf_avr
atmega16_pwm.fcf_avr
(6.5 KiB) Downloaded 527 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

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: pwm of atmega16 not compile

Post 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
Attachments
ATMEGA16.fcd
(10.1 KiB) Downloaded 423 times
Martin

nnnnff
Posts: 107
Joined: Tue Oct 04, 2011 8:55 am
Has thanked: 3 times
Been thanked: 6 times
Contact:

Re: pwm of atmega16 not compile

Post by nnnnff »

thank!compile!
But the simulation is not correct in proteus!
for help!
Attachments
atmega16_pwm.rar
a
(12.35 KiB) Downloaded 503 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: pwm of atmega16 not compile

Post 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
Martin

Post Reply