Any new chips? More RAM? Faster Clock?

SolidWorksMagi

Senior Member
Hi,

Is it possible to program newer chips with the PICAXE Loader to have more memory for programs, a faster clock?

8K of flash RAM would be really nice for larger more complex programs like this HexBot I made;

20210717 HexBot+Maestro12 Test6

After converting the 3-color LEDs to just direct PIN high/low the program uses 4043Bytes. No room to control the gripper or the upper Pan&Tilt let alone any kind of device on the Pan&Tilt.

6K or more memory would let this robot become autonomus rather than IR remote control.
 

AllyCat

Senior Member
Hi,

Often, programs posted to the forum can be coded more efficiently to save program space and maybe run faster (because less instructions are executed). Or, the use of suitable Subroutines can save a lot of program space, although these generally will NOT improve the speed. Normally, 64 MHz (i.e. SETFREQ M64) is the maximum speed for X2 chips, but note that certain commands such as IRIN and RFIN may force the speed down to 4 MHz (at least whilst they're executing).

However, IF you can partition the program into clearly separate "Modes", for example "Walk", "Gripper", "Pan and Tilt" or "Flash LEDs", etc., then you can use the 4 "Slots" as shown by PieM, by executing the RUN and related commands, to give up to "16 kBytes of Program Space". But it's not my preferred solution because it largely prevents the use of Subroutines and Multi-Tasking methods, etc..

Cheers, Alan.
 

westaust55

Moderator
Albeit not RevEd/PICAXE warranted
(= do it at your own risk)

I have four 28X2 chips clocked at 80 MHz by using a 20 MHz external resonator since about 2015 without any failures.

hippy has posted also similar time ago that he had successfully run a chip (28X2?) at 100 MHz hence my 80 MHz is still not at the peak of speed.

I reiterate the warning that you void warranty in doing so.
 

AllyCat

Senior Member
Hi,

Just a further thought: The OP appears to be using (or planning to use) the SERVO{POS} command which (normally) can be used ONLY at SETFREQ M8 or M32 (32 MHz) with a 28X2. The Servos probably need to be switched OFF before using any other clock frequency. From the Manual/Command list:

"Effect of increased clock speed:

The servopos command will function correctly at 4 or 16MHz (8 or 32Mhz for X2 parts). No other frequency will work correctly."


The X2's optional "[preload]" constant/variable parameter might give a partial solution if "Over-Clocking" the PICaxe.

Cheers, Alan.
 

SolidWorksMagi

Senior Member
My programs are fairly compact as can be ... but I use a lot of data for talking and singing routines;

BillyBot Sings "Electronic"

Tapper Sings "I Gotta Get Me Some"

The Saga of Watt and Hu

I use a servo controller to manage up to 24 servos at a time which requires serial data from the PICAXE to the servo controller, and when there are hundreds of potential movements I run out of memory.

I also use serial data to send to stepper motor controllers that again use tons of different stepper motor speeds to play a song!
This is America Song & Musical Milk Cartons

I don't want to I2C to external memory. Since there are newer chips, I just want a new chip with more memory and maybe faster speeds a secondary bonus.
 

AllyCat

Senior Member
Hi,
....I use a lot of data for talking and singing routines;
I don't want to I2C to external memory. ... I just want a new chip with more memory and maybe faster speeds a secondary bonus.
What type of memory? Program, EEPROM, TABLE, RAM, Register or Scratchpad? I suspect that the vast majority of PICaxe users would choose more Program and/or RAM/Registers (which might influence Rev Ed).

However, it appears that you require mainly more EEPROM, for which the use of an external I2C Serial EEPROM is a complete "No brainer". The additional Hardware (4 pins including supply and ground) consumes less board space than moving to a larger PICaxe and the PICaxe commands are very easy to use. A 24LC512 (8 pins), would probably cost no more than the extra price of a "newer" PICaxe, but give 256 times more "program-writeable" EEPROM than the present PICaxes, or about 50 times more TABLE memory than the largest PICaxe. Also, when I looked carefully at the coding, it appears that PICaxe Basic can access multiple bytes from an External I2C EEPROM FASTER than from its normal internal memory.

Cheers, Alan.
 

SolidWorksMagi

Senior Member
Hi,

What type of memory? Program, EEPROM, TABLE, RAM, Register or Scratchpad? I suspect that the vast majority of PICaxe users would choose more Program and/or RAM/Registers (which might influence Rev Ed).

However, it appears that you require mainly more EEPROM, for which the use of an external I2C Serial EEPROM is a complete "No brainer". The additional Hardware (4 pins including supply and ground) consumes less board space than moving to a larger PICaxe and the PICaxe commands are very easy to use. A 24LC512 (8 pins), would probably cost no more than the extra price of a "newer" PICaxe, but give 256 times more "program-writeable" EEPROM than the present PICaxes, or about 50 times more TABLE memory than the largest PICaxe. Also, when I looked carefully at the coding, it appears that PICaxe Basic can access multiple bytes from an External I2C EEPROM FASTER than from its normal internal memory.

Cheers, Alan.

Hi,

My tiny palm size robots do not have the space to add more hardware. That is why I want a newer chip with more program memory available.
 

papaof2

Senior Member
There is always room to add another chip - you just may have to be creative to do so ;-) An SMD FRAM chip (or similar) could be glued (or double-sided tape) to the top of the PICAXE and the I2C wiring done with 26 gauge wire soldered from pin to pin. It is POSSIBLE - it's not always EASY.
 

