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 20th September 2003, 12:33 AM   (permalink)
Default Arrays - out of memory - how to compress

Hey everyone,

Having a problem. Need something similar to 9 different arrays of about 15 items each. Problem is that I've got them and the rest of my needed variables all to fit into the 384 data memory of the 16F877. But the way I'm attempting to access the values inside, a series of if.. then.. else's runs me out of the 8192 program memory.

I know one way to minimize the size would be to program it in assembly, but I'd really rather not do that seeing it's size.

So, the question is this: How do I access the values in a particular address of an array in the most compact BASIC way.

Instead of the current way:

If AA<47 then
GOTO LABEL1
else
BB=CC(1)
GOTO PRINT1
End if

Having this little loop like 15 times for 9 different arrays is killing the memory available. Please any suggestions would be greatly appreciated.
usaf1 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




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


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