8 Replies Latest reply on May 21, 2015 4:01 PM by userc_39867

    Latching problem

      hi, can we provide latching through the firmware? How can we do that? 

        • 1. Re: Latching problem

          What do you mean by latching ?




          1) Single bit capture ?       Toggle or D F-F in logic part of digital component catalog







          2) Register wide latch        Control Register in register part of digital component catalog







          3) Lookup Table                   In logic part of digital component catalog







          Regards, Dana.

          • 2. Re: Latching problem

             latch is like when switch is pressed and released once then the fuctions will continue for ever untill the next signal is received. just like latching and holding circuit. 

            • 3. Re: Latching problem

              A mechanical switch needs to be debounced, so this combination


              should effect a latching -








              http://www.cypress.com/?rID=40974     AN60024 - PSoC® 3, PSoC 4, PSoC 5LP Switch Debouncer and Glitch Filter














              If you need a full HW approach use the debouncer with a LUT or D, basically set the D when both press and release


              occur. Clear D or LUT under SW or just gen a pulse to indicate key press/release has occured and control other HW


              with that pulse.








              Regards, Dana.

              • 4. Re: Latching problem

                 Thanks.. i will try to implement it. will check it if is working or not.

                • 5. Re: Latching problem

                   Hello Dana.. it seems there is some problem in my post " Facing problem with the timer" so i am posting my reply here.


                  I tried something which u have suggested and implemented the code and it runs.. but for only one cycle. To make it continue should i change the ISR ?


                  I have uploaded the project.. Please have a look.

                  • 7. Re: Latching problem

                    Because the Timer is in one shot mode you need to restart it with


                    Timer_Start( ) in isr.




                    As an aside normally best practice with isr's is to set a flag and exit, service


                    in main(), eg. do not call other f()'s inside isr as that results in a lot of stack


                    push and wasted MIPs and memory.




                    But adding the start in the isr if your program not suffering from performance


                    is fine.




                    Regards, Dana.

                    • 8. Re: Latching problem

                       Thanks Dana.. i will rectify myself in the respective points..