Menu

Waves

Help
2008-02-19
2013-05-30
  • Nobody/Anonymous

    Just wondering, is there any way to use a PIC to generate waves?

     
    • Nobody/Anonymous

      easy answer: nope
      hard answer: maybe, but HIGHLY unlikely

       
    • Hugh Considine

      Hugh Considine - 2008-02-22

      It depends entirely on what type of waves you want to generate.

      Square waves are easy, it's just a matter of turning a pin on and off at the desired frequency. There is a Tone command for this, but it is for generating sounds and might not be quite accurate enough for other uses. Also, it takes up quite a lot of space on the PIC, and in many cases it is better to write a simple loop consisting of a Pulseout and a Wait.

      Other waves are not quite as easy. You could connect some resistors up to several pins on the PIC, so that changing the combination of pins that are on and off changes the voltage. Another option here would be to buy a DAC chip, and let that take care of the varying voltage output.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.