HSERIN each character cost 3 pgm words
Hello,
I am trying to write simple Web server with 16F648A. This PIC has 4096 pgm words. I have discoverred very uneffective storing of characters in program memory using HSEROUT.
e.g.
HSEROUT ["a"] 'cost 3 pgm words
HSEROUT ["aa"] 'cost 6 pgm words
So each new character cost 3 pgm words!
So if I have 4096 pgm memory, I can use in my program just 1000 characters and that's it.
Anyone has any idea how to use the strings with HSEROUT in a better way?
Thanks for any idea, i need to use at least 2K of HTML code + program code.
Moved to 16F916 and it's working
Hello, Thanks Darrel and Skimask, I had in my pocket one 16F916 where this trick to store two chars to one pgm word is working well. I was able to rapidly decrease my code space. 1.5K instead of 4K. I will also test this POKECODE/PEEKCODE on my 16F648.
Thanks both of you...
I think, the EEPROM is not solution it has just 256 bytes and I need to store there some data and also external EEPROM will complicate the design. But maybe for the storage of lot of html code this could be the solution.
My webserver with Lantronix Direct port is working pretty well now. I have even some space to make the html more nicer :))))
Boban
P.S. I am now thinking about the feature to have the possibility to store the hlml pages during runtime - kind of firmware update. My idea is to reserve the space in code memory like put there spaces and via webserver to have the service to upgrade the html code during the runtime. But I must check the assemler if it is possible to write to program code during the execution. Have no clue....