18M2 / setfreq issue?

Dave E

Senior Member
Just received my first 18M2 chips! :p
Got a robotic car just waiting for it's new brain to arrive.


One of the new commands I have been wanting to look at is the PWMDIV64 command, so I set the chip up with an oscilloscope and started looking at all of the posible combinations of SETFREQ and PWMDIV.

Everything worked as expected until I changed chip frequency from M2 to M1. Instead of seeing the PWM frequency reduce by a factor of 2, there was a reduction of 4.

Also, changing the chip's frequency from 500KHz (SETFREQ K500) to 250KHz (SETFREQ K250), the frequency of the PWM output changed by a factor of 8 instead on a factor of 2.

Both of these issues occured with PWMDIV4, 16 and 64.

18M2 firmware 2.A, PE 5.3.1

I tested this on 2 different chips with the same results.

Dave E

P.S.
Have not tried to POKE registers to get frequency changes. Not sure if the registers to POKE are the same as the other chips.
 
Last edited:
Top