Diving into Microcontrollers?

Started by swinginguitar, April 13, 2011, 11:30:36 AM

Previous topic - Next topic

swinginguitar

Quote from: defaced on April 19, 2011, 11:39:18 AM
QuoteI'm a programmer, so code isn't a problem, I've just never done "hardware" before, so I haven't conceptualized how it works. for example, looking at a tap tempo schematic, how would you vary resistance to conrtol an lfo or delay time from code?
ADC.  Analogue to digital conversion.  On the TAPLFO chip, the control pins are configured as analog inputs and the voltage set by the potentiometer is converted to digital by the code in the chip.  This is actually described on the chip's page: http://www.electricdruid.net/index.php?page=projects.taplfo

QuoteThe chip uses the analogue inputs of the PIC for CVs. These are fed to the internal A/D convertor, which samples each input every 150uS or so and converts the voltage to an 8-bit value. In order to avoid using an external D/A convertor for the output, the chip uses the built-in PWM module. The PWM output needs passing through a lowpass filter to convert the pulses back into an analogue output.

Thanks you, dear sir!!! That's what I wanted to know...

jkokura

Quote from: egasimus on April 19, 2011, 11:13:57 AM
Quote from: jkokura on April 16, 2011, 06:53:59 PMwould Arduino or PIC be better to get into?
I'd say Arduino, definitely. As far as 8-bit uCs go, Atmel's AVR architecture is superior to PIC IMO.

Quote from: jkokura on April 16, 2011, 06:53:59 PMN-Audio type stuff
Do you perhaps mean the Bulgarian N-Audio (Nikolai Hristov)?

Yes I did mean Nikolai. My intent is not rip him off, I'm just interested in learning to do that kind of stuff for myself.

I'm getting some people who suggest Arduino, and some who suggest PIC. Maybe I need to look into both?

Jacob

derevaun

Dipping a beak into both would be a good idea. I can't honestly compare them, because with PIC I couldn't manage to get past the compiler/programmer setup stage. Arduino is pretty much plug into USB and get started. PIC has a nice range of 8bit to 32bit possibilities, while Arduino is generally 8bit only. But if you just want to sense voltages and control switches and LDRs-as-pots, Arduino will probably get you there sooner, if maybe more hackily and less software-engineering-ly.

There's also the Propeller platform. It's interesting in that the chip has 8 separate cores running at 32 bits, and it looks fairly easy to program--different syntax than the C-styled language of Arduino, way more intuitive than assembler.

swinginguitar

#23
Reviving this thread to ask a few more questions:

1) how do I select an LED and LDR for the output? Does the color/value matter?
2) what should i get for flashing the PIC? One of the PICkits, or is there just a simple (read: cheap) USB interface out there?
3) How do waveform selectors work on these? how are the waveforms generated?
4) would it be more advantageous to hook this up to a digital pot rather than the LDR?
5) what is the difference between a crystal and a crystal oscillator? I was looking at futurlec for parts, and they list a 20mhz crystal and a 20mhz crystal oscillator in the same section.