First Microcontroller

Status
Not open for further replies.

im_in_asia_now

New Member
I'd like to know which microcontrollers would be best for AC signal generation from DC voltage supply. Also, something that would have a variety of applicatons.

I read about the BASIC Stamp today, and I was impressed by some of its applications. How do the 16F628A or 16F88 (from the newcomer sticky-post) compare to the Stamp?

I'm assuming that since microcontrollers are programmable most of them have the same applications, with limitations being: lines of code, output voltage and current, number of i/o pins. Does that pretty much cover the differences between different microcontrollers?

Also, newbie question so let's go ahead and get it over with. Like I said I'm interested in AC signal generation, not just a square wave from 0 to 5 V, but -5 to 5 V. Is it possible to program a negative output from a pin, which would enable AC signal generation?

Either way, I'd still be interested in trying either a Stamp or one of the other recommended microcontrollers.

Thanks
 
there are people (like me) who have learned to be relatively independent from model No. (number), or I/O pins.

model No. is not that relevant, as for PIC, most code can be ported among them (at least, upwards).

also I/O pins can be expanded, even on 8-pin PICs.

you can generate AC, if you decouple from system ground.
just alternate two pins, first 1/0, then 0/1.
but this is not covering your requirement to generate sinoid waveform.

for this purpose you need external D/A. I do not know maybe you could also feed it in a way that it will produce negative voltage, at least for a few mA.
for larger current you need external negative voltage potential.

simple D/A can be built just from a few resistors, if you do not require high precision. otherwise you'd have to use dedicated D/A IC, which often also can accept external supply voltage.

the D/A IC is then driven by a pattern from a lookup table.
it is not always require to calculate the sinus explicitely directly on the PIC.
 
I read about the BASIC Stamp today, and I was impressed by some of its applications. How do the 16F628A or 16F88 (from the newcomer sticky-post) compare to the Stamp?

The BASIC Stamp is an old PIC built with other components on a small PCB, it's VERY expensive, and VERY slow - because it runs interpreted BASIC.

Either of the two PIC's you mention will massively out perform a Stamp at a fraction of the cost.
 
Thansk everybody for your responses.

From what I saw in BASIC style code you could use basic math functions. Can those math functions be used to control the output? If + - / * can be used to control an output signal, then the Taylor Series representation of a sine wave could be used to simulate a sinusoidal signal between 0 and V(out).

I would prefer a mathematical, code-driven method of signal generation. Is that even possible or do I have to take a completely different approach?
 
If you want to generate a sinewave, then use a lookup table - generate the table values on your PC.
 
There is an old design by Tom Napier which explains how to generate a sine signal using DDS technique with a (horror!) 16F84A. If you manage to understand it you will learn A LOT from there. Google for it.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…