Thanks... The device has two door channels. Building it for myself, and then another for a friend. The wires on the magnetic switches are about a foot long. Pretty short I thought. The device will sit between the two doors on the centre column. I debated the 1M pull downs. I pull all pins down except the AN0 pin. I figured 1M was at the high end, but I did not want to go as low as 10K. I could have gone 100K or there abouts, but I was really pushing for long battery life. In the end, I guess I get 4 years of continuous use out of two 3000mAh Lithium cells, and because of the nice discharge curve, the power will be there till the end. I could change out the 1M resistors easily, but, they seem to be working, unless they are not, of course. My problem is that the circuit board is home-made. I believe it to be of high quality and I did a full board test before I soldered anything on. There were no bridged traces, and, after soldering on everything, I had one bridged trace which I was able to resolve... It is possible that there is another bridged trace, but I can't find it, and I have looked hard. Also, because I don't have a solder mask, I have 'brushed' the board with epoxy to protect the exposed copper. Changing things now will be a little messy, but possible. I was sort of thinking that I could enter the project in to Jason's PCB contest to get free PCB's.... but I may just go through sparkfun too. But, first it has to work. As for the antenna, I am using an RP-SMA mounted antenna, and it has 4 ground 'pins'. That's why it has the 4 legs. The receiver is already designed, built, soldered too. It all works quite well, when it works. I have been doing this one for a few months now, it is really frustrating to only find the problem now... Rolf Michael Hagen wrote: > Nice project Rolf! > > If you have long wires going to your door sensor magnets, I would suggest > lowering the 1M to ground to 10K and bypassing them with caps. You have > quite an "antenna system" there. In fact I would use a dual opto-isolator > on those inputs. I did that on quite a few projects in a factory > environment. > I know you are on batteries, but isolating those wires from rf interference > is necessary. Besides radio RF there are other things in the garage, tools, > washer, dryer, and the garage door motors themselves. All could cause > problems. > Maybe you could use a counter hooked to your sleep interrupt to extend data > transmission to a few minutes to save power too? > > My Ham radio here caused the neighbors solar circulation system to start > when I went on 40 and 20 M! > They were really mad at me when they figured it out. > The wires were just right, about 33ft long! Several 0.1uf caps saved the > day. > > What do you have figured out for a receiver? Is it done yet? > > Now if I could just shut the doors from inside the house with this system? > Oh...another project! > > Good Luck, > > Mike > > ----- Original Message ----- > From: "Rolf" > To: "Microcontroller discussion list - Public." > Sent: Sunday, June 29, 2008 10:16 AM > Subject: Re: [PIC] Strange PIC12F675 or user problem... pin cross-connect? > > > >> Hmmm... >> >> I found a bug in the code. I was not ensuring I was in memory bank 0 in >> the ISR. This could have caused all sorts of problems, I guess, but, >> could it have caused this one? The only SFR's that the ISR modifies are >> GPIO, and TMR0 which in turn, if I was in the wrong bank, would have >> modified TRISIO, and the OPTION register. >> >> I guess the combination of those two registers could do some pretty >> weird things to the code, but, changes to the prescalar or TMR0 clock >> source would have been very obvious, and changes to the TRISIO would >> also have been noticed.... I think. >> >> Anyway, I have fixed the code, but now have to wait (forever) to see if >> it breaks again..... >> >> Still looking for advice. >> >> Rolf >> >> Rolf wrote: >> >>> Two additional items of information: >>> >>> To 'fix' the circuit, I disconnect the battery and wait a while before >>> re-connecting it. >>> >>> I can unplug the magnetic switch entirely leaving the circuit open and >>> it is still 'broken'. Also, one test showed that when working fine, >>> with the switch disconnected, it still later 'broke'. >>> >>> Thanks again >>> >>> I can supply the source code too... actually, it is attached. >>> >>> Rolf >>> >>> Rolf wrote: >>> >>>> Hi all. >>>> >>>> Attached is the schematic for my current project. It is a wireless >>>> garage door monitor. It uses two magnetic switches to monitor two >>>> garage doors, and wirelessly transmits the door state and battery >>>> state to a receiver. >>>> >> [snip] >> >> >>>> Anyone have any ideas? >>>> >>>> Anyone suggest another avenue to explore? >>>> >>>> Thanks in advance >>>> >>>> Rolf >>>> >> -- >> http://www.piclist.com PIC/SX FAQ & list archive >> View/change your membership options at >> http://mailman.mit.edu/mailman/listinfo/piclist >> >> > > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist