~toykeeper/flashlight-firmware/trunk

« back to all changes in this revision

Viewing changes to tterev3/pic10f322-examples/clicky-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-574783
 
2
 
 
3
Hi Matt, pastebin is blocked for me so I can't check your code, but here's an adaptation for the 10F322 that I've tested to work. only uses 33% of the code space as is. I also added in the voltage monitor to demonstrate that; it will force the mode from high to medium if battery goes below 3.0V. You can't use the input-only pin for ADC on this part, but the internal fixed voltage reference makes it possible to monitor supply voltage without using the pin.