Timer interrupt for seven segment

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
chmoc_1567941
Level 4
Level 4

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??

0 Likes
12 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes
lock attach
Attachments are accessible only for community members.
chmoc_1567941
Level 4
Level 4

Thanks bob for Reply.

   

 

   

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

   

tell me where i am wrong??

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes
lock attach
Attachments are accessible only for community members.
chmoc_1567941
Level 4
Level 4

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??

0 Likes
lock attach
Attachments are accessible only for community members.
chmoc_1567941
Level 4
Level 4

This is another program...

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

   

 

   

Bob

0 Likes
chmoc_1567941
Level 4
Level 4

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??

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes
chmoc_1567941
Level 4
Level 4

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??

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Please post actual project.

   

 

   

Bob

0 Likes
chmoc_1567941
Level 4
Level 4
        Can you tell me your email id?? i will share on it. i cant share my whole project code here.   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

use briefe at jmeiersoftware dot de

   

 

   

Bob

0 Likes