Chris Pike

Trouble combining code for I/O and PWM (TPM1) - DEMO9S08AW60E

Discussion created by Chris Pike on Nov 29, 2007
Latest reply on Nov 30, 2007 by Brian Witzen
Hello everyone,
I've received some help here before and greatly appreciated all of it. I think this is my last question before I'll be all set.
 
I'm using a Freescale Demo board: DEMO9S08AW60E (HCS08)
 
1. Currently I have two input ports being used (PTA2, PTA4) and two output ports (PTA3,PTA5). The input ports are taking in 5V then triggering a short delay (using a basic counter). After the delay, the 5V is then outputted to the other ports (depending on which input port was activated with the initial input).
 
2. I also have a TMP1 setup to output a 100kHz signal.
 
When I setup a program for each of these separately they work fine (the PWM signal or the I/O's). I found that if I change the "overflow interrupt" in Device Initialization on the TPM1 then either the I/O's or the PWM work, but never together. If the "overflow interrupt" flag is set to "enable" then the PWM output of 100kHz works fine. If the "overflow interrupt" flag is set to "disable" then the PWM no longer outputs, but the I/O (w/delays) work fine.
Any ideas?
 
Thanks,
 
-Chris 
 
 
Added p/n to subject.


Message Edited by NLFSJ on 2007-11-29 11:55 AM

Outcomes