- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Everyone,
I tried to generate a sine wave using counter and DAC. But I am not getting the output. Can you please have a look on my program and help me out about the problem (s) in it?
Looking forward to your reply.
Best Regards
Awais
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Input clock is set to 200 Hz synced to BusClk. Period is set to 65535.
65535 / 200 / 60 = 5,4611666666666666666666666666667 and that's about 5 minutes.
You can have a few 1000 interrupts per second, not more, so use a clock of 24MHz and a period of 24000 (23999) to get a 1000 interrupts per second.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your counter will take ~5 minutes to increment. This is probably not what you want.
Clearing the interrupt with TC_CC_ISR_ClearPending() is not needed, but you need to clear the counter's interrupt using Counter_ReadStatusRegister()
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Bob for your reply.
5 minutes 😮 ?
I don't want this. How you find it that it's taking 5 minutes and how I can overcome this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Input clock is set to 200 Hz synced to BusClk. Period is set to 65535.
65535 / 200 / 60 = 5,4611666666666666666666666666667 and that's about 5 minutes.
You can have a few 1000 interrupts per second, not more, so use a clock of 24MHz and a period of 24000 (23999) to get a 1000 interrupts per second.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Problem Solved!
Thank you Bob 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are always welcome, even when 5 minutes late 😉
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Lol.... 🙂
Schönes Wochenende
Awais