Datasheet
Module eth_enc28j60_utils code:
module eth_enc28j60_utils
'************************************************************
'* ROM constant strings
'************************************************************
const httpHeader as string[30] = "HTTP/1.1 200 OK"+chr(10)+"Content-
type: " ' HTTP header
const httpMimeTypeHTML as string[13] = "text/html"+chr(10)+chr(10)
' HTML MIME type
const httpMimeTypeScript as string[14] =
"text/plain"+chr(10)+chr(10) ' TEXT MIME type
const httpMethod as 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 as string[513] =
"<meta http-equiv=" + Chr(34) + "refresh" +
Chr(34) + " content=" + Chr(34) + "3;url=http://192.168.20.60" +
Chr(34) + ">" +
"<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="+chr(34)+"font-size:20px ;font-family: terminal
;"+chr(34)+">"+
"<tr><th colspan=2>PINC</th></tr>"+
"<script>"+
"var str,i;"+
"str="+chr(34)+chr(34)+";"+
"for(i=0;i<8;i++)"+
"{str+="+chr(34)+"<tr><td bgcolor=pink>BUTTON
#"+chr(34)+"+i+"+chr(34)+"</td>"+chr(34)+";"+
"if(PINC&(1<<i)){str+="+chr(34)+"<td
bgcolor=red>ON"+chr(34)+";}"+
"else {str+="+chr(34)+"<td
bgcolor=#cccccc>OFF"+chr(34)+";}"+
"str+="+chr(34)+"</td></tr>"+chr(34)+";}"+
"document.write(str) ;"+
"</script>"
383
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6