I am a definite newby to the AVR world, and haven't coded at all for over 10 years. It's a struggle to get back up to speed, but I am having lots of fun trying!
I've started coding around an ATtiny2313A, and already use Timer1 extensively. I was saving Timer0 what I thought was a trivial task, generating a simple waveform on one of the ports. In reading the 2313 data sheet (to the best of my current ability), it seemed to be fully featured and capable of hardware CTC with no interrupts or processor use. PB2 also appears to function as OC0A, so I thought I had my output pin.
Bascom does not seem to allow the use of Config statements such as "Compare A = Toggle" for Timer0, and I'm at a loss as to how to set up Timer0 as I need to. I'm not including much code, because I get a syntax error as soon as the "Config Timer0" line is encountered with the unsupported parameters.
What I want to do is generate a 50% duty cycle signal that can be switched between two ~1Khz frequencies. I thought it would be a snap!
Any help would be appreciated,
Ken
****************************************************************
Config Timer0 = Timer , Compare A = Toggle , Prescale = 8 , Clear Timer = 1
Error : 86 Line : 67 Invalid parameter or value [COMPARE A = TOGGLE] , etc.
[b:44881fb45e][color=red:44881fb45e](BASCOM-AVR version : 2.0.7.6 )[/b:44881fb45e][/color:44881fb45e]
↧