PSoC5LP Digital Multiplexer control without using digital pins?

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

cross mob
IsBe_4812011
Level 1
Level 1
5 likes given First like given Welcome!

I am trying to use the PSoC5LP to measure 12 flowmeter signals, which are essentially pulse frequency modulated signals. To do this, I initially tried to use a UDB counter for each signal using the setup shown in CE95350 [EDITED: https://www.cypress.com/file/144696/download ]. However, I found that I was unable to pack the digital design into the 24 UDBs (12 counters + 1 shared PWM), so instead I am splitting the signals into 3 groups and using digital multiplexers to sample them. My question is: how can I control the multiplexer without exposing pins? My current hack is to define a width=2 set of pins and then controlling them using Pin_Write(). I think this comes down to not understanding how to use bus signals from other PSoC components, but I just want to set it up so the multiplexers cycle through the signals at some frequency.

Thanks

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

IsBe,

Here's another project with a 12 input frequency counter that doesn't use a mux. It uses about 62% of the UDBs for the PSoC5.

The clock frequency measurement is from 4 Hz to 996 Hz.  The frequency resolution is +/- 2Hz.

This project is only HW in the TopDesign.  The SW has not been created.

You need to create 12 ISRs.  One ISR for each rising edge of the sync'd input.  In the ISR you need to read the Status Register for that input and substract it from the previously read value.  The count diff(erence) is compared to a frequency chart I list in the page "Counter_Diff_Chart".

Since the 7-bit (plus Toggle FF) is continuously running, if the subtraction comes up negative you need to account for the 8-bit counter wrap-around effect.

Len

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

23 Replies