Datasheet

const httpMimeTypeHTML : string[13] = 'text/html'+#10+#10 ;
// HTML MIME type
const httpMimeTypeScript : string[14] = 'text/plain'+#10+#10 ;
// TEXT MIME type
const httpMethod : string[5] = 'GET /';
{*
* web page, splited into 2 parts :
* when coming short of ROM, fragmented data is handled more effi-
ciently by linker
*
* this HTML page calls the boards to get its status, and builds
itself with javascript
*}
const indexPage : string[513] =
'<meta http-equiv="refresh"
content="3;url=http://192.168.20.60">'+
'<HTML><HEAD></HEAD><BODY>'+
'<h1>AVR + ENC28J60 Mini Web Server</h1>'+
'<a href=/>Reload</a>'+
'<script src=/s></script>'+
'<table><tr><td valign=top><table border=1
style="font-size:20px ;font-family: terminal ;">'+
'<tr><th colspan=2>PINC</th></tr>'+
'<script>'+
'var str,i;'+
'str="";'+
'for(i=0;i<8;i++)'+
'{str+="<tr><td bgcolor=pink>BUTTON #"+i+"</td>";'+
'if(PINC&(1<<i)){str+="<td bgcolor=red>ON";}'+
'else {str+="<td bgcolor=#cccccc>OFF";}'+
'str+="</td></tr>";}'+
'document.write(str) ;'+
'</script>';
const indexPage2 : string[466] =
'</table></td><td>'+
'<table border=1 style="font-size:20px ;font-
family: terminal ;">'+
'<tr><th colspan=3>PORTD</th></tr>'+
'<script>'+
'var str,i;'+
'str="";'+
'for(i=0;i<8;i++)'+
'{str+="<tr><td bgcolor=yellow>LED #"+i+"</td>";'+
'if(PORTD&(1<<i)){str+="<td bgcolor=red>ON";}'+
'else {str+="<td bgcolor=#cccccc>OFF";}'+
'str+="</td><td><a href=/t"+i+">Toggle</a></td></tr>";}'+
'document.write(str) ;'+
'</script>'+
'</table></td></tr></table>'+
394
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6