Search found 4 matches
- Wed Jul 16, 2014 9:27 am
- Forum: Geiger Counter
- Topic: smaller firmware patch
- Replies: 6
- Views: 25345
Re: smaller firmware patch
Random number generation. I run a jumper from TP1 (actually from the lower leg of R3 b/c that is even easier to grab) to the center pin on the PULSE connector (which I don't otherwise use). That feeds the GM pulse into the ICP pin, where I use it to capture the timestamp of the pulse accurately usin...
- Wed Jul 09, 2014 8:03 am
- Forum: Geiger Counter
- Topic: smaller firmware patch
- Replies: 6
- Views: 25345
Re: smaller firmware patch
BTW another 10 bytes of flash space are saved by changing the increment of count [already improved above] to avoid a direct comparison with UINT16_MAX. Instead you increment and skip storing the result if it is zero: --- geiger.c (revision 16) +++ geiger.c (working copy) @@ -112,9 +112,8 @@ ISR(INT0...
- Mon Jun 30, 2014 10:38 pm
- Forum: Geiger Counter
- Topic: smaller firmware patch
- Replies: 6
- Views: 25345
Re: smaller firmware patch
'static' helps a little bit in the case of send_report() because it is called only once. So since the function static the compiler knows no outside object file could reference it, and therefore the compiler can inline the function and eliminate the call and any setup/teardown which was needed. Howev...
- Mon Jun 30, 2014 4:55 pm
- Forum: Geiger Counter
- Topic: smaller firmware patch
- Replies: 6
- Views: 25345
smaller firmware patch
I found I needed a little more code space than was available in the Atmel for my experiments, so I looked and found places where I could make the existing code smaller without changing its functionality. If you're interested, the patch attached, when applied to 1.00 code, results in 1450 bytes of fl...