AllyCat

Senior Member
Hi,
My tiny palm size robots do not have the space to add more hardware. That is why I want a newer chip with more program memory available.
IMHO that is nonsense, and why do you assume the "newer" chip would be smaller? The 20M2 largely replaced the 18M2 and the DIL upgrade from the 28X2 is twice as wide and has 40 pins. The "Micromites" have 44 , 64 or 100 pins! Personally, I now design most of my PICaxe projects "The size of an AA cell", without using any SMD components, custom PCBs, or even needing to change the standard (3.5mm) programming socket to the smaller "legacy" 3-pins header. Such projects include a data logger with RTC and extra EEPROM, or a complete OLED display module.

One of the prime purposes of the I2C bus is to save space. In particular, the I2C EEPROMs have only 8 pins (i.e. one square cm in DIP) but one side is hardly used so the pins on the other side can be "straightened out" and the package mounted vertically. That takes no more PCB area than one resistor mounted horizontally, or two Rs or Cs mounted vertically. The easy way is to solder a bare wire across all the pins along the one side of the package (cutting off the excess of the pins if desired) and fold the wire across either end of the package. Then straighten the other pins and you have a 5-pin SIL package, taking no more space than a single 5-pin header.

And if you require more Program space (than the 16k Bytes of a 28X2 ! ), then you need to write more efficient Program Code using DATA constructs! Also, of course, the X2s can additionally pull multiple programs from an external I2C EEPROM.

Cheers, Alan.
 

oracacle

Senior Member
I haven't checked the PIC product line of late, but wonder if there is actually a big enough step up to make picaxe development worth while. There are other systems that what you want and more, the downside is they are not picaxe. Pjrc have some pretty awesome bits of kit but could be thought of as expensive if all your worried about is servos and programme space. As for clock speed, you should not have much of an issue unless you need very close timings. I have two 3d printers that run AT mega 2560@16mhz and can run at least 4 stepper motors, a graphical LCD and rotary encoder at the same time without issue. There are some caveats to that comparison though.

So my suspicion is streamlining your code would be a good start. There is very rarely not space for a small 8 pin on IC on board. If you need boards made as it can be hard to make for smaller SMD parts over had great results from jlcpcb.
 

Goeytex

Senior Member
And sometimes you simply run out of programming code space (and or RAM) that no amount of code streamlining will resolve. In the case where 16KB is not enough or if slots are not doable then it may be prudent to consider some other chip/platform. Picaxe is great but there are limitations.

By newer chip I think the OP was referring a possible newer offering by Rev-Ed that has more Flash and More RAM . This is not nonsense at all

Maybe a "new" Picaxe based upon modern PIC like a 28 Pin 18F27Q43 (128Kb FLASH) or a 14 Pin 18F16Q41(64KB Flash)
These are just 2 examples of modern PICs. There are others like the Q10 series and the K42 series.

However if the Flash Memory is divided into 4Kb "slots" then what would be the point? Slots would need to be eliminated to allow a single program to run in all available program memory. Slots are a pain.

But to Maji's original Question that remains unanswered. (Unless i missed it)

"Is it possible to program newer chips with the PICAXE Loader to have more memory for programs, a faster clock? "

The answer is no. The Picaxe Firmware cannot be loaded into any other chip than the specific chip it was intended for.
Any new Pixcax chip would require new firmware specific to that PIC Microcontroller.

Writing new Firmware for a new family of chips would be a major task. Not likely to happen soon AFIK.

Goey
 
Last edited:
Top