Author Topic: Output Frequency  (Read 6135 times)

Offline dlewis

  • PLUS+1 Guru
  • *****
  • Posts: 103
  • Karma: +2/-0
    • Getman Corporation
Output Frequency
« on: June 04, 2020, 01:34:08 PM »
I have a customer that would like a variable output frequency from the Plus+1.  Can this be done on a PWM pin?  I know I can change the frequency on a pin as a constant, but can I do it dynamically while the program is running?

Offline tronelec

  • PLUS+1 Developer
  • ***
  • Posts: 20
  • Karma: +0/-1
Re: Output Frequency
« Reply #1 on: June 04, 2020, 07:35:58 PM »
set a digital output and switch it with a variable timer

Offline dlewis

  • PLUS+1 Guru
  • *****
  • Posts: 103
  • Karma: +2/-0
    • Getman Corporation
Re: Output Frequency
« Reply #2 on: June 04, 2020, 08:06:36 PM »
That will work well as long as the required frequency is below the loop time of the program but not when I'm up in the 4000 Hz range.

Offline SJ Industries

  • PLUS+1 Expert
  • ****
  • Posts: 60
  • Karma: +2/-0
Re: Output Frequency
« Reply #3 on: June 04, 2020, 10:11:40 PM »
I have done it with a PWM output as an experiment. It does work, but every time the frequency is changed the output is turned off momentarily. It is not a smooth change.

Offline dlewis

  • PLUS+1 Guru
  • *****
  • Posts: 103
  • Karma: +2/-0
    • Getman Corporation
Re: Output Frequency
« Reply #4 on: June 05, 2020, 01:31:06 PM »
Thanks, that's enough to tell me what I need to know.