3 Replies Latest reply on Jun 1, 2017 12:16 PM by user_398677465

    Newb can't figure out enabling counters

    dave.cox

      I have an application where I need several counters to manage shifting bits out.  I have a PSOC5LP, and decided to try to create the stand alone logic there - trying to implement with just the schematic entry logic tools for starters.

         

      I've tried several different counters, both UDB and fixed, including "Counter", "Count7", "Basic Counter", and in each case have fed them a low speed clock (5-50Hz), and used the built in LED to attempt to monitor the output (P2.1). On counters with an "enable", I attached a "LOGIC HIGH" to enable, and devices with a reset a "LOGIC LOW". 

         

      Even though I can monitor the clock ticking (when set to few Hz) with the LED, the output of the counter, the TC and the Compare never change, even when using a "SYNC" element for UDB counters.  It's like there is a separate enable beyond the "Hardware only"... 

         

      This is such a basic thing, and the two examples I can find are both for different eval kits with LCDs, so they won't run. There must be a "make it go" button somewhere that I'm missing. 

         

      Thanks much

        • 1. Re: Newb can't figure out enabling counters
          user_1377889

          Without your project just a guess: Did you call the _Start() API for each counter? This will energize the underlying hardware.

             

          If you did that, can you please post your complete project so that we all can have a look at all of your settings. To do so, use
          Creator->File->Create Workspace Bundle (minimal)
          and attach the resulting file.

             

           

             

          Bob

          • 2. Re: Newb can't figure out enabling counters
            dave.cox

            Bingo! Thanks much.  I assumed that the "Enable Mode=Hardware Only" implied you didn't have to software enable it. 

               

            Thanks again for the clarification. I can move forward now... 

               

            D

            • 3. Re: Newb can't figure out enabling counters
              user_398677465

              As Bob Marlow says it always worth looking at the API's for a start() api, with any component that seems not to be working, this had me caught a number of times when I was starting out. 

                 

              I recently built a PAL video timing chain with a counter and numerous digital comparators components. Not one interrupt used which is the way I like logic to work.

                 

              Hope you enjoy schematic programming it has made life so much easier for me.