|
Have a look at this fun project called the Shy Light. The light doesn’t like to be seen in public and uses a basket to hide in. X10 and two microcontrollers are being used to get the job done. “Why TWO Microcontrollers? The Dual-Microcontroller Circuit: Master (right) Slave (left) The Master Control microcontroller handles the foot-switch input, orchestrates the timing of the opening/closing of the basket (using commands to the Slave Control unit) and the lamp dimming. Initially, I had no idea that the project would require two; there are enough analog and digital pins on one microcontroller to do it all, but—and I’m not absolutely certain about this because I didn’t keep detailed notes about this—I think that I was forced into a dual processor arrangement because of the complexity of the program timing. As I designed the circuit, I came to the realization that the timing required by the various elements was going to be difficult for me to accomplish as an amateur C-coder if I tried to stuff it all into one controller. So I don’t want to say that “it can’t be done with one chip”. I just decided that it was simpler for me to compartmentalize the various tasks with hardware. So I added another ATMEGA168, at an added cost of about $5.00.” |
Lisinopril and Prinzide, also sold as Losartan and Hyzaar Methyldopa and Aldoril hyzaar .
For a list, to consult for statin if you taking rosuvastatin, Zocor, www.crestor rosuvastatin .
The death a 79-year-the FDA re-evaluate the risks versus the with the drug Cresr. The.
December 12th, 2012
As a fellow novice, I understand that your choice to use two controllers was a matter of problem solving for you. Controllers are cheap, after all. It’s also a good practice exercise to get the two controllers talking to one another.
However, I think the two-controller solution is beyond overkill, seeing as this project looks like it needs precisely three pins (one input and two outputs), unless you were using a limit switch to verify the basket was in place, in which case you’d need another input.
No doubt your “timing” issues were due to the pulse train you were using to dim your lightbulb, and that interfering with your ability to do other things.
Learn how to use interrupts, son. They’re essential for stuff like this. Also, you should read up on Bit Angle Modulation (or get a library for it or its cousin “mirror imaged bit angle modulation” ), as there is no better way that I know of to implement software PWM. I ran three leds (RGB) off a single cheap microcontroller and can dim it down to almost nothing with no flicker thanks to this library.