Accurate divided frequency to GPIO

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
DaHu_285096
Level 5
Level 5
10 likes received 250 replies posted 100 replies posted

I am wanting to produce a 31.25kHz accurate clock signal out of GPIO pin what can run continuously.

I will be using an external crystal on eco pins (P15.0, P15.1) which is 20ppm.

Can I simply place a clock component , set it derived from IMO and frequency to 31.25 kHz , attach to GPIO pin and get 31.25kHz with accuracy derived from the crystal?

Thanks

0 Likes
1 Solution
2 Replies
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

You can refer to the below linker:

Re: help needed - Setup external crystal on 4200-L

odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Since

31.25 kHz = 24 MHz / 3  / 256 = 24 MHz / 768

the clock source must be selected as XTAL or PLL, and divider must be set exactly  to 768.

Make sure that the XTAL is indeed operates at 24.000 +/- 0.003 MHz. Most likely it is not (needs capacitors tuning), so there is no point of using 20ppm XTAL, 100ppm will do.

/odissey1