2006-01-02 09:14 PM
Timer Output Compare Waveform Generation
2005-12-21 02:03 AM
I am trying to generate a waveform using the STR710 Timer Channel B. After a variable length of time I want the output pin to toggle, I will then in the interrupt routine set up the time period until the next ''toggle''
Sadly I can't seem to get the automatic update of the output pin to work! The interrupts are going off OK but the output pin stays stubbonly low, If I add code to update the pin in software it works but I want the time accurrate periods that should be achieved with the automatic update. Can you answer the following: Do I program the pin for its Alternate Function? must OCBE be set? what is the function of FOLVB bit? The value stored in OLVLB should be copied to the OCMPB pin (P1.6) when the Compare interrupt occurs? Thanks PhilipJ2006-01-02 09:14 PM
Hi,
I've been told by my local distributor that my error is to try and use Timer0, this is not connected to the IO pin hardware. He suggests I use a different Timer. To explain my needs more clearly, I'm trying to generate a precisley timed waveform by setting up a timer in Output Compare Mode and, when it times out, to update an IO pin with a suitable logic level. The interrupt response routine then sets up the compare register for the next time-period and sets up the flags to update the IO pin to the alternate logic level at the next timeout. I hope that makes sense? Anyway I think I can sort out getting it to work, if not, I'll be back!!! Thanks PhilipJ