Forum - MCS Electronics
View previous topic :: View next topic
Author
Message
techknight Joined: 21 Apr 2008 Posts: 231
Posted: Fri May 01, 2015 3:25 pm Post subject: compare pwm error??
I updated to 2.0.7.8 again thinking I would give it a second try. Maybe I shouldnt have after the update, I ran into this error:
Unknown CONFIG Parameter. Compare PWM
On this line:
Config Timer2 = Pwm , Prescale = 1 , Compare Pwm = Clear Down
Using an ATmega1284.
Any thoughts??
(BASCOM-AVR version : 2.0.7.8 )
Back to top
i.dobson Joined: 05 Jan 2006 Posts: 1570 Location: Basel, Switzerland
Posted: Fri May 01, 2015 3:41 pm Post subject:
Hi,
Try :-
Config Timer2 = Pwm , Prescale = 128 , Compare A Pwm = Clear Down, Compare B Pwm = Clear Down
Pwm2a = 0
Many AVR's have 2 pwm outputs per timer, so you need to tell Bascom which PWM Output you want to use (A or B)
Regards
Ian Dobson _________________ Walking on water and writing software to specification is easy if they're frozen.
Back to top
albertsm Joined: 09 Apr 2004 Posts: 5913 Location: Holland
Posted: Fri May 01, 2015 3:55 pm Post subject:
exact, and while add it, replace the space with underscores :, like : Compare_A_Pwm _________________ Mark
Back to top
techknight Joined: 21 Apr 2008 Posts: 231
Posted: Fri May 01, 2015 10:30 pm Post subject:
That worked. I guess on newer versions, your tightening the use of sloppy coding?
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum