1 2 Previous Next 26 Replies Latest reply on Nov 17, 2016 10:09 AM by JoMe_264151 Go to original post
      • 15. Re: ADC

        There is a "Pins" entry in Creator 4.0 Workspace explorer. There you connect a pin from the topdesign window to a "real" pin on the chip. You are quite free to use any of them (marked in green), but take care, some are already in use. Refer to the schematic file of your kit which is already installed on your PC.





        • 16. Re: ADC

          Hi Bob,


          I was trying to configure LM35 on to the baseboard(CY8CkIT-042 BLE & CY8C4247LQI-BL483) but was unable to print the data on output.can you suggest or help for the configuration.





          • 17. Re: ADC

            Now I see where your problems are.


                     if((dataReady & ADC_SAR_Seq_1_INJ_EOC_MASK) != 0u)


            dataready is set to zero, so the above condition will never be true. You are querying the injection channel which you do not use.


            better use




            This will ensure a completed conversion of all enabled channels.


                        dataReady &= ~ADC_SAR_Seq_1_INJ_EOC_MASK;


            That's of no use


                        res = ADC_SAR_Seq_1_CountsTo_mVolts(CH0_N,result[CH0_N]);


            result[CH0_N] has never been set before, should be the result of your conversion, so you may write


                        res = ADC_SAR_Seq_1_CountsTo_mVolts(CH0_N,ADC_SAR_Seq_1_GetResult16(CH0_N));


            Now for


                    printf("temperature %d",res);


            A PSoC hasn't got an operating system, so how should the poor little chip print something and where to print it to???


            You need to


            place a UART (SCB) component on your topdesign. Rx and Tx pins must be P1_5 and P1_4.


            Start the UART and use in your program


            char Buffer[20];


            sprintf(Buffer, "temperature %d",res);




            Very important: In System view: Set the heap size to 0x0200




            Download and install a terminal emulation program as PuTTY


            In windows device manager you will see a com port that disapears when you plug off your development board. Note that port and re-plug the kit.


            Start terminal emulation with that serial com port, use the baud rate set in the UART component. Start your program.





            • 18. Re: ADC

              Thanks Bob,


              I have made change in the code but getting values so differently and its always showing as 3124 and after calculation 1526.can you please tell where i am going wrong.I have given connection in hardware as vcc of LM35 to _5V,Ao pin is connected to P3.5, and ground of lm35 is given to ground to baseboard.





              • 19. Re: ADC

                Your PSoC is set to operate at 3.3V. Change that in the system setting. Verify that the board is jumpered to operate at 5V.


                Your temperature range is +2 to 150°C as the datasheet tells, the voltage to measure (given by the formula) is in the range of 30 to 1510mV. So set the ADC as shown in the picture





                See attached corrected project.






                • 20. Re: ADC

                  Hi Bob,


                  I have gone through the codes and implemented and I am getting values which are constant always when there is connection between P3.5 is connected to the analog output of LM35 it is always reading a raw value as 2048 only when there is connection and there is no connection.Can you tell me where I have gone wrong. and the LED which is also not glowing on the baseboard.





                  • 21. Re: ADC

                    Difficult to find a bug without actual project. Please upload.





                    • 22. Re: ADC

                      Hi Bob,


                      This is the project I am working on.

                      • 23. Re: ADC

                        P3_5 is used on the Cy8CKIT-043 BLE by an I2C interface, use P3_3 instead.


                        Your Pin_LED is not connected to one of the on-board LEDs, see schematic.





                        • 24. Re: ADC

                          Thanks Bob finally its working when its connected to P3.3 its working.

                          • 25. Re: ADC

                            hello, I have a doubt .. I am working with the CY8CKIT-0420BLE  kit and the device used in my project is the CY8C4247LQI-BL483 .I am working with the ADC component and uses teraterm for recieving the commands for the ADC.


                            how do multiple pins ( say p1.4 , p3.0) serve the same functionality say uart_rx?


                            if I have connected my uart rx pin ( in the project) to p1.4 (in .cydwr) , and connect p3.0 for one ADC channel input, I assume the UART recieving will happen correctly.


                            If nothing is connected to p3.0 the teraterm works fine, but if a wire is connected between P3.0(J2) and the Gnd,and then try to read the analog channel 0(p3.0) the teraterm stops working..


                            if i repeat the same for other ADC channels, ( ADC_ch_1 at p3.1, ADC_ch_2 at p3.2) the teraterm works fine and the analog voltage is read as 0.


                            Can anyone guess what makes the teraterm stop?


                            is it because that both pins can be used as uart_rx?

                            • 26. Re: ADC

                              Welcome in the forum.


                              This is a duplicate post, please follow up here-





                              1 2 Previous Next