Straight HTML technology

Any webserver can 'serve' you with regular static html pages. The word static means that the content of these pages does not change. The SC12 can serve you wih these static pages (such as the page you are looking at). The SC12 can also serve you pages with a changing content: dynamic pages.

Dynamic HTML files
Only with a changing content, you can visualise up to date information.
The operating system of the SC12 offers several methods for producing a dynamic content. Modifying a file on the file system is the simplest method, but it is not the advised method. The use of CGI handlers is the most powerfull. Other methods, such as active chip pages, make use of CGI handlers.

Modify a file
One method to create a dynamic content is changing to content of the files on the file system. A C program can constantly re-write a file with current information. To avoid wear of the flash memory, this is best done on a RAM-disk.
This straight formward aproach has some disadvantages such as:
    Constant CPU load, even if no requests by a browser are made.
    Coding HTML in a C program is a tedious job.
Although it is a simpel method, is is not often used. Not only because it has some disadvantages, but also because the alternatives offer more flexibility.

CGI handler
A CGI handler is a piece of program code that is called if the browser requests a page with a certain name. The program then produces the contents in memory and hands this through the web-server to the browser.
The CPU is therefore only used if a browser makes a request. Designing a HTML page in a C program however, still is a tedious job.
The next example shows a new browser window with two frames showing the status of the I/O in the left frame and buttons to click to change the I/O in the right frame.
A refresh meta tag is used to automatically reload the page every 4 seconds.




© 2001 Beck IPC GmbH