Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 19th January 2006, 06:11 PM   (permalink)
Default PICAXE - Memory Full

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 is offline   Reply With Quote
Old 19th January 2006, 08:48 PM   (permalink)
Default Re: PICAXE - Memory Full

Quote:
Originally Posted by GST_Nem
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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now   Reply With Quote
Old 19th January 2006, 09:03 PM   (permalink)
Default

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.
__________________
EEgeek.net
evandude is offline   Reply With Quote
Old 19th January 2006, 09:31 PM   (permalink)
Default

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?
GST_Nem is offline   Reply With Quote
Old 19th January 2006, 10:08 PM   (permalink)
Default

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.
__________________
EEgeek.net
evandude is offline   Reply With Quote
Old 19th January 2006, 10:56 PM   (permalink)
Default

Have a look Here 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.
Pommie is online now   Reply With Quote
Old 20th January 2006, 05:14 AM   (permalink)
Default

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

Nice little toy :lol: .
Attached Images
File Type: gif comparison.gif (9.4 KB, 571 views)
Screech is offline   Reply With Quote
Old 20th January 2006, 10:23 AM   (permalink)
Default

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 is offline   Reply With Quote
Old 20th January 2006, 10:25 AM   (permalink)
Default

Quote:
Originally Posted by GST_Nem
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).
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now   Reply With Quote
Old 20th January 2006, 10:26 AM   (permalink)
Default

yeh well thats where i am now 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 is offline   Reply With Quote
Old 20th January 2006, 11:34 AM   (permalink)
Default

Quote:
Originally Posted by GST_Nem
yeh well thats where i am now 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).
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now   Reply With Quote
Old 24th April 2006, 10:05 AM   (permalink)
Default

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?
__________________
"The glass is neither half-empty, nor half full, it's just twice as big as it needs to be" - Unknown
andrew12345678 is offline   Reply With Quote
Old 24th April 2006, 10:44 AM   (permalink)
Default

Quote:
Originally Posted by andrew12345678
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?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now   Reply With Quote
Old 24th April 2006, 10:58 AM   (permalink)
Default

i2c tutorial:
Attached Files
File Type: pdf axe110_i2c.pdf (72.2 KB, 32 views)
Screech is offline   Reply With Quote
Old 24th April 2006, 11:02 AM   (permalink)
Default

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)
andrew12345678 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 11:11 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.