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.
Then you will have to change the hardware.
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,
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
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.
It works.Thank you for your valuable suggestions.
You are always welcome!
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.
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.
I had the same problem but the link below helped me alot
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?
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.
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
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,
What is the use of
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.
//Red LED blinks for five times
Why not writing a function as
This would make your main() more readable...
ok Thanks Bob.I will refer the documents and proceed further.