What can and cant be done with a picaxe...

andrewpro

New Member
I was jsut wondering what people's thoughts on this were? The picaxe is limited in alot of respects compared to a native assembler programmed pic, and other micros, but where exactly are those limits?

When I first started playing with the picaxes (I have 08's and 18x's) If igured it was jsut that...Playing around. I soon saw the error of my ways, especially with the 08's...those things are so darned useful.

Another reason I ask is that Im looking for another challenging picaxe project that's out of the norm while I wait for parts and time and money to expand my other projects (mostly the function generator...I'm gonna try to turn it into a HF amateur radio).

By "out of the norm" I mean soemthing besides IR, temp readings, robotics, etc. that there seems to be a plethora of info on the board already for.

So what's on everyones mind? Lets see where the real limits of a picaxe are. Perhaps we could all even collaborate on a project and see where it goes.

Discuss amongst yourselves ;)

 

Rickharris

Senior Member
I suspect that the very fact that limitations exist is causing people to be innovative in getting round them.

In the bad old days of limited memory and SLOW processing speed (aKA 6502 and the like) Many programmers developed very clever ways to get where they wanted to be.

Projects?

Ultra sonic radar - the display would be the difficult bit - think scanned laser display.

Some kind of game/toy parents can make for the kids

SOme kind of aid for the dissabled lots of choice here.

Something I though about the other day IR control for an indoor aircraft, Actuators, systemminmal weigh think under 3 oz.

 

hippy

Technical Support
Staff member
It's not easy to define where the limits are without specifying what is a limitation.

That there are a limited number of variables can be overcome by using SFR, external I2C RAM, program size and operating speed can be overcome by using multiple PICAXE's, a limit on the number of subroutines and subroutine depth can be overcome by clever programming, a lack of I/O or flexible I/O can be overcome by external logic and by moving up the range, and limitations in the programming language itself can be overcome as well.

Limitation is perhaps best measured in terms of when a project isn't feasible because of the difficulties of implementing it using a PICAXE solution. Trying to implement a serially controlled Compact Flash or Hard Disk Interface with a PICAXE brings up all the difficulties listed earlier but could be probably done, although few may consider it worth the effort when an alternative processor would do the job more easily and more cheaply.

I can think of a lot of things which would make a PICAXE better, and have proved to be limitations in that I've had to work round them when using a PICAXE, so in that respect ...

Slow speed of operation
Limited number of variables
Limited access to SFR
Fixed or inflexible I/O
GOSUB depth limitation
No in-built [accurate] timing functions
Limited serial baud rates
No handshaking for serial in
Limited I2C connectivity
No in-built SPI support
No block-structured programming support
 

BeanieBots

Moderator
It's also a question of "horses for courses".
Hippy's summary list just about sums it up but I would question "Fixed or inflexible I/O". Personally, I find it to be very flexible with many devices being capable of having IP & OP on the same pin. The ability to set "pins" and read back the values (peek $30) is very useful.

I have a particular interest in AI which at a first glance looks to be outside the PICAXE capability. However, when you look at cost compared to other multitasking devices, it becomes apparent that creating a neural network would be cost effective using 08Ms. So far, the only thing that has prevented me from acheiving it is the lack of floating point maths. Using a co-processor for each node would be cost prohibative and sharing one would be too slow. Maybe there is scope for something in the middle ?
 

kranenborg

Senior Member
I think that the picaxe really shines as compared to similar products if you regard power consumption; (at least the 18X and the 08M can continue to run their programs (but not be programmed) with very low current consumption at low voltages and low clock speed (For the 18X I measured approx 20 uA at 2.0V and 31.25KHz clock). Added with the intelligence/communication facilities (and the fact that they may recover at high speeds when more power becomes available again) this opens up a large area of applications that push the picaxe to its (power) limits. For example energy scavenging methods in combination with sensor networks, and robots/sensors that wake up after sleep in low-power conditions

Some links for inspiration:

http://engnet.anu.edu.au/DEpeople/Shad.Roundy/
http://energyscavenging.anu.edu.au/

Regards,
Jurjen
http://www.kranenborg.org/ee/picaxe
 

hippy

Technical Support
Staff member
The PICAXE does indeed have many things going for it which offset and even outweigh the limitations, and it mustn't be forgetten that the PICAXE was designed for a particular target market for which it appears to be perfectly suited.

Regarding my comment on the lack of flexible I/O - I generally use the 18 series, 5 inputs and 8 outputs, but if I need an extra input, even with many spare outputs, I have to go up to a 28 series, likewise if I need to use any bi-directional I/O and need more pins than an 08/M has. Again, that limitation can be overcome and it is perhaps a criticism primarily applicable to the 18 series.
 

Jeremy Leach

Senior Member
regarding "So what's on everyones mind?/playing around..."

I'll throw this in ...

What seems to inspire me is the fact that an 08M is a low cost entity with computational power and the ability to communicate. I can't help thinking these ingredients offer interesting possibilities in creating 08M based 'cells', having a collection of cells and seeing how they react together. I can imagine each cell having an LED and seeing wierd 'waves' of patterns sweeping across the network. Could also see some sort of evolving behaviour. I don't really have anything specific in mind but I've just got this gut feeling it could throw up some fascinating ideas and maybe actually something useful !
 

hippy

Technical Support
Staff member
Check out "Cellular Automata" and "Conway's Game of Life"

I saw an interesting hard-wired version on TV using LED's a long time ago which was quite impressive, and similar to what you are thinking of.

While massively parallel systems have a speed advantage, the real downside is cost; a simple 8 x 8 system would costs about 100 GBP / 200 USD using 08's, whereas a single 28X plus an 8x8 LED Matrix would do the same job, albeit slower.
 

Jeremy Leach

Senior Member
yep,I remember the 'game of life' simulations, and did one in Basic a while ago on a PC.

I agree on the cost angle of a decent sized network of cells. Still an interesting thought though - also the possibility of self-modifying code and passing code between cells (probably a custom made, simple high-level code passed as data). Also having cells that perhaps each have a simple sensor.

Talking of ideas - I've always been impressed by the old analogue computers in that they use simple, cheap components to provide pretty complex maths functions (integration etc). Just wonder if there's any mileage in using capacitors interfaced to a PicAxe in some way to be able to get these functions. Not entirely sure what they'd be used for though !
 

BeanieBots

Moderator
Jeremy, you must have missed my comment about neural networks!
Hippy's comment about cost is very valid but you can make quite a complex net with surprisingly few "nerones". An 08M for example could read two inputs and supply two outputs.
A simple SELF LEARNING game such as Tic-Tac-Toe would only require about 10 08Ms while something more complex such as Connect 4 could be done with about 20.
OK, that's a lot of dosh for such a simple game, but it would learn from it's mistakes and would be a great tool to teach AI.
 

Jeremy Leach

Senior Member
Sorry Beaniebots, I need to read comments a bit closer. Thanks, you obviously have put a lot of thought into this already.

Cost is obviously a big consideration in projects, but I tend to feel that the returns in educational value, and sense of acheivement is often higher than cost. I'm making a weather station, again don't need to, it's turned out fairly pricey (£140 ish), but it's interesting and a challenge. A simple neural network idea could again be really interesting.

I'm a relative newcomer to PicAxes but it seems that they have very high educational value, with the ability to be used at a simple or complex level - and impressive support documentation, web-site(s) and forum.

Going back to AndyPros original message, on wanting a different project - it would be good to somehow capture people's projects. Past, present and future ideas. One of the fairly recent ones that stick in my mind was by PearlyGirlieStar (I think!) and she was making a game using PicAxes involving ghouls and ghosts and I know Hippy and others helped her a lot. But how off-the-wall is that idea !! It's great.

I think there must still be a lot of uncharted territory ;-). PS sorry for rambling on.
 

Rickharris

Senior Member
I can't get away from this thought:

Displays are always the difficulty, either generating a big array of LEDs or some variation on the 2 line LCD options seems to be all there is.

I feel, but as yet havn't tried, that the following must have some merit.

Laser pens are cheap these days and can be switched on/off very quickly. They are relativly small and light.

Small stepper motors are available by breaking down a floppy drive or a CD drive. these motors are capable of producing fine motion control (at least in the floppy drive they do).

Combining the laser pen and 2 stepper motors would give an X,Y plotter where the pen dot could be aranged to scan and turning it on and off at the correct time provided a display.

Although the Picaxe isn't going to be fast enough to write, ( OK some one is going to do it somehow), a low res graph or Radar display should be possible say to show the output of an ultra sonic TX,RX giving to posibility of scanning the US head and producing a map of the local area, up to 3 meters anyway.

There could be other uses for this type of display that I havn't though of. The game of life for example is essentially a graph of the memory map.

PROBLEMS? - suggestions?



Edited by - rickharris on 4/8/2005 8:13:27 AM
 
Top