0 Replies Latest reply on Dec 5, 2011 1:25 AM by manuel.julian.moron

    TWO-BITS ADC

    manuel.julian.moron

      I was performing the Two-bits-ADC exampled showed in the

         

      Understanding Swiched Capacitor Analog Blocks paper in page 8:

         

            http://www.cypress.com/?docID=2617

         

      The c code forces the ports outputs P1.0, p1.1 ( handled by means the PRT1DR register, page 149 Technical Reference Manual) after avaluate the comparator output 0 column (read with CMP_CR0 reg in page 180 -technical Reference Manual ).

         

      The issue is I compiled properly and download in the board and it don't works, so I performed the simplest code I could try:

         

       

         

      #include

         

       

         

             // part specific constants and macros

         

               

         

      #include

         

      "PSoCAPI.h" // PSoC API definitions for all User Modules

         

      void

         

      {

         

      main()

         

      TwoBit_cr3 &=

         

      0x3F; //Initialize to analog ground reference

         

       

         

      while(1){

         

      PRT3DR |=

         

      0xFF;

         

      //PRT3DR=0xFF;

         

      }

         

      }

         

      I try this way with all the ports but I can see an high level at any pin of the port 3 or whatever else port I try. I'm asigning wrong the ports? Anyone knowns what's going on? Thanks for your attention.