hello Lads,
it seems i have an issue with using a PWM on a Tiny 45/85.
i think the main problem is an undeclared TCCR1A and B. see below.
\test ref.c: In function 'FCD_PWM0_Enable':
\MYFLOW~1\test ref.c:344: error: 'TCCR1B' undeclared (first use in this function)
\MYFLOW~1\test ref.c:344: error: (Each undeclared identifier is reported only once
\MYFLOW~1\test ref.c:344: error: for each function it appears in.)
\MYFLOW~1\test ref.c:353: error: 'TCCR1A' undeclared (first use in this function)
\MYFLOW~1\test ref.c: In function 'FCD_PWM0_Disable':
\MYFLOW~1\test ref.c:393: error: 'TCCR1A' undeclared (first use in this function)
\MYFLOW~1\test ref.c: In function 'FCD_PWM0_ChangePeriod':
\MYFLOW~1\test ref.c:450: error: 'TCCR1B' undeclared (first use in this function)
i don't have it with the ATTiny26.
i have checked the two FCD files and although the [TMR0] part should be the same for all chips, they aren't.
help would be very welcom
thanks
pwm ATTiny 85
-
- Valued Contributor
- Posts: 548
- Joined: Tue Jun 26, 2007 11:23 am
- Has thanked: 6 times
- Been thanked: 44 times
- Contact:
Re: pwm ATTiny 85
Hello.
This is one of the problems that has been addressed in the V4 upgrade to Flowcode for AVR.
In the case of the PWM component the changes seem to be backward compatible, so the V4 file is attached (re-named to comply with the V3 naming convention).
This file should be copied into the components folder of your Flowcode for AVR installation. It is recommended that you backup the original file before overwriting it.
Only 1 PWM channel is declared for the ATTINYx5 family because the second channel is multiplexed with a crystal pin.
This is one of the problems that has been addressed in the V4 upgrade to Flowcode for AVR.
In the case of the PWM component the changes seem to be backward compatible, so the V4 file is attached (re-named to comply with the V3 naming convention).
This file should be copied into the components folder of your Flowcode for AVR installation. It is recommended that you backup the original file before overwriting it.
Only 1 PWM channel is declared for the ATTINYx5 family because the second channel is multiplexed with a crystal pin.