Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PICAXE - Memory Full

Status
Not open for further replies.

GST_Nem

New Member
im writing a program using picaxe but ive got a problem, its too long!

i was wondering if there is a way to convert the program into assembler or if the 18x or 18a chips hold more memory than a normall 18? its about 363 lines (i have mabey 10 more to add). thanks alot.
 
GST_Nem said:
im writing a program using picaxe but ive got a problem, its too long!

i was wondering if there is a way to convert the program into assembler or if the 18x or 18a chips hold more memory than a normall 18? its about 363 lines (i have mabey 10 more to add). thanks alot.

The PICAXE has very little memory space available because it's a BASIC interpreter, and holds it's tokenised program in the data EEPROM space, which has a maximum of 256 bytes in a PIC, and less in some.

Either shrink your program to make it fit, write it using a BASIC compiler and a normal PIC, or write it in assembler for a normal PIC.
 
just to add to what nigel said, you should realize that a normal PIC can hold typically 2000 lines of code at the very least, and 4K or 8K is not at all uncommon, and some of the fancier ones are far bigger...

The PICaxe is an interesting toy, but it's extremely limited and you're going to have to transition over to the real thing eventually if you want to do anything very advanced. even a BASIC compiler will allow you many times more code on the exact same PIC chip, compared to running the interpreted BASIC that the PICaxe uses.
 
alright a basic compiler sounds good, where can i get one that works with the picaxe basic? coz my freind says its different somehow? im not sure... but could u guys point me in the right direction plz. also i know you can convert basic into assembler but u need a special picaxe programmer, so i cant do that, will i need any special hardware to compile the basic?

*edit
hmm i just re-read what u said and am i correct in thinking i will have to re-write everything again to suit a normall pic?
 
the PICaxe is nothing but a regular PIC that has been pre-programmed with their special firmware. If you want to use it as a normal PIC, you just need a normal programmer, which can be built or purchased cheaply.

There are a handful of BASIC compilers for the PIC, I can't suggest any particular one because I don't program in BASIC, I use C instead. If you choose to go the assembly route, then you can use MPLAB, which is made by the manufacturer, a complete development environment.

No matter what, you'll need to re-write stuff... but if you take the time to learn to do it in assembly, it will benefit you a lot more than using the PICaxe software, because assembly can be used on ALL the PICs available.
 
Have a look **broken link removed** and you will find a free basic (and C) compiler and manual. Have a play with it and see if you can convert your code.

Mike.
 
Get the 18x
It will allow around 600 basic lines of code.

Nice little toy :lol: .
 

Attachments

  • comparison.gif
    comparison.gif
    9.4 KB · Views: 832
ok yeh thats alright i only need about 350-400 lines so i will get that thanks, to be hounest i spent ages making it and i really didnt want to re-write it all. i will try to leanr how to code in basic but that will take a long time. for the minute i will stick with picaxe. btw has anyone heasrd of piclogicator? ive read that it doesnt use special firmware but instead it works by converting a flowsheet into assembler.
 
GST_Nem said:
btw has anyone heasrd of piclogicator? ive read that it doesnt use special firmware but instead it works by converting a flowsheet into assembler.

It's a crude way of writing simple programs, it tends to be used in schools (rather like the PICAXE).
 
yeh well thats where i am now :p i dont need anything more than that. it just seems that only 60 lines of code in a normall picaxe-18 is a bit of a waste of time. never mind, i will try to use basic in future.
 
GST_Nem said:
yeh well thats where i am now :p i dont need anything more than that. it just seems that only 60 lines of code in a normall picaxe-18 is a bit of a waste of time. never mind, i will try to use basic in future.

The PICAXE is quite an amazing device, but the small amount of data EEPROM makes it very limited - but for the price you can't go wrong!. Compare it to a BASIC STAMP, which is a very similar device, except it used external EEPROM instead (as some of the larger PICAXE's are now capable of).
 
Im new to PIC programming and im starting with the PICAXE, ive seen that table above before, but i dont know what the "+i2C" thing is about, anyone care to enlighten me?
 
andrew12345678 said:
Im new to PIC programming and im starting with the PICAXE, ive seen that table above before, but i dont know what the "+i2C" thing is about, anyone care to enlighten me?

I can't say I've ever looked, but I presume it means you can connect an external I2C EEPROM to increase the program storage space?.
 
how would you do something like that?

As i said before, im new to the PICAXE and PIC's in general, i first used one 3 days ago at a school holiday program for year 11 and 12 students, we made an electronic dice using PICAXE.

I made a PICAXE programmer the next day (at home) and im now going to start experimenting with the PICAXE system. Ive already run into memory issues since im running Picaxe 08 system but that may be due to my codeing technique (or lack thereof)
 
well i have worked alot more with picaxe now and im pretty good at it. i can tell you now that learning the BASIc of picaxe will help you alot, it can nearly half the lines of code you use. go through the picaxe tutorials to help you out. but first you should try making some advanced stuff with flowsheet and looking with the "convert to basic" tool to see how it works.
 
Use X versions of PICAXE.

I have been using PICAXE chips for quite awhile and love them. They are NOT a toy, if you are willing to use a little imagination to accomplish your goals.

Your easiest solution is to use the X version of the PICAXE chips, they are the most powerful, have the most features, and can accept 600+ lines of code. If you can, ALWAYS USE THE X VERSIONS. In your particular case, the 18-X would only be slightly more than 1/2 filled with your stated lines of code.

Hope this helps.

Art
 
Hi
I am too new with programming
Started with picaxe using flowchart and than covert to basic.
Want to know is good to learn basic or C to build some good advance projects.
Can some one suggest good programmer,programming board everthing I should have to start I am having a very basic knowledge of Electronics
Thanks
 
I designed my Junebug kit to be such a device. Programmer & Tutor all in one. I also recommend Swordfish BASIC SE or C18 SE both are the free student editions.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top