1

I'm not quite sure where to post this question, but I think Stack Overflow has a lot of smart people who could help.

I'm wondering if there is a way I can combine programming and electrical circuits. Can I somehow turn my computer into a signal generator to create AC waveforms which I could apply to an external circuit that I've created? Could I then program my computer with say C++ code to change the amplitude/frequency of the waveform (hopefully this if possible doesn't require assembly language which I know nothing about expect that its code that operates more directly with the CPU or something). Basically, I'm looking for a way to combine coding with electrical circuits. Anything will do. I just want to get better at both because they both interest me.

DWade64
  • 427
  • 2
  • 4
  • 12
  • http://electronics.stackexchange.com/ is more suitable, but yes I'm sure it could be done through your sound jack. – Jim W Feb 21 '14 at 05:20
  • Indeed it possible, but you need to be more specific what hardware you have/want to use before it will become an answerable question. Even with just parallel port you can do some of that. – Alexei Levenkov Feb 21 '14 at 05:21
  • 3
    https://sites.google.com/site/hobbydebraj/home/pc-based-signal-generator has a link to code and some tips on this. – Jim W Feb 21 '14 at 05:25

1 Answers1

2

Yes, you can use your audio channel.

You have to consider its frequency response: (theoretical Maximum of 20kHz?)

You also have to buffer the audio output. Use an opamp as a buffer for that. You do not want to overload your audio jack.

You will run into challenges of how "Fast" you can send data to your audio channel. But I think it is possible.

Another way is to use a good old parallel port, IF you have one :). Those are nice to command some electronics.

Makketronix
  • 1,389
  • 1
  • 11
  • 31