Reload PWM period without CPU intervention

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

cross mob
LuNo_297436
Level 3
Level 3
First solution authored 10 replies posted 10 questions asked

Hi everyone

Is it possible to reload a counter(in Timer,Counter or PWM) whith its period register via hardware?
I mean without CPU intervention.
In User Modules Datasheet i don't see a way to do that and the only evident way is Starting and Stoping via software.

Thanks in advance

0 Likes
6 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

For PSoC1 the answer is No The Load input is directly connected to the Terminal Count (TC) output for timers, counters and PWMs.

   

The situation is different when looking at the other PSoCs, there you may use additional signals to force a re-load or even use a reset-input.

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Unlike PSOC 3/4/5LP which have reset capability, the PSOC 1

   

does not. You are correct, if you stop counter/timer and write

   

period register it immeadiately updates the actual counter,

   

whereas if you do it while it is running it only updates on Tc.

   

 

   

There is just no HW hook in PSOC 1 implementation to do what

   

you want.

   

 

   

Clearly you are trying to short cycle the timer/counter, in general

   

what is drivijg the need to do that ?

   

 

   

Regards, Dana.

0 Likes
LuNo_297436
Level 3
Level 3
First solution authored 10 replies posted 10 questions asked

Thanks Dana and Bob for your quick reply.

   

Dana, I'm tryng to do some sort of "Machester" code with PWM , but I need a relatively fast 400 kbps.

   

So I'll wait for PSoC 4 Pioneer kit to try that   

   

Best Regards

   

Fernando

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

This might be of interest -

   

 

   

www.cypress.com/

   

 

   

www.element14.com/community/thread/26818/l/psoc-4-pioneer-kit-community-project091-rc-5-ir-remote-co...

   

 

   

Regards, Dana.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Take a look at this for PSOC 1 -

   

 

   

www.cypress.com/

   

 

   

Regards, Dana.

0 Likes
LuNo_297436
Level 3
Level 3
First solution authored 10 replies posted 10 questions asked

Yes Dana

   

I have tried some combinatorial logic inside PSoC1

   

Basically what i need, is a bit lasting t=2.5us with .75t high and .25t low for "1's" and .25t high and .75t low for "0's".

   

So I realized I need Counter-PWM with Compare true at the start of the cycle and with hardwired reload function.

   

I  choose PSoC1 for learning purposes

   

I'll give a try the App Note you suggest me to see if tweaking it suit my needs.

   

Thanks a lot

   

Fernando

0 Likes