Hey Butch - good to see ya starting on the programming - stuffs almost as addictive as the cams !!
Was just looking over the 12F629 data sheet and it looks like it has lots of functions like comparators, A/D inputs, and such.
There will be a bunch of registers like INTCON and OPTION_REG that are pre-set by PBP - you'll sometimes need to set them up manually in order to make sure all your pins are functioning as digital In/Outs, etc (unless you want the analog stuff).
Caused some headaches for me on the 16F628's until I figgured it out (Brian helped out a lot!).
Don't know what the PBP presets are for the 12F629.
You might want to use the GPIO.2 'external interrupt' pin as your sensor input and assign weak pullups and trigger on falling edge (see INTCON and OPTION registers in data sheet).
I think the "ON INTERRUPT" command could then be used while you put the chip to sleep (not sure on the '629).
Arch




Bookmarks