7 Replies Latest reply on Mar 30, 2011 1:10 AM by gautam.das.g

    PSoC5 & CY8CKIT-001: LED stops working, from the sample code

    shawn.upton

      I did the "ADC to UART with DAC" sample example, and the LCD updates with the pot value.  My PC also reads the updates.  But the LED, which is supposed to flash, and change values, will work for a little while--then stop.  It appears that the DAC stops updating.  Or maybe it's the DMA?

         

      I am using the CY8C55 Processor Module, and the "CY8C38_main_Ex3.c" code, as found in the "CY8CKIT-001_PSoC_Development_Kit_Guide.pdf", which has "Doc. # 001-48651 Rev. C" at the footer.  I am using PSoC Creator Software 1.0, release date 1/12/2011; there's a bunch of other version stuff listed below that (in the "About" tab that is).  [I just updated all packages yesterday, so it should all be latest and greatest.]  The DMA shows version 1.50; the DAC shows v1.60; and the op-amp shows v1.60.

         

      The only modification I made to the code was to add one more pin, prior to the op-amp output, to see the raw DAC output (in case it was an op-amp issue).  Otherwise it is from the example.

         

      Not sure if it is of any consequence,  but before I updated to the latest software, I had issues with the PWM block--it would not vary duty cycle.  I have not run that example since.

         

      Shawn

        • 1. Re: PSoC5 & CY8CKIT-001: LED stops working, from the sample code
          gautam.das.g

          Hi Shawn,

             

           

             

          There are few questions which can be asked about the project.

             

          1) To which pin is the opamp's output terminal connected to? PSoC5 has 4 opamps, and there is direct connection between the output of (opamp0 and P0[1]), (opamp1 and P3[6]), (opamp2 and P0[0]), (opamp3 and P3[7]). If any of these 4 pins are chosen as output, then there would be no issue in the routing of the opamp's output.

             

          2) Is the ADC's EOC signal driving the DMA channel's drq terminal which inturn updates the VDAC?

             

          3) When probing the output of VDAC directly, is the change in the output visible?

             

           

             

          It will be helpful if you could attach the project which you are using to test the output.

             

           

             

          Regards,

             

          dasg

          • 2. Re: PSoC5 & CY8CKIT-001: LED stops working, from the sample code
            shawn.upton

            Hi Shawn,

               

             

               

            There are few questions which can be asked about the project.

               

            1) To which pin is the opamp's output terminal connected to? PSoC5 has 4 opamps, and there is direct connection between the output of (opamp0 and P0[1]), (opamp1 and P3[6]), (opamp2 and P0[0]), (opamp3 and P3[7]). If any of these 4 pins are chosen as output, then there would be no issue in the routing of the opamp's output.

               

            2) Is the ADC's EOC signal driving the DMA channel's drq terminal which inturn updates the VDAC?

               

            3) When probing the output of VDAC directly, is the change in the output visible?

               

             

               

            It will be helpful if you could attach the project which you are using to test the output.

               

             

               

            Regards,

               

            dasg

               

            Thank you for the response.

               

            1. It looks like the op-amp was connected to P1[6], as per the example (see page 126 of "CY8CKIT-001 PSOC Development Kit Guide, Doc. # 001-48651 Rev. C").

               

            2. No idea.  I did not change the code, so however it was configured in the example code ("CY8C38_main_Ex3.c") is how it was run.

               

            3. When the DAC was updating, yes, I could see the expected sinewave.  Then it would stop, and hold one constant value.  I got a copy of Windows Hyperterminal finally on this machine (Windows7 no longer comes with Hyperterminal for some reason), and I was able to determine that the UART was working properly: the code is supposed to write the ADC value to the UART in hex; and it does.  It would appear that either the DMA or the DAC stops updating.

               

            Thank you.

               

            Shawn

            • 3. Re: PSoC5 & CY8CKIT-001: LED stops working, from the sample code
              gautam.das.g

              Hi shawn,

                 

               

                 

              I tested the project which you had attached at my end on CY8CKIT-001 Development Kit.

                 

              I was able to see the LED blinking (with intensity gradually increasing and decreasing).

                 

              I continuously probed the LED output on an oscilloscope for more than 30 minutes continuously, but it never ceased to work.

                 

              I am not sure what is causing the issue at your end.

                 

              1) After what time after resetting the kit was the LED output failing?

                 

              2) Can you try resetting the DVK and then see if the LED blinking starts.

                 

              3) By varying the POT available on the DVK (connected to P0[7]), were you able to see the change in the frequency of LED blink? (Higher the Pot voltage (and hence the ADC reading), lower is the Frequency of LED blinking).

                 

              I have attached the oscilloscope snap-shots which I have taken for different pot values.

                 

              I could see Triangular waveform of approximately:

                 

              Frequency = 5 Hz when ADC = 208;

                 

              Frequency = 14Hz when ADC = 116;

                 

              Frequency = 26Hz when ADC = 2.

                 

               

                 

              Please see the attached snap-shot.

                 

               

                 

              Thanks and Regards,

                 

              dasg

              • 4. Re: PSoC5 & CY8CKIT-001: LED stops working, from the sample code
                gautam.das.g

                In this snap-shot ADC reading = 116, frequency = 14Hz

                • 5. Re: PSoC5 & CY8CKIT-001: LED stops working, from the sample code
                  gautam.das.g

                  In this snap-shot, ADC reading = 208, frequency = 5

                  • 6. Re: PSoC5 & CY8CKIT-001: LED stops working, from the sample code
                    shawn.upton

                    The LED would stop while adjusting the pot.  Randomly, I should add.  But it would run indefinately if I never touched it.  Maybe ESD?  But sometimes I could adjust it for a while, then it would quit mid-turn.

                       

                    Shawn

                    • 7. Re: PSoC5 & CY8CKIT-001: LED stops working, from the sample code
                      gautam.das.g

                      Hi Shawn,

                         

                       

                         

                      I was able to narrow down on the reason for the VDAC output to stop being updated.

                         

                      This is because the Clock connected to the DMA's drq terminal would stop. After probing it on the oscilloscope I was able to see that the clock keeps running when the VDAC generates Triangular wave, but when the Clock stops, the VDAC output too becomes flat.

                         

                      So, the reason for stopping of the clock has to be probed.

                         

                       

                         

                      Regards,

                         

                      dasg