AnsweredAssumed Answered

Changing channel function TIM08

Question asked by Jim Burdus on Dec 26, 2011
Latest reply on Dec 27, 2011 by Jim Burdus

I wish to bit-bang a SCI receiver on a TIM08 channel in a similar way to that demonstrated in AN2502 so that I can use the other channel independently for other things. AN2502 says:


"It is possible to implement full-duplex operation because two independent

channels of the TIM are used for each of the operations with independent data





"In the interrupt service routine (ISR) for the input capture, the time for the first

received bit is set. At this point, the reception channel is configured as output

compare and used as a time base for data bit receptions."


The TIM08 reference manual and the MCU datasheet seem to rule this out:


"NOTE: Stop and reset the TIM before changing a channel function.

Before writing to the mode select bits (MSxB and MSxA), set the timer

stop and timer reset bits (TSTOP and TRST) in the TSC register."


I'd really like to reconcile these two sources before I proceed. Please let me know if you have any suggestions, ideally a datasheet or other reference that expands on the TIM08 directive.


Incidentally, I realise that bit-banging a SCI and coding for an HC08 are both a bit old-fashioned now!