• AVR Freaks

Helpful ReplyHot!dsPIC33EP256MC506 : PTG ...

Author
karan123
Super Member
  • Total Posts : 996
  • Reward points : 0
  • Joined: 2009/02/02 11:11:21
  • Location: 0
  • Status: online
2020/05/26 10:53:28 (permalink)
0

dsPIC33EP256MC506 : PTG ...

Hi,
 
Can I use PTG for generation of 1 KHz  Square Wave without any software overhead (such as Software Timer)?
 
If Bit Set    (1) = Start Generating 1KHz
If Bit Reset (0) = Stop Generating 1KHz
 
If yes, Where I can find Demo Code.
--
Karan
#1
du00000001
Just Some Member
  • Total Posts : 3942
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: offline
Re: dsPIC33EP256MC506 : PTG ... 2020/05/26 11:48:22 (permalink) ☄ Helpfulby TS9 2020/05/30 11:24:01
4 (1)
Question 1: yes
Question 2: http://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en586398
                     Although you may have to invest a bit of work/time into the switching on/off.

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#2
karan123
Super Member
  • Total Posts : 996
  • Reward points : 0
  • Joined: 2009/02/02 11:11:21
  • Location: 0
  • Status: online
Re: dsPIC33EP256MC506 : PTG ... 2020/05/26 20:22:40 (permalink)
0
du00000001
Question 1: yesQuestion 2: http://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en586398                     Although you may have to invest a bit of work/time into the switching on/off.


Thanks for reply.. Can I use this (PTG) with external interrupt (ZCD) if
If External Interrupt Rising -> Start PTG 1KHz Square Wave
If External Interrupt Falling -> Stop PTG 1KHz
Square Wave


--
Karan
post edited by karan123 - 2020/05/26 23:45:48
#3
du00000001
Just Some Member
  • Total Posts : 3942
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: offline
Re: dsPIC33EP256MC506 : PTG ... 2020/05/27 01:39:25 (permalink)
0
These forums are not "solutions central" !
Anyway: Provided it would not be about starting/stopping the 1 kHz but about just blanking them, I wouldn't go for ZCD but for the level of the input you consider "ZCD'ing": with a bit of signal preprocessing I'd attach it to the comparator, thus suppressing the output for negative signals.

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#4
karan123
Super Member
  • Total Posts : 996
  • Reward points : 0
  • Joined: 2009/02/02 11:11:21
  • Location: 0
  • Status: online
Re: dsPIC33EP256MC506 : PTG ... 2020/05/27 02:35:01 (permalink)
0
du00000001
These forums are not "solutions central" !
Anyway: Provided it would not be about starting/stopping the 1 kHz but about just blanking them, I wouldn't go for ZCD but for the level of the input you consider "ZCD'ing": with a bit of signal preprocessing I'd attach it to the comparator, thus suppressing the output for negative signals.



OK.. Leave it..Thanks...
#5
Jump to:
© 2020 APG vNext Commercial Version 4.5