1 2 3 4 Previous Next 54 Replies Latest reply on Jun 27, 2016 10:17 PM by userc_40243 Go to original post
      • 30. Re: about PSoc 4 BLE(Technical Support)

        Thanks Bob. I followed your ideas .Yet when LED is ON ,voltage is 0v and when LED is OFF ,voltage is 3.3v.

           

        I want to make the LEDON voltage 3.3v and LEDOFF voltage 0v.

           

        By Joany 

        • 31. Re: about PSoc 4 BLE(Technical Support)
          JoMe_264151

          Then you will have to change the hardware.

             

           

             

          Bob

          • 32. Re: about PSoc 4 BLE(Technical Support)

            ok.Thanks Bob

               

            By Joany.

            • 33. Re: about PSoc 4 BLE(Technical Support)

              Hi Bob,

                 

              I am having CY8C4247LQI-BL483 .

                 

              What type of hardware is required for implementing LEDON  voltage as 3.3v and LEDOFF voltage as 0v?

                 

              Thanks and Regards,

                 

              From Joany

              • 34. Re: about PSoc 4 BLE(Technical Support)
                JoMe_264151

                Joany,

                   

                You have as an electronic designer two different methods to light an LED since the "D" stands for "Diode".

                   

                You may connect the cathode to ground and light the LED with a positive signal

                   

                or

                   

                you may connect the anode to Vcc and light the LED with a negative signal. This form is often taken because the signal drivers usually are able to sink more current than to source.

                   

                I cannot recommend to tamper the board, but you may use another LED together with a resistor connected to an output pin of your board to light that LED with a positive signal.

                   

                 

                   

                Bob

                • 35. Re: about PSoc 4 BLE(Technical Support)

                  Hi Bob,

                     

                  It works.Thank you for your valuable suggestions.

                     

                  By Joany.

                  • 36. Re: about PSoc 4 BLE(Technical Support)
                    JoMe_264151

                    You are always welcome!

                       

                     

                       

                    Bob

                    • 37. Re: about PSoc 4 BLE(Technical Support)

                      Hi Bob,

                         

                      I want to work with three LEDS individually by using WDT interrupt in RTC.

                         

                      But it seems to be working with one timer in RTC.

                         

                      How to select three timers in RTC and control three LEDS individually?

                         

                      I hereby attach the project and image of selecting one timer in RTC.

                         

                      Regards ,

                         

                      Joany.

                      • 38. Re: about PSoc 4 BLE(Technical Support)
                        JoMe_264151

                        When Timer ISR is set to "Automatic" you cannot get in between. Set it to "User generated" and call RTC_Update() yourself. You will need a "Global Signal Reference" set to WDT and an isr component. Furthermore you can maintain a software timer that cares for your LEDs in the interrupt handler.

                           

                         

                           

                        Bob.

                        • 39. Re: about PSoc 4 BLE(Technical Support)


                          Hello Joanyfn

                             

                          I had the same problem but the link below helped me alot

                             

                          allaboutcircuits.com/projects/how-to-communicate-with-a-custom-ble-using-an-android-app/

                             


                          cordially
                           

                          • 40. Re: about PSoc 4 BLE(Technical Support)

                            I want to know about RTC_Update().It will be good if examples are provided based on RTC_Update.

                               

                            I referred RTC_P4_WDT_Example.

                               

                            In that example

                               

                            "LED_WdtIsr_Write((uint8)~(LED_WdtIsr_Read()));" is used to toggle pin and they have updated RTC by using "RTC_Update();".                                    Can I give  different values for on delay and off delay of a pin?     If so what will be the format?                                                                  What is the function of RTC_Update?"
                            LFCLK cycle is defined as "#define LFCLK_CYCLES_PER_SECOND     (32768u)"                                                                                     Why LFCLK_CYCLES_PER_SECOND  is defined as 32768u?
                            Can I follow the same format for using WDT in RTC?                                                                                                                                      If yes ,how is it possible to control the number of cycles in LED blink?

                               

                            Regards,

                               

                            Joany.

                            • 41. Re: about PSoc 4 BLE(Technical Support)
                              JoMe_264151

                              I feel that you are thinking too complicated. You have got a PSoC, so why don't you use WDT for your RTC and another timer for controlling the internal timing which can be quite asynchronous to the WDT. In that way all your program parts are running clock independent, so your LEDs may have an on-time of 748ms and be off for 259ms if you like. An RTC is not designed to give you a time-base, but to run a calendar with a 1-second resolution. RTC gives you the weekday, the month, daylight saving etc. All this is running in background triggered by an interrupt.

                                 

                              Blinking an LED can be done with a sequence of LED toggling and  CyDelay() calls (preferably in a loop) or with your own interrupt driven combination of hard- and software.

                                 

                               

                                 

                              Bob

                                 

                               

                                 

                              Bob

                              • 42. Re: about PSoc 4 BLE(Technical Support)

                                Hi Bob,

                                   

                                I have tried by using SysTick Timer interrupt.

                                   

                                I want to know about the function of "RTC_update()" in this project.

                                   

                                What is the use of   

                                   

                                                    "CySysTickSetCallback(i, SysTickIsrHandler);"

                                   

                                         and   "RTC_SetPeriod(1u, SYSTICK_EACH_10_HZ);"?

                                   

                                Hereby I have attached the project named "TwoLEDBlink1". It works fine.

                                   

                                I want to repeat some LED process in the project.So I modified the project by using Timer counter interrupt.But the LED process didn't finish .It ended in between.Give suggestions if there is any modification  in TopDesign or in cydwr file.The modified project is named as "TwoLEDBlink2".

                                   

                                Thanks and Regards,

                                   

                                Joany.

                                • 43. Re: about PSoc 4 BLE(Technical Support)
                                  JoMe_264151

                                  What is the use of   

                                     

                                                      "CySysTickSetCallback(i, SysTickIsrHandler);"

                                     

                                  This is described in the "PSoC 4 System Reference Guide, Boot Component 5.30" which you find under Creator -> Help together with all functions regarding SysTick Timer.

                                     

                                  RTC_SetPeriod() is explained in the RTC datasheet, it defines the number of ticks it takes for a second.

                                     

                                   

                                     

                                  Your Timer gets stuck because you defined it as a one/shoot. That would require a reset signal to start again.

                                     

                                  Your variable "flag" is changed in the interrupt handler. All global variables changed in an interrupt handler must be declared as "volatile" or you get into serious trouble when optimization for compiler is changed!

                                     

                                  Wanting to learn more about LEDs? Have a look at the PrISM component (Digital->Functions) to controll brightness. Control a component's inputs by using a ControlRegister component.

                                     

                                   

                                     

                                  You use

                                     

                                              //Red LED blinks for five times
                                                for(i=1;i<=5;i++)
                                                 {               
                                                  Red_Write(0u);
                                                  CyDelay(10);
                                                  Red_Write(1u);
                                                  CyDelay(500);
                                                 }

                                     

                                  Why not writing a function as

                                     

                                  LED_RedBlink(uint8 NumberOfTimes)...

                                     

                                  This would make your main() more readable...

                                     

                                   

                                     

                                  Bob

                                  • 44. Re: about PSoc 4 BLE(Technical Support)

                                    ok Thanks Bob.I will refer the documents and proceed further.

                                       

                                    Regards,

                                       

                                    Joany