JK8 Channel 0 as a timer interrupt ??

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

JK8 Channel 0 as a timer interrupt ??

1,627 Views
Deepak1
Contributor IV
Dear Sir,
 I am using MCHC908JK8CPE device & CW 6.2 ver.For jk8 device 2 timers of 16 bit are available.
but for my application i need 1 more timer by using the same device.So i want to use timer_1 channel_0 interrupts.
Please tell me how can i use this interrupt as a timer interrupt.
Regards,
Deepak.
Labels (1)
0 Kudos
4 Replies

370 Views
Ake
Contributor II
Hi,
If it is an input/output channel 0 you want to use, you can get an interrupt when counting 1 - 65535 pulses.
You can also get an interrupt for every positive of negative pulse, and in the interrupt you can read the TCH0 register to check the bit count. Note that this count is like the time of day. To get the width of the pulse, you need to subtract the old count from the new count.
 
But to give more information, I need some more information on what you want to do.
Is it an input- or output channel you want to have?
What kind of performance do you want?
Anything else that could be of interest?
 
Regards,
Ake
 
0 Kudos

370 Views
Deepak1
Contributor IV
Thanks Ake,
Here the pin no 19 is open or floating or NC.As like Timer1 or Timer2 i want to use this channel_0 as an timer interrupt.That means if i set timer1 to overflow every after 100 msec. Like this i also want to use Timer1 channel_0 interrupt to overflow every after 100usec.
If any queries plz let me know.
Regards,
Deepak,
0 Kudos

370 Views
JimB
Contributor I
I don't think there is any impediment to using a TIM module that is "not bonded" to mcu pins for producing OC interrupts, if this is what you're after.
 
Jim
0 Kudos

370 Views
bigmac
Specialist III
Hello Deepak,
 
There does appear to be some misunderstanding about the operation of the channels within the TIM module.  For output compare operation, which would appear to be what you require, overflow is not associated with the interrupt.  (This is an entirely separate event with a separate interrupt, but no associated pin).
 
I might suggest that you review the TIM module section of the datasheet for a better understanding of output compare operation.  The following thread would seem to address a similar requirement of achieving two different timing intervals.
 
The TIM module operates in a similar fashion to the TPM module referred within the thread.
 
Regards,
Mac
 
0 Kudos