Proton-Net  & Iosoft Firmware
for Embeded TCP/IP Development
1. Introduction 
The   Crownhill Proton-Net development system supports   the   development   of embedded  TCP/IP hardware  and  software,  with  particular  reference  to Microchip   PIC16F8xx and 18xxx   microcontroller   family,   and   the   ‘C’   programming language. 
This  manual  describes  set up of the Proton-Net   hardware,  and  the Iosoft firmware  that  is  supplied on the Proton-Net CDROM  for software information, please refer to the manual supplied with the source-code package available form www.crownhill.co.uk and www.iosoft.co.uk

It   is   assumed   that   the   reader   has   a   reasonable   familiarity   with   TCP/IP networking and PICmicro® microcontrollers as described in ‘TCP/IP Lean: Web Servers for Embedded Systems’ by Jeremy Bentham (2nd edition ISBN 1-57820- 108-X). This document should be read in conjunction with the above mentioned book and or the Proton NET Pic basic documentation. 
Page 1
2. Hardware 
Processor 
The Proton-Net  is supplied with a PIC16F877 20Mhz processor, see the data sheet for full specifications. 
Power 
Power  is  provided by 9 volts AC AC adaptor , with at least 500 mA capacity.  Regulated DC or Unregulated   AC  supplies  can also be  used,  as  the  board has onboard rectification and smoothing circuits.
The Proton-Net has a voltage regulator that gets warm in normal use. If the regulator is  called  upon  to  dissipate  extra  power  (i.e.  by  the  use  of  a  higher  supply voltage,  or  the  addition  of  extra  loads  such  as  emulators)  then  the  regulator temperature may rise significantly, and it will be necessary to add a heatsink to     the device. 

Communication interfaces 
There are three communication interfaces: 
1.  RS232 serial 
2. 10baseT Ethernet
3.  ICD 
The  interfaces are fully described in Jeremy Bentham’s book TCP/IP Lean see the iosoft web site for detail and purchasing of the book.  
Page 2
User interfaces 
Two pushbuttons, six LEDs and two Potentiometers are provided; three of the LEDs indicate Ethernet status,  and  are  normally  on;  the  ‘transmit’  &  ‘receive’  LEDs  briefly  flash  off during network transfers. a fourth LED provides a ‘heartbeat’ indication to    show the microcontroller is running. Two potentiometers allow voltages on the ADC to be adjusted. Pushbuttons allow for reset of the micro and to initiate a system configuration routine;   this allows the basic system settings to be reconfigured through the serial link at 9600   baud
Firmware 
The firmware supplied on the Proton-Net CDROM is useful for initial experimentation, it is assumed that the  developer  will  wish  to  modify  and  extend  the  software,  in  order  to customise  it  for  a  specific  application. The full source code and firmware description can be found in ‘TCP/IP Lean: Web Servers for Embedded Systems’ by Jeremy Bentham (2nd edition ISBN 1-57820- 108-X). 
3. Getting started 
Creating a network 
It  is  strongly  recommended  that  a  ‘scratch’  network  be  created  for  test purposes,  and  that  this  network  be  isolated  from  all  other  networks  in  the building. This ensures that your experimentation will not disrupt the activities 
of other network users. 
For  initial  testing,  a  PC  with  a  spare  serial  port  and  Ethernet  interface  is needed. The PC should have TCP/IP networking enabled, and be set to a fixed (‘static’) IP address. It should be isolated from the main office network, so can 
be assigned a suitable IP address for a machine not connected to the Internet,    e.g.  192.168.0.10.  To  set  this  address  in  Windows,  edit  the  TCP/IP  Network Properties for the Ethernet interface you’re using, and set to 
Subnet mask:  
192.168.0.10 
IP address:   
255.255.255.0 

