2003-04-07 08:29 PM
2003-04-03 11:03 PM
To generate output compare interrupts, you just need to configure the TimerB registers and reset the interrupt mask: your init code seems OK. The problem is somewhere else...a wrong placement of the hardware registers, and nothing can work! So please check once again your batch file/hardware registers declaration/.... -> you can check as well the .map file generated by the compiler to see if all the hardware registers/IT vectors are well placed.
Rgds Florent2003-04-03 11:37 PM
2003-04-04 12:06 AM
Allo Ampel...
Send me by EMail your complete workspace (zip file!) and I'll return you the corrected version. Rgds Florent2003-04-07 03:08 AM
Hello Ampel,
There is no single bit which will enable all the interrupts. So, if you have a main() with only a ''rim'' instruction, no interrupt will be enabled. The interrupt correspoding to each peripheral is enabled by a bit in one of the control registers of the peripheral(like OCIE bit in case of timer output compare). In case you were checking for the timer interrupt on the output compare pin, you need to enable the pin output function by setting the OC1E/OC2E bit in CR2. Hope this helps! [ This message was edited by: dasg on 07-04-2003 15:39 ]2003-04-07 06:35 PM
Hello Ampel,
There is no single bit which will enable all the interrupts. So, if you have a main() with only a ''rim'' instruction, no interrupt will be enabled. The interrupt correspoding to each peripheral is enabled by a bit in one of the control registers of the peripheral(like OCIE bit in case of timer output compare). In case you were checking for the timer interrupt on the output compare pin, you need to enable the pin output function by setting the OC1E/OC2E bit in CR2. Hope this helps!2003-04-07 08:20 PM
Hello dasg.
Thanks. The TimerB is responsible for the timing of the OS. So I do not need an output pin for timerB (timerA, too). regards, Ampel PS: Hello Florent. I tried to send an email to you, but without success.2003-04-07 08:29 PM
Hi Ampel,
To contact me, click on my name in the members section, and then click on 'sent a private message'....That should work; if not, and if needed, I'll give you my EMAil adress... Cheers! Florent