[time-nuts] How to properly characterize 32kHz oscillators manually and with a microcontroller?

Van Horn, David david.vanhorn at backcountryaccess.com
Wed Jun 29 08:36:20 EDT 2016


O M G..

So I followed the link and saw how they do it.    Wow.  They write interrupts like the DMV processes applications. I can only imagine what this looks like on the PIC, where every instruction takes 4x as many cycles.
All of that pushing and popping is PRECISELY what you need to avoid. 
Pushing any register that the ISR does not actually change is totally insane.
My average ISR is far shorter than their intro and outro code.

"C" does not cooperate easily with this, but you can declare your interrupts "naked" and write them in assembler so as to avoid this insanity.

I say this as someone who has been developing on the AVR platform for something like 20 years.   My first application was on the 8515, and they didn't even have production silicon yet. My development was done on a chip with date code "ES"  (Engineering Sample)




More information about the time-nuts mailing list