Morgan Olsson wrote: >Another idea i=B4ve had (not tested) is to have one PIC always on, runing 32kHz. This PIC also store all variables, states etc and is running a main control program. > >When this PIC decides more processing power is needed (detects a change on pin, timer overflow, keypress, A/D ready or whatever) it starts the 20MHz= pic. > >The PICs do not need to be the same. They do not have to share same lines, but a possibility is htat he 32kHz pic releases the shared lines when it let the fast PIC go. When the fast PIC starts it can fetch variables from the slow PIC using SPI, and then report the result back. > Hi Morgan, yes, essentially the same idea I dreamed up after my 1st post. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >The fast PIC may be the very cheap C505 runing on internal 4MHz clock, communicating to the slow PIC through software SPI. (and hardware SPI for speed on th eslow PIC. > >RAM data in the fast PIC RAM is preserved during reset, but have to be loaded once after power up from slow PIC. One control line, or command byte through SPI should be enugh to decide. > Possibly more useful is the fast PIC is a big powerful one, up to 20Mhz,=20 up to 40-pins. the 32Khz PIC is the main timer/monitor/controller and runs= =20 continuously with little power draw. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >Or we can flip it all around, having main control in fast pic, and the fast PIC can command the slow PIC "Please set me in reset and wake me up again if anything happens" The fast PIC RAM is retained during reset, and the slow PIC can tell the fast PIC after reset "Had a nice nap? Your RAM data is OK and hardware initialized before, so now run!" or after powerup: "This is initial power up, please read data from EEPROM and initialize hardware!" > >I think the last idea is better. Comments? > Lot's of possibilities here, depending upon the exact app. And I like=20 all of them better than the older schemes discussed/used in the past=20 - eg, 32Khz on Timer1, separate RTC, sleep/wake, external logic for=20 clock switching, etc. I really really like the PICcyBackWartPoacher idea, with a tiny PIC=20 like 12C6xx or an 18-pin'er, running at 32Khz, monitoring critical=20 I/O and A/D lines, and bringing up the big guy when needed. At 32khz, you can get both continual [albeit slow] processing and very low power draw, 15uA. Having a local net for comm/updates is good, or=20 storing/reading shared EPROM.=20 best regards, - dan michaels =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.