tmr2 interrupt flowcode calculator!
Posted: Wed Nov 28, 2012 5:26 am
if you want to quickly get all the prescaler,postscaler.rollover values of a desired tmr2 frequency or get all the frequencys and adjustment settings in a certain range around a desired frequency this is for you....i created this as a simulator flowchart to help pick those frequecies and settings easy, the first code block at the top of the flowchart you'll see these four lines of code in a block that you can modify
f_osc = 16000000
target = 1000
range = 0
display_delay = 2
f_osc--> type in the oscillator speed of the crystal or internal osc
target--> type in the target tmr2 frequency that your trying to hit
range--> type in the range around the desired tmr2 freq that you would like to hit, for instance if you type in 25, it will search for the target frequency and any frequency that within 25 numbers positive and 25 numbers negative of the target freq
1000 (1025 to 975)
also if you select "0" it gives you direct hits only, these are all long variables so you can use big numbers, if you exceed more than 254 readbacks it will say ">254" on the lower right side of the screen and only give you 254 readbacks
display_delay--> type in the second delay you want between the readback data numbers
here is a screen shot that tells you what your looking at[img] [/img]
tell me what you guys think?
f_osc = 16000000
target = 1000
range = 0
display_delay = 2
f_osc--> type in the oscillator speed of the crystal or internal osc
target--> type in the target tmr2 frequency that your trying to hit
range--> type in the range around the desired tmr2 freq that you would like to hit, for instance if you type in 25, it will search for the target frequency and any frequency that within 25 numbers positive and 25 numbers negative of the target freq
1000 (1025 to 975)
also if you select "0" it gives you direct hits only, these are all long variables so you can use big numbers, if you exceed more than 254 readbacks it will say ">254" on the lower right side of the screen and only give you 254 readbacks
display_delay--> type in the second delay you want between the readback data numbers
here is a screen shot that tells you what your looking at[img] [/img]
tell me what you guys think?