~gabe/flashlight-firmware/anduril2

« back to all changes in this revision

Viewing changes to tterev3/pic10f322-examples/momentary-switch.txt

  • Committer: Selene Scriven
  • Date: 2014-07-23 02:26:31 UTC
  • Revision ID: ubuntu@toykeeper.net-20140723022631-mjl3ukeb9za20lob
Added PIC10F322 C code examples from tterev3.
(one for clicky/hard switches, one for momentary/electronic switches)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
http://budgetlightforum.com/node/30556?page=1#comment-575958
 
2
 
 
3
Hi guys, Here's an adaptation of the same code that uses a momentary switch instead of power cycles to demonstrate debounce and sleep mode. With this framework you could do a lot more with length of switch presses, etc. by adding a press timer and watching the "pressed" flag. currently using 56% of flash memory and 31% of RAM