Warning message

The Propeller Object Exchange system is decommissioned and replaced with a GitHub repository to house the same existing and future Propeller objects. As of 12/5/2019, this site is read-only. You can continue to browse and download objects from here for a limited time; however, please begin using the Parallax Propeller repository for future reference.
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Request group membership
By: created: 2016-04-11 | updated: 2016-04-11
-- Generates conventional PWM that increases and decreases linearly with time
-- Can be filtered to a triangle waveform
-- Uses 2 cog counters in NCO mode directed to the  same output pin, long cycle at the beat frequency
   No program loops required for basic operation, cog counters only.
-- Counters in a second cog can provide inverted output,
   and also a lower frequency square wave synchronized to the beat frequency
-- Operation can be viewed on an oscillosope, probes connected to
      pin     main output is PWM varying from 50% to 100% high at the selected frequency
      pin+1    inverse of pin, varies between 0% and 50%
      pin+2    low frequency square wave at that flip flops at the inflection points
-- The second cog is not needed unless you need the inverted signal and/or the beat frequency
   In an applicaton, the second set of cog counters can be patched into an existing cog that does not otherwise need its counter modules.
-- Also see, method to set fixed frequency and duty cycle PWM with counters.
Original File Upload
Binary Data PWM_triangle_ctrxbeat.spin1.98 KB