This sounds like a VERY interesting tool if you like to tinker. The best part is, there's no danger of "bricking" your camera if you mess something up, since the modifications live on a memory card.
Anyway, this is a series of articles on the "Canon Hack Development Kit." The first couple of articles tell you about it and how to install it to get things like
RAW IMAGES out of your p-n-s. The project wiki says you can "Trigger exposure in response to motion,
fast enough to catch lightning." The third article gives a script to set your camera to take interval pictures (say every 10 seconds) for time lapse movies.
LinuxPlanet - Tutorials - RAW Support (and more) For Your Canon Camera With CHDK - No Risk, How To Install
Sadly my own Canon p-n-s is a little too old a model for the hack kit so I can't try it myself. But wanted to share.