5 Replies Latest reply on Jul 10, 2014 3:46 PM by mavec_284876

    Quadrature Decoder (TCPWM) PSoC4 not counting.



      I have a problem getting the TCPWM quadrature detector to work. it's not counting !


      I have used a quadrature detector in the past, UDB based and the app worked without any problems, only after replacing it with a more resource-smart alternative I cannot seem to make it work.


      The automatically generated API within psoc creator does look different, but I only require the Start() and readCounter() calls...


      1. the TCPWM based solution does not count, the read results always in 0... what am I doing wrong?
      2. Asuming I can make it work with other (more) API calls....Why does a simple replacement of the detector implementation
          requires me to change the API anyway.... apart from the namechange of the readCounter method (GetCounter()) it simple      
          should work, that's the promise of a good API, right?


      the attachment shows the schematic, inputs (p1[0], p1[1]) -> glitch filter (4us) -> TCPWM QD (x1, A+B=level, no interrupt)












              sprintf(uart_tx_buffer, "%d", (uint16) QuadDec_2_ReadCounter() );














      After changing back to the UDB implementation it works as expected, but consumes a lot of valuable resources on my PSoC4 (4245). I'm using latest version of PSoC creator, all updates ok etc...

      Anybody run into this issue before?  any help very welcome ! 






      // and yes it i'm using the UDB implementation the glitch filter could be moved inside... but i require glitch-free signals from A-input for other parts (not shown) of the design... ;-)