+ Reply to Thread
Page 1 of 2
1 2 Last
Results 1 to 15 of 21

Thread: PICAXE - Memory Full

  1. #1
    GST_Nem Newbie
    Join Date
    Dec 2005
    Posts
    36

    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.


  2. #2
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,791

    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

  3. #3
    evandude Good evandude Good evandude Good
    Join Date
    Oct 2003
    Location
    Maine, USA
    Posts
    1,395

    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.

  4. #4
    GST_Nem Newbie
    Join Date
    Dec 2005
    Posts
    36

    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?

  5. #5
    evandude Good evandude Good evandude Good
    Join Date
    Oct 2003
    Location
    Maine, USA
    Posts
    1,395

    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.

  6. #6
    Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent
    Join Date
    Mar 2005
    Location
    Brisbane Australia
    Posts
    6,805

    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.

  7. #7
    Screech Newbie
    Join Date
    Aug 2003
    Location
    Melbourne Australia
    Posts
    345

    Default

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

    Nice little toy :lol: .
    Attached Images

  8. #8
    GST_Nem Newbie
    Join Date
    Dec 2005
    Posts
    36

    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.

  9. #9
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,791

    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

  10. #10
    GST_Nem Newbie
    Join Date
    Dec 2005
    Posts
    36

    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.

  11. #11
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,791

    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

  12. #12
    Macka Good Macka Good
    Join Date
    Mar 2005
    Location
    Adelaide, Australia
    Posts
    92

    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

  13. #13
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,791

    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

  14. #14
    Screech Newbie
    Join Date
    Aug 2003
    Location
    Melbourne Australia
    Posts
    345

    Default

    i2c tutorial:
    Attached Files

  15. #15
    Macka Good Macka Good
    Join Date
    Mar 2005
    Location
    Adelaide, Australia
    Posts
    92

    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)

+ Reply to Thread
Page 1 of 2
1 2 Last

Tags for this Thread