12 Replies Latest reply on Dec 5, 2016 1:53 PM by JoMe_264151

# Timer interrupt for seven segment

i want to set 8-digit seven segment display in Timer Interrrupt.

iteration time for every interrupt is 6 ms.

i done this in psoc-1 in past.its working fine there.

so i want to make it same on psoc-4 but when i set same setting on psoc-4 then its not working correctly.

can you tell me is that psoc-1 and psoc-4 Timer configuration are different??

• ###### 1. Re: Timer interrupt for seven segment

There is no general difference, timer is timer. On the PSoC4 side you will need to clear the interrupt in your handler. Post your Project and let us have a look at.

Bob

• ###### 2. Re: Timer interrupt for seven segment

Here is my project. I share only seven segment part of my project.

tell me where i am wrong??

• ###### 3. Re: Timer interrupt for seven segment

My calculation comes to 33µs period .

I would suggest to use a frequency of 100 * Number of digits which is something like 800Hz.

So a clock of 1.5 MHz / x = 800;  x = 1500000/800 = 1875000 which will not fit into a TCPWM's period register.

use 160kHz clock and a period of 200 to get your interrupt.

Bob

• ###### 4. Re: Timer interrupt for seven segment

Thanks bob for help.

i have one more doubt on psoc-4 why its happening i cant understand

Case 1:

i made led blinking program which is work perfectly on both 5V and not work on  3.3V until i give power on pin 33.

case 2:

when i made led +push button program then it is not work on 5V and not work on  3.3V until i give power on pin 33.

Here i attached both program.

can you tell me where i made mistake.

is that i did any mistake from hardware side or software??

• ###### 5. Re: Timer interrupt for seven segment

This is another program...

• ###### 6. Re: Timer interrupt for seven segment

Pin 33 is the power supply for the digital pins. You will always need to supply that pin with a valid power level.

Bob

• ###### 7. Re: Timer interrupt for seven segment

okay bob.

but can you tell me valid means how much level of voltage??

can i give same as psoc-4 like 3.3 V or 5V??

• ###### 8. Re: Timer interrupt for seven segment

In Creator Workspace Explorer select the Datasheet tab and open the PSoC 4200 family datasheet. Search for "Vddd" to get the relevant parts. VDDA must be the highest voltage and be <= VDD. VDDD can be as low as 1.8V and must not exceed VDDA or VDD. See the bypass caps section in the datasheet.

Bob

• ###### 9. Re: Timer interrupt for seven segment

Okay Thanks bob.

i Found the problem in my 8 digit seven display. i declared two interrupt there with two TCPWM component. one for display and another for 4 key check whether any key pressed or not??

i set display on highest priority and key on second priority.

now only display interrupt working perfect and key interrupt is not call even single time.

what is problem in this case??? can you suggest me??

• ###### 10. Re: Timer interrupt for seven segment

Bob

• ###### 11. Re: Timer interrupt for seven segment
Can you tell me your email id?? i will share on it. i cant share my whole project code here.
• ###### 12. Re: Timer interrupt for seven segment

use briefe at jmeiersoftware dot de

Bob