Question about TCPWM: Clock input pin and Overflow output pin ?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
SaGa_4641021
Level 4
Level 4
50 questions asked 50 replies posted 100 sign-ins

Hi

1. If I use TCPWM as a edge-triggered counter, what is the Clock input used for ? I will be reading input at Count pin.

2. I connect the Overflow pin and Compare pin to LED (and in another test to cascaded TCPWM), but no output is produced on those pins.

any clue what i am doing wrong ?

i attached the project.

thanks

0 Likes
1 Solution
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello @SaGa_4641021 

1. The TCPWM component does not have an internal clock, you need to provide a clock to the component (20kHz in your project) at the edge of which the counter's count will increase or decrease based on your configuration.
I am not sure if this is what you were asking, could you please confirm the same? Or are you talking baout the count input?


2. I think the reason that you are not observing the LED to glow is that Overflow and compare outputs are active only for two cycles of clock which is a very small duration of time to observe the LED to glow.

In case you want the LED to glow continuously once the overflow/ compare condition occurs I would suggest you to generate an interrupt once this condition occurs. In the interrupt handler you can turn on the LED (in firmware).

Let me know in case of further clarifications.

Best Regards
Ekta

View solution in original post

2 Replies
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello @SaGa_4641021 

1. The TCPWM component does not have an internal clock, you need to provide a clock to the component (20kHz in your project) at the edge of which the counter's count will increase or decrease based on your configuration.
I am not sure if this is what you were asking, could you please confirm the same? Or are you talking baout the count input?


2. I think the reason that you are not observing the LED to glow is that Overflow and compare outputs are active only for two cycles of clock which is a very small duration of time to observe the LED to glow.

In case you want the LED to glow continuously once the overflow/ compare condition occurs I would suggest you to generate an interrupt once this condition occurs. In the interrupt handler you can turn on the LED (in firmware).

Let me know in case of further clarifications.

Best Regards
Ekta

SaGa_4641021
Level 4
Level 4
50 questions asked 50 replies posted 100 sign-ins

Thank you Ekta for the helpful information. I also found the PSoC 6 TRM, it had elaborate details on the module.

0 Likes