Some months ago I had great success running the PICAXE
28X2 (PIC18F25K22, Firmware B.3) at
64Mhz via
setfreq em64 and the trusty 3-Pin 16Mhz external resonator from TechSupplies. It does indeed give things an amazing speed boost!
Unfortunately when I re-compiled my BASIC program using Version 5.4.3 of the PICAXE Programming Editor somthing strange has happened. The em64 mode no longer kicks in and it defaults back to the internal 8Mhz clock. To test that this was indeed what was happening I wrote a simple test program to flash an LED, and used some nested loops to burn time in roughly 1 second intervals (at 8Mhz). Switching between m8 and em64 no longer speeds up the program, which is strange. I rebuilt a test circuit with just the 28X2, resonator, the usual pullup/pulldown resistors and an LED and
setfreq em64 still does not give a speed boost.
#picaxe 28X2
#no_data
#no_table
; Normal speed (1 second between LED flashes)
;setfreq m8
; Uber speed (1/8th of a second LED strobe!)
setfreq em64
do
; LED on
high C.7
for b1= 0 to 4
for b0 = 0 to 200
; Burn about 1 second
next
next
; LED Off
low C.7
for b1= 0 to 4
for b0 = 0 to 200
; Burn about 1 second
next
next
loop
This is very strange as everything was working just fine before and chips programmed with an older editor continue to run at 64Mhz when placed in the very same test circuits.
Although I am very much out of my depth when it comes to using pokesft I have tried to simulate a call to setfreq by attempting this little trick:
SETFREQ_EM64:
pokesfr 0xD3, 0x70
pokesfr 0x9B, 0x40
return
I did not expect it to work, and indeed it didn't
I've tried using my old 28X2 chips and a new batch I ordered last week. They all have the same markings and firmware version.
The test circuit was just a 1K pulldown on the programming pin, 4.7K pullup on the Reset pin, One 16Mhz resonator (sharing Ground as on would expect), and a LED+Resistor to flash signals.
So... does anyone know why I can't get em64 to work any more?, I am sure it used to work just fine and I was having such good fun.