wow.. thanks.... o ya... 1 more question... how many constant can i write in a single bracket? and... is there a problem if i write like this?
LOOKUP a,[1,2,3,4,5,6,7
,8,9,10],b
wow.. thanks.... o ya... 1 more question... how many constant can i write in a single bracket? and... is there a problem if i write like this?
LOOKUP a,[1,2,3,4,5,6,7
,8,9,10],b
Hi, SH
Will 255 for a 16F series and 256 for a 18F series be enough ??? ( LOL !!!)
...
Note this type of array takes a lot of room ( like with assembler ... 1 prog line per value + 1 ) and you might think at it when choosing your PIC ...
PbP doesn't deal so well with room for this function ... and lots of room is lost with big lookup tables !!!
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
? 255 only? i am thinking of at less 500... as i need to bit map all the char in ascii which is at less need 101x5
ya.. i know it takes alot of memory. and i have chosen 16F877A to do the job. i hope 8k is enough for the constants, I2C and a serial communication... if not enough, then i am in big troble.. haha...
so... 16F877A can only allocate 255 in 1 lookup table? if so, den i need to separate the bit map codings.
Hi,
Those are PbP limits !!! ... for LOOKUP ...
you can also use an external pre-programmed EEPROM or use some READCODE ( see manual for the limits )... if your code space allows it ....
note ... DATAs for READCODE can be loaded as an "include" file ... generated by your computer ! ( with "word", or much better "Excel" ...)
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
thanks Acetronics, i can deal with the more then 255 problem.
now another problem is that
how can i write
lookup a,[1,2,3,4,5,6,...........,255],b
in multiple line? and adding comment in the end of each line?
eg:
lookup a,[1,2,3,4,5,6,7,8,9,10, ; line 1
11,12,13,14,15, ; line 2
.................... ],b
Code:lookup a,[1,2,3,4,5,6,_ 'never tried comments on each line 7,8,9,10,....,255],b ' but the normal way should work
Dave
Always wear safety glasses while programming.
Bookmarks