i would say cycle 1-4 of each of the ssr outputs would be my preference.
so there is 1 light on each ssr at once. rather than all lights on. so 1,5,9,13 then 2,6,10,14 etc.
only needs to be for 1/2 a sec each or so, i wouldnt want to turn all channels on at once just incase.
Phil,
just looking at your curcuit that you posted a few days ago. any chance you could change the ZC pin to a different pin to free up the mclr line?
would make adding a icsp port much easier
Also i didnt notice until now that you have 4 led's on pins that are not outputs. maybe you just need to flash those as the turn on init to show that the board is running,
One of those other LEDs is a heartbeat LED, which is always blinking when the PIC is running. If the only purpose of flashing the lights was to show that the PIC is running, I think that this blinking would suffice. But perhaps you had other reasons for flashing the dimmer outputs as well.
As for moving the ZC to another pin, I prefer to keep it where it is. It hasn't interfered with the ICSP programming so far, even when I keep the ZC signal going all of the time. There is only one spare pin on the part as things stand, and I like using that pin for debug purposes.
There is another aspect which I haven't discussed yet. The design doesn't have an external oscillator, which means that the only baud rate that it supports are those that come close to evenly dividing into the nominal clock rate. So the highest standard baud rate that can be supported is 38400 (off by less than 1%). The baud rate would end up being off by about 3.5% if it was programmed for 57600, which would probably cause either data errors or framing errors. So I might end up making provisions for an external oscillator, which would result in the loss of the debug pin and moving a bunch of outputs around.
I've been reading the PICLIST archives, and most of the experienced folk there are very leery (OK, they're downright pessimistic) about using the internal RC oscillator for designs that require the UART.
i must say that after playing with the int osc for the last few days. it seems to work ok.
115k seems to be easy enough and seems to work well.
and the advantage we have doing blinky flashy is if you get a bad byte, chances are all you will get is a quick flash in the wrong place. unlike some other things where a bad byte could be a real problem
I believe there are differences in the internal oscillator on various PICs... the 16F72X series uses a 'precision internal oscillator' that's accurate to within 1% and can be tuned in program to make it even more precise if you need that...
Though I understand some of the PIC internal oscillators are much less accurate, and much more sensitive to external influence, like temperature?
Art
Im still waiting on my 16f72X chips. this could be a different story to the chips im using because they dont support the better comms divider.
im currently playing with 18f2420. probably got the same osc as the 16f72X. either way the chip passed its first overnight run @ 115k.
So long as the oscillator has a tolerance of 1% or so and the baud rate is within a fraction of one percent of what it should be, I think that we are OK. If one oscillator is 1% high and the next one in the chain is 1% low, the two differ by 1%. Over the course of a 10-bit character the sample point within a bit can thus vary by 20% of a bit-time, which should be OK if the UART is decently designed (which I more or less trust the Microchip people to do). I would worry, though, if the sample point varied by much more than 25% of a bit-time, since this doesn't leave much margin for asymmetric delays (where a rising edge has a different delay than a falliing edge, so that bits of one polarity become longer and bits of the other polarity become shorter).
Check the AC Specifications of the datasheet for guaranteed frequency vs. temp and supply voltage. Different chips have different graphs.
Personally, I was tempted to do it but was discouraged by members of the PICLIST. (However, most of them are designing for mass-market commercial devices which is not what we're doing.)
Anyway... I just wanted to point that out. It's worth reviewing before making final decisions on a design. A $1 external crystal or resonator might (or might not) be worth the cost. (At the least, you could put pads on the PCB with the intent of not needing them but having them there as a backup just in case.)
It's going to take some pin swapping to free up the clock input pin, but fortunately I just rewrote part of the code to make it easy (for me, at least) to swap output pins around.
