hi,
Am Freitag, 10. November 2006 02:14 schrieb Chuckk Hubbard:
On 11/9/06, Cesare Marilungo cesare@poeticstudios.com wrote:
I'm not an expert in electronics. But I believe that this should need a microcontroller.
You send the notes you want to play via serial port to the microcontroller, which sends a pwm signal that can be flattened with a simple rc circuit (a condenser and a resistor).
I've done this some years ago to control my Korg MS20. I've used an IC (Max232, IIRC) and the PIC 16f84a. It costed less than 5 EURO in parts.
There are plenty of ready made projects and schematics for this task (just google for it).
I have, repeatedly, and it would take me more than the time I have left in school to read everything.
I don't understand why the serial port itself couldn't send the PWM... Of course I don't understand a lot of things, but is that what you're saying?
it can not do that correctly because it is not meant to do that. if you toggle the data lines to create a pwm signal on the serial (or parallel) port, you have to depend on the timing of your machine. since you are running in a multitasking environment, you can not assure that each pwm cycle has the same length. this will cause jitter, making the output values unsteady.
you could prevent that by using a rather high-valued r/c filter, but at the same time you make the pwm output slow (since the r/c needs some time to settle to the new value).
unless you run that with a tight timing, preferably by using a interrupt, you will never get a really clean output.
I do happen to have a Max232 lying around, but I have no idea what to do with it.
the max232 is nothing more than a circuit that translates between the voltage levels of the serial port and the ttl levels used in most electronics ... it doesnt help you for timing stuff or the like ...
if you want to use pwm, you really should use a small microcontroller to get a steady and stable output. but even more i recommend to use some serial, multi channel dac's like the tlv5610 or tlv5630 (or any other dac like that). you just poke in the values in a serial fashion, once, and it holds that value, precisely, until you feed it a new value ... and it will do so on an instant. by using a simple op-amp for each output you can bring the control voltage into any range you like/need.
greets,
chris
I've asked about this numerous times here, and probably annoyed people. If it's going to be that complicated, I can't do it.
I really just want to know how the [comport] object works.
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list