Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

compare pwm error??

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
techknight

Bascom Member



Joined: 21 Apr 2008
Posts: 230

usa.gif
PostPosted: Fri May 01, 2015 3:25 pm    Post subject: compare pwm error?? Reply with quote

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
View user's profile
i.dobson

Bascom Expert



Joined: 05 Jan 2006
Posts: 1532
Location: Basel, Switzerland

switzerland.gif
PostPosted: Fri May 01, 2015 3:41 pm    Post subject: Reply with quote

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

_________________
Home of AVRTimer, the Bascom timer value calculator.
http://www.planet-ian.com

Walking on water and writing software to specification is easy if they're frozen.
Back to top
View user's profile Visit poster's website
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 4918
Location: Holland

blank.gif
PostPosted: Fri May 01, 2015 3:55 pm    Post subject: Reply with quote

exact, and while add it, replace the space with underscores :, like : Compare_A_Pwm
_________________
Mark
Back to top
View user's profile Visit poster's website
techknight

Bascom Member



Joined: 21 Apr 2008
Posts: 230

usa.gif
PostPosted: Fri May 01, 2015 10:30 pm    Post subject: Reply with quote

That worked. I guess on newer versions, your tightening the use of sloppy coding?
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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