Datasheet

const indexPage2 as string[466] =
"</table></td><td>"+
"<table border=1 style="+chr(34)+"font-size:20px
;font-family: terminal ;"+chr(34)+">"+
"<tr><th colspan=3>PORTD</th></tr>"+
"<script>"+
"var str,i;"+
"str="+chr(34)+chr(34)+";"+
"for(i=0;i<8;i++)"+
"{str+="+chr(34)+"<tr><td bgcolor=yellow>LED
#"+chr(34)+"+i+"+chr(34)+"</td>"+chr(34)+";"+
"if(PORTD&(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><td><a
href=/t"+chr(34)+"+i+"+chr(34)+">Toggle</a></td></tr>"+chr(34)+";}"+
"document.write(str) ;"+
"</script>"+
"</table></td></tr></table>"+
"This is HTTP request
#<script>document.write(REQ)</script></BODY></HTML>"
dim getRequest as byte[15] ' HTTP request buffer
dyna as byte[31] ' buffer for dynamic response
httpCounter as word ' counter of HTTP requests
sub function SPI_Ethernet_UserTCP(dim byref remoteHost as byte[4],
dim remotePort, localPort, reqLength as word) as word
sub function SPI_Ethernet_UserUDP(dim byref remoteHost as byte[4],
dim remotePort, destPort, reqLength as word) as word
implements
'*******************************************
'* user defined sub functions
'*
'*
'* put the constant string pointed to by s to the ENC transmit buffer
'*
sub function putConstString (dim const s as ^byte) as word
result = 0
while(s^ <> 0)
SPI_Ethernet_putByte(s^)
Inc(s)
Inc(result)
wend
end sub
384
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6