[sudo-discuss] multiple lamp dimming with a single arduino

Jake jake at spaz.org
Wed Aug 24 22:56:21 PDT 2016


> As long you create a new 'board' entry in the arduino boards.txt file
> showing the 20Mhz Fclock value the time based functions should work fine as
> they use the Fclock value defined in that board selection to setup the
> proper timing value for timer0. Same with the hardware serial baud rate
> calculations used in serial.begin function.

i don't get it.

are you saying, if you change the crystal from 16MHz to 20MHz you can use 
it as long as it's configured properly?  why do you need a 20MHz crystal?

the code I showed you would work using only one timer, and as many pins 
(to triacs) as you want, because instead of having the timer control the 
pin directly (which limits you to timers you configure and connect to the 
zero-crossing interrupt), you can just control the pins in the main loop.

it's crude and doesn't give you time to do much other stuff with the CPU, 
but it should be fine for receiving DMX signals and dimming 8 lamps.



More information about the sudo-discuss mailing list