A more program space efficient way of doing ta whole heap of IFs????


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: A more program space efficient way of doing ta whole heap of IFs????

    Wow....what can I say Darrel....you lost me after the elseif post, but I'm gonna read it again & again until it sinks in!

    (also thank you steve ....all great stuff)

    Edit: Even just rolling with the ELSEIF melarkey ...my program now compiles at 1643 words ...it was maxing out before (greater than 2048 words), so even if I never get to understand the EEPROM method (& the initial indications aren't favourable, lol!) then nevertheless you've saved the day!
    Last edited by HankMcSpank; - 27th May 2011 at 12:49.

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: A more program space efficient way of doing ta whole heap of IFs????

    PICs have 2 areas of memory: codespace, for your program, and eeprom, you use DATA to store data and READ to get at it (you can also WRITE to it during program execution).

    Eeprom is a simple way to store tables and then use For loops to scan through them later. Three common uses; character definitions for LCDs, conversion tables and saving PIN numbers.

    I think Melanie has a thread somewhere on how to use some of that eeprom area for codespace.
    Last edited by Demon; - 27th May 2011 at 13:26.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  3. #3
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: A more program space efficient way of doing ta whole heap of IFs????

    Quote Originally Posted by Demon View Post
    PICs have 2 areas of memory: codespace, for your program, and eeprom, you use DATA to store data and READ to get at it.

    Eeprom is a simple way to store tables and then use For loops to scan through them later. Two common uses; character definitions for LCDs and conversion tables.

    I think Melanie has a thread somewhere on how to use some of that eeprom area for codespace.
    Thanks Robert (a cool name ;-) )...while I'm fairly clued up on how to get the PIC to work now (as well as being reasonably savvy on the electronics /interfacing aspect), the darned pesky coding world is still totally flat in my eyes!! (this is frustrating as I have a head brimmed with ideas...but no quick way to get them out of my fingertips & into a PIC)

    I'll have to take a night out to get the hang of using EEPROM so I'll have a search for any related threads outlining how to get started with them.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts