Need LFINTOSC to Gate HFINTOSC Counts on 16F684

Need LFINTOSC to Gate HFINTOSC Counts on 16F684

Postby bobledoux » Wed Dec 09, 2020 8:02 pm

Purpose: Variations in counts may be a source of true random numbers.

Past experimentation can be found here: https://sites.google.com/site/astudyofentropy/project-definition

He uses the watchdog timer (WDT) on an AVR/Arduino to gate the counts from the main clock timer. But the AVR allows the WDT overflow to generate an interrupt, not a program reset as found in the PIC.

I'm attempting to use the low frequency internal oscillator (LFINTOSC) as a gate to count the clock cycles from the high frequency internal oscillator (HFINTOSC).

The 16F684 datasheet, Figure 3.1 notes the LFINTOSC may be used as a main clock or as power up time (PWRT), as watch dog timer (WDT), or as fail-safe clock monitor (FSCM).

Is there any way to access the WDT or FSCM so as to interrupt their functions before they set their interrupts?

This project is programmed in assembler.

Thank you for the feedback.

Bob LeDoux
bobledoux
 
Posts: 1
Joined: Tue Dec 08, 2020 11:07 pm
PIC experience: Experienced Hobbyist

Re: Need LFINTOSC to Gate HFINTOSC Counts on 16F684

Postby ric » Mon Dec 21, 2020 10:19 am

Good luck, but I suspect you're not going to find anything that's not shown in "FIGURE 3-1: PIC® MCU CLOCK SOURCE BLOCK DIAGRAM"
Latest test project, an LED matrix display made from one reel of addressable LEDs. here
User avatar
ric
Verified identity
 
Posts: 659
Joined: Sat May 24, 2014 2:35 pm
Location: Melbourne, Australia
PIC experience: Professional 5+ years with MCHP products


Return to Timers

Who is online

Users browsing this forum: No registered users and 1 guest

cron