AXE200 Module at 32MHz

StigOfTheDump

Senior Member
Hi again

I was experimenting with my 28x2 module (firmware B.2) and the scope looking at timings for different commands. This is the old module that was on special offer in December.

I accidentally used setfreq 8 instead of setfreq m8. It seemed to go at 4 times the speed. The number was irrelevant setfreq 0 was the same as setfreq 32.

I can't find anything in the manual regarding this. It seems the maximum speed for the 28x2-5V is 8MHz internal or 32MHz external.

setfreq em16 and setfreq em32 seem to run at the same speed as setfreq 8, with the code I have posted.

It's my first time experimenting with the external resonator so I might just be mis-understanding the settings.

Code:
'setfreq m8.bas
'28x2 module firmware version B2
setfreq m8
main:
high C.1   '2200us
low C.1    '4400us	
goto main

Code:
'setfreq 8.bas
'28x2 module firmware version B2
setfreq 8
main:
high C.1   '550us
low C.1    '1100us	
goto main
Code:
'setfreq em16.bas
'28x2 module firmware version B2
setfreq em16
main:
high C.1   '550us
low C.1    '1100us	
goto main
Code:
'setfreq em32.bas
'28x2 module firmware version b2
setfreq em32
main:
high C.1   '550us
low C.1    '1100us	
goto main
Not part of any project, just curious as to the behaviours I am getting. I can see that the goto command is causing the low C.1 to be twice the length of the high C.1, but cannot figure out why the em16 and em32 are the same.

Thanks for any advice
 

Technical

Technical Support
Staff member
m8, em16, em32 etc. are simply predefined 'constants' (ie a special number) within the editor. The setfreq command uses a byte value, with different bits set to activate different speeds and functions. So incorrectly using '8' just sets bit 3 of that configuration byte, which will have a certain effect on the command. But it is not recommended!

external modes can only be 4x the external resonator (ie with an 8MHz resonator 32MHz, em32). You must use the correct value for correct behaviour, but cannot get 'bonus' additional external modes without changing the physical resonator.
 

StigOfTheDump

Senior Member
Thanks Technical

That makes sense now.

Speed is not adjustable with the external resonator. If I want to use a frequency faster than the internal resonator I need to choose an external one that is exactly 1/4 of the speed I need. I can then choose between any of the internal frequencies or 4x the external one.
 

russbow

Senior Member
but cannot get 'bonus' additional external modes without changing the physical resonator.
So what sort of frequency can it be pushed to with a different external resonator?
 

hippy

Ex-Staff (retired)
Officially 10MHz x 4 = 40MHz.

If you have an external oscillator module rather than crystal or resonator you may be able to push that further though operation isn't guaranteed. The new 28X2 can officially handle 16MHz x 4 = 64MHz, and with a 24MHz oscillator module that's 96MHz ...

http://www.picaxeforum.co.uk/showthread.php?t=17369
 
Top