por marcelo campos » 15 Abr 2010 22:30
a sensata resposta da Microchip, que entre outras coisas trilha o caminho do que o amigo tcpipchip falou:
If you look at the size requirements in the TCP/IP Stack Help file, it would appear that the HTTP server could fit into the PIC18F4550, but in reality once you build a web server application its a very tight fit. We do not target any board for demos that has less than 4k of RAM and 64kB of flash space. Its possible to fit in less space, but its going tight to fit into 32kB of flash with 2kB of RAM, and may not be possible depending on what you want to do.
On the program memory size, what is not included in that size estimation is any room for your application, call backs for HTTP GET/POST/Print statements, or a webpage being stored in the PICs flash memory. The webpage can be stored in an external EEPROM if that was designed onto your board. But the call backs are code the PIC will need to show dynamic variables or process data the customer submits to the board using HTM forms. They are to some extent unavoidable if you need that functionality (e.g. its not just a static webpage that accepts no user input). I would recommend a full version of the C18 compiler, and use all the code size optimizations to help with program memory size.
For RAM requirements, your application will also use RAM, and the call back functions also need RAM. Its going to be hard to fit in to 2k of space, but if all you are doing is a webserver, and you don't allocate RAM for other TCP/UDP services and very little for your application it may fit.
Outside of removing everything you can via the TCPIPConfig file with the TCP Config Wizard, and optimization, there is little you can do to reduce the size of PIC you need. If your board does not have an EEPROM for webpage storage, you will need to have a very, very small webpage to have a shot at this fitting.