pwm of atmega16 not compile.why? for help!thank!
E:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c 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
E:\Program Files\Flowcode(AVR)\v5\CAL\/AVR\AVR_CAL_PWM.c: In function 'FC_CAL_PWM_Set_Duty_10Bit_1':pwm of atmega16 not compile
Moderator: Benj
-
- 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
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
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
-
- 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
thank!compile!
But the simulation is not correct in proteus!
for help!
But the simulation is not correct in proteus!
for help!
- Attachments
-
- atmega16_pwm.rar
- a
- (12.35 KiB) Downloaded 503 times
-
- 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
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
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