SETFREQ question

frank_p

Member
If I use a picaxe 08M with no resonator and put the statement :

SETFREQ m8

at the beginning of the code the picaxe should run at 8Mhz is it?

Now i want the 08M to communicate with a 28X1 picaxe using serout at 08M and serin at 28X1, if i use

SETFREQ m8

on 28X1 what resonator should I use 4Mhz or 8Mhz?

Thanks for your help.

Frank
 

BCJKiwi

Senior Member
With the form of serin or serout which includes the _4 or _8 etc the clock speed of the chip does not have to be anything in particular.

e.g

08m setfreq m8 serout N4800_8 --> 28x1 setfreq m4 serin N4800_4
or
08m setfreq m8 serout N4800_8 --> 28x1 setfreq em16 serin N4800_16

Just make sure
1. the 4800 is the same at both sides, and,
2. the _x matches the setfreq mx (or emx) for the chip the command is in.
 
Last edited:

frank_p

Member
Thanks BCJKiwi for the reply.

Just to check my understanding.

Since the 28X1 needs a resonator, i can use an 8Mhz but then use the internal clock frequency for transmitting/receiving the message.

This always confused me, m8 on 08M = m4 on 28X1!!!!

Frank
 

BCJKiwi

Senior Member
The 28X1 only needs a resonator if you want to go over 8MHz.

mx designates internally generated frequency, Emx designates Externally generated frequency - see I have an error in post above, now corrected.

Default speed on all chips (except the new X2s) is 4MHz. There are some older chips - no longer shipping - that always require a resonator.

Different frequencies affect the serial speed if you DON'T use the _x bit on the end of the serial speed designation. If you DO use the _x bit on the end of the serial speed designation then that is compiled with the correct modifiers to give the correct speed at that frequency.
However, check the commands in manual2 as some chips have limited speeds.
 
Last edited:
Top