I am trying to modify code from the Olimex EasyWeb3 board. It uses an MSP430F149 and a crystal lan cs8900a ethernet controller. There is a sample code for a simple web server. I am interested in modifying the code to use Javascript to request information from the c program.

The problem right now is that the way the code is written it basically has a constant array Webside [ ] that has the code directly written in it. essentially the main code transmits a certain data size of that webside variable. Before it is transmitted, a subroutine searches for specific keys in the data and replaces it with a certain value (AD7% is the specific key, searches for that, and replaces an actual ADC value from one of the ports of the microcontroller). Then it finishes transmitting the rest of the data.

By doing it this way, there is no way I can have user interaction from the web browser. I am trying to make it so that the user can read or write values to specific locations in the microcontroller memory. I know the Javascript to use, but I do not know how those HTTP request interact with the sample code, or how it gets transfered or keeps track of it...

Any suggestions would be helpful.

Attached are the code

Thanks!!!