![]() If you have too many MIPS, you can downsize. If you find you're running out of MIPS, consider the more advanced software solution or a faster chip. (example of what you can do look at 126 LEDs with no extra hardware). Arduino Uno would probably do the job with about 30 minutes work. I think you have to approach it as a learning exercise, start off with something simple and easy to use and see how far you get. If you pick an 8bitter sold into industrial markets it might have expensive/hard to obtain dev boards, and only expensive compiler tools. You also have to factor the support around the chip, ATmega for example has lots of cheap dev boards and software tools, because they are used in Arduino. However a software solution that uses a timer and GPIO is easy to implement on any micro. Clearly if you've got 16 PWM channels then it is probably easier to code, as long as the datasheet and/or library code (if any) is not too cryptic. Also, if you don't either stick to Atmel's range (that you can program with an Arduino with a programmer sketch loaded), or to chips with a built-in bootloader, you will need a programmer or debugger for whatever MCU you select. Here's that BAM/BCM link again: Its got C source for an ATmega8 MCU, which, with a bit of work could be ported to an ATmega328P. Even if you use a timer driven interrupt to maintain the modulation output in the background, that's only one, not excessively complex, hardware peripheral to learn. That's a lot easier for anyone with previous C programming experience to get going than having to fully understand the hardware, as outputting a word to a port is remarkably similar for most of the MCU families on the market. OTOH, if you use one of the multi-channel software modulation methods, if you have a JTAG or similar in-circuit debugger for your chosen MCU you can step through one line of code at a time, checking the outputs with a logic probe, multimeter or LED. Without an oscilloscope, or logic analyser it will also be quite difficult to debug. Without good library support you will have to learn how to set up the PWM modules and the timer(s) that drives them by direct register access, which will mean a lot of time spent studying the datasheet. ![]() Choosing to use hardware PWM depends on what library functions are available for the PWM modules (and remember that MCU vendor supplied libraries usually *SUCK*). All can be used to control the average power for a load, or low pass filtered to get an analog voltage, but if you need to control other things than a simple resistive or lighting load, they are no longer directly equivalent. PCM, BAM/BCM and PWM are rather different. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |