If it got to be a problem... With the 16F72X chips, could it be a possible fix to calibrate the clock (using the osctune register) using the zero cross signal as a reference? AC line frequency is used as a timing reference in some PIC applications, but I'm not sure that our systems have the ability to sense the cycle with enough precision to really get an improvement on the baud syncing... You could also use the pin as general IO for a few bytes of data before enabling the USART and try to time a few bytes, referenced to what the time between start and stop bits ought to be? This could be made even easier if the computer plugin sent 'sync bytes' on startup, that were all 000's, so it could just time between beginning of start bit and stop bits?
Both of those ideas seem like more trouble than they're worth for designs where a crystal can be used, but when you're really using every available pin, it might be worth doing something clever to get the clock tuned and avoid having to scrap your work and move to a bigger pic?
Art
Having played with the chips without an osc i am less worried about this than i was.
yes for sure free up the osc clock pin. give us the option of running it. but atm i havnt noticed any reason to worry about it.
My 16f722 chips should arrive in about 2 days (friday i hope) so i can play with them as well as a new chip.
Setting the osctune register is surely an option (even if we run the external osc) .
At the end of the day. if we get comms errors it should only effect that timing cell, and at worst case we would loose data for 1 cell (25ms or so depending on the timing) which while not ideal it isnt a huge issue
scorpia wrote:
At the end of the day. if we get comms errors it should only effect that timing cell, and at worst case we would loose data for 1 cell (25ms or so depending on the timing) which while not ideal it isnt a huge issue
I think that if a data error occurs due to clock tolerance problems that it would be repeated quite often, and would be quite noticeable on the display.
my new pics turned up tonight.
So i will hopefully get some boards etched over the weekend. will try and add space for a "renard" size crystal.
so hopefully i will have a design (with phils approval, i dont want to steal his thunder) to post here in the next few days.
i will try some different things with the uart as well. (gonna try and break the comms)
Peter
I've updated the PCB design, although I'm not totally happy with it. Parts of it are a bit crowded, and the size has expanded to 2" x 8.3" (too long for 8" wide copper-plated board). There has been a suggestion/request to make the board a bit less elongated, and I'll think about that. In that case it would probably end up at about 4.5"x4.5", although that won't fit inside PVC tubing as nicely as the 2" wide design.
Having played with the new chips a little bit over the weekend. Everything seems to be working great. I have attached a couple of pictures, one of phils 64 channel board. that is probably not the final design as he is still playing with it.
Also i have attached a picture of my working 16 channel board. It is designed to be easy to etch at home and quick to get running. not the prettiest design but it is working.
Ignore the photoshopped resistors. when i took the photo i hadnt installed those resistors. but i have since installed the 2 resistors to run the ZC in there and its working fine. We have allowed space on these boards for the osc. but currently i havnt found a need for it. its seems to work fine without it.
All that is required to run the board is a 7.5-15v AC wall wart some external ssr's and a standard renard serial cable. it looks to vixen like a renard 16.
I just wanted to show people that things are moving along and working quite nicely.
currently the firmware is working on 4 different pics, there are no code changes required to swap pic type. just select which of the 4 different pics you are using in mplab ide and recompile.
One thing i found is that the 16f722 chip in 1 off's is about 20c more than the good old 16f688 chip used in the current renard designs, but in quantity it becomes cheaper . so you can get twice the outputs for about the same or less cost.
Peter