Page 3
To test the Proton-Net, any IP address may be used, but it is important that 
o  The PC has a fixed address (not obtained ‘automatically’ using DHCP), 
o  The PC and the Proton-Net are in the same ‘domain’, i.e. their IP addresses  have the same base value on the left-hand side. 
For example a PC at 192.168.0.10 will normally communicate with an Proton-Net Board at 192.168.0.20, but probably not if the address is 10.1.1.20, even though these   may  be  the  only  two  systems  on  the  network.  For  detailed  discussion  of  IP addressing and domains, refer to the ‘TCP/IP Lean’ book. 
If  only  a  single  PC  is  used,  it  can  be  connected  directly  to  the  Proton-Net  using  a ‘crossover’ network cable; otherwise a network ‘hub’ (either 10 Mbit, or 10/100 auto-switching) is used with uncrossed cables. 
Board configuration 
Before using the board, it has to be configured using the serial interface. 
1.  Serial connection. Connect the board to a PC using a straight-through (uncrossed) cable DB9M-DB9F. Run a terminal emulator on the PC at 9600 baud, no parity, one stop bit, no handshaking. 
2.  Power supply. Connect a 9 volt AC Supply, with at least 500 mA capacity 
3.  Start-up. Power up the board, with the pushbutton pressed; the terminal emulator should show a sign-on message. 
If  the  display  does  not  appear,  check  the  system  LED  is  flashing (indicating the microcontroller is running), the serial cable connections, and the terminal emulator settings. 
To restart the configuration at any stage, simply re-power the board (i.e. power down then up) with the pushbutton pressed on power-up. 
4.  Serial  number.  Release  the  pushbutton  and  enter  the  board  serial number, as printed on the label attached to the board. This value will be used to determine the Ethernet controller address. 

Page 4
5.  IP address. Next, the board will prompt for an IP address: 
IP addr? 
Enter the IP address in the usual dotted notation, e.g. 
192.168.0.20 
6.  Basic configuration complete. The ER21 will report 
7.  Web pages. To update the on-board Web pages, a single binary image of     the pages must first be prepared using the WEBROM utility provided in the ‘TCP/IP Lean’ book; see that book for details as to how it is used. 
The resulting ROM file (e.g. WEBPAGE.ROM) should be uploaded to the  ER21  when  the  XMODEM  prompt  appears;  be  sure  to  use  the  simplest XMODEM  (checksum)  variant,  not  the  CRC  or  1K  versions.  When  the download  is  complete,  re-power  the  board  to  initialise  using  the  new settings. 
4. Ethernet tests 
Once the Proton-Net has been configured, launch a Web browser on the PC to access the on-board Web server. 
The display is similar to that described in Chapter 12 of ‘TCP/IP Lean’; the left- hand frame is used for navigation links, the centre has explanatory text, and  the right frame shows the current status, updated every few seconds. 
If the page fails to display, it can be for various reasons: 
o  The wrong network cable has been used; it should be a crossed cable for  direct connection to a PC, or uncrossed if the connection is via a hub. Ensure that the ‘link’ LED on the Proton-Net lights up when the connection is made. 
o  The IP address on the proton-Net has been set incorrectly; re-power the Proton-Net  with  the  serial  link  connected,  and  check  the  address  given  on  the terminal display, e.g. 
If the value is incorrect, or the ‘config’ prompt is displayed, re-run the configuration steps described above. 
192.168.0.20 
o  The PC may be using ‘automatic’ (DHCP) configuration, in which case it      is waiting for a response from a DHCP server. Change its configuration to a static IP address, as described earlier. 

o  The PC is on a different domain to the Proton-Net. If the two addresses are  dissimilar,  the  PC  will  be  looking  for  an  IP  ‘router’  to  complete  the connection,  even  though  the  electrical  connection  is  fine.  Alter  the addresses  so  they  are  on  the  same  domain,  e.g.  192.168.0.10  and 192.168.0.20 
o  The ARP cache entry on the PC is wrong. This problem may occur if you   have attempted to recycle an existing IP address (e.g. you have used one    IP  address  for  more  than  one  system).  The  PC  may  have  retained  a memory of the old IP-to-Ethernet address translation in its ‘ARP cache’,     and  be  attempting  to  use  the  wrong  Ethernet  address.  You  can  check whether there is an ARP entry by entering the command ‘arp -a’ in a DOS box; you would receive a display similar to the following: 
C:\WINDOWS>arp -a 
Interface: 192.168.0.10 on Interface 0x2000003 Internet Address      Physical Address      Type 192.168.0.20          00-0b-75-00-04-d2     dynamic 
This   shows   that   there   is   a   physical   (MAC)   entry   for   the   address 192.168.0.20;  if  that  address  was  recently  ‘borrowed’  from  another machine, it may be incorrect. The problem may be cleared by rebooting 
the PC, or less drastically by doing a manual deletion in the ARP cache,     e.g. 
arp -d 192.168.0.20 
The PC will then re-fetch the correct address (by sending an ARP request to the Proton-Net) and normal communications will be resumed. 
To  help  in  network  debugging,  the  Proton-Net  does  respond  to  ‘pings’  (ICMP  echo requests). 
Page 5