$regfile = "m88def.dat" ' specify the used micro
$crystal = 1000000 ' used crystal frequency
$baud = 19200 ' use baud rate
$hwstack = 80 ' default use 64 for the hardware stack
$swstack = 64 ' default use 64 for the SW stack
$framesize = 180 ' default use 80 for the frame space
Const Cdebug = 1
Config Com1 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
'Configuration Of The SPI bus
Config Spi = Hard , Interrupt = Off , Data_order = Msb , Master = Yes , Polarity = Low , Phase = 0 , Clockrate = 4 , Noss = 0
'Init the spi pins
Spiinit
'we do the usual
Print "Init TCP" ' display a message
Enable Interrupts ' before we use config tcpip , we need to enable the interrupts
Config Tcpip = Noint , Mac = 12.128.12.34.56.78 , Ip = 192.168.1.70 , Submask = 255.255.255.0 , Gateway = 192.168.1.250 , Localport = 1000 , Tx = $55 , Rx = $55 , Chip = W5100 , Spi = 1 , Cs = Portb.2
Print "Init done"
Dim Ip As Long
Ip = Url2ip("mcselec.com")
print Ip2str(ip)
Ip = Url2ip("www.google.com")
print Ip2str(ip)
do
loop |