On Wed, Nov 15, 2000 at 02:42:07PM -0800, embedded engineer wrote: > results. With the 16C76 at near 100 percent I figure the ROM usage is > about 8k words or about 14k bytes at 14 bit words. With the 18C252, > Hi-Tech reports "21194 bytes total Program ROM". Firstly, the 18C figure is in bytes, so that is halved for words. The word size is unfortunately of no significance (14 vs. 16 bits) because all it gets you is bigger memory addressing. So you're seeing about 10K words vs. 8K words. This is in the range that we've seen - the 18C code tends to be a little larger (but the 18C has a much bigger address space, so you're not restricted to only 8K as you are for the 16C series chips). The reason the code is a little larger is twofold; because the chip can address more memory, it tends to need more instructions to do it. And because the compiler is new, it has not had as much work put into it to optimize the code as the 16C compiler has. So with time, you could expect the code size to come down, but I would not expect it to ever get, on average, any smaller than the 16C code. But a reduction of 10-15% over what is being produced now is not out of the question. There is also one instruction (LFSR) that is not usable because the current chips don't implement it correctly. This will hopefully be fixed in the future, but probably not on the 18Cx52 devices. Also, if you're using printf or its friends, the version of printf used in the 18C library is more powerful (and thus larger) than the 16C version. IF this is a problem, using some other function or customizing printf would be beneficial. Notwithstanding all the above, the bottom line is that you can get much more code into an 18C chip because your code might grow by 20% but your available ROM grows by 100%. Cheers, Clyde -- Clyde Stubbs | HI-TECH Software Email: clyde@htsoft.com | Phone Fax WWW: http://www.htsoft.com/ | USA: (408) 490 2885 (408) 490 2885 PGP: finger clyde@htsoft.com | AUS: +61 7 3355 8333 +61 7 3355 8334 --------------------------------------------------------------------------- HI-TECH C: compiling the real world. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.