All other trademarks mentioned herein are  property of their respective companies.
The Microchip name, logo, PIC, PICmicro are registered trade- marks of Microchip Technology Incorporated in the U.S.A. and other countries.

Getting Started

with the

Proton-NET Development Board

and the
 
Iosoft Demo Firmware
Iosoft Special Software License Agreement
Trademarks
The software supplied as part of the PICDEM.net board is Copyright © 2001 by Iosoft, Ltd. All rights are reserved. This software is owned by Iosoft, and is only licensed for distribution with the book 'TCP/IP Lean' and the PICDEM.net board, and may only be used for personal experimentation by the purchaser of that book or the PICDEM.net kit, on condition that this copyright notice is retained. Any use in violation of the foregoing restrictions may subject the user to criminal sanctions under applicable laws, as well as to civil liability for the breach of the terms and conditions of this license. For commercial licensing, contact license@iosoft.co.uk
THIS IS  EXPERIMENTAL  SOFTWARE, PROVIDED IN AN  “AS  IS” CONDITION. NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- NESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. IOSOFT SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.

•   ADDRESSING - Each device on the network must have a unique  address. Networks using Dynamic Host Configuration Protocol (DCHP) may not permit single devices with fixed IP addresses without configuration changes.
•   EXPERIMENTATION - The Proton-Net development board is capable of generating a high volume of network traffic, which may severely disrupt normal network operations.
•   CONNECTION – The Proton-Net  is best tested and initially configured whilst connected directly to a dedicated host system, using the supplied  crossover cable; or connected via a standard Ethernet cable to a single Ethernet hub,  which has no connections to any other LAN.
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 from 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.
Attention should be paid to the following if successful implementation of the demonstration is to be achieved.

2. Host System Requirements
To configure and communicate with the Proton-NET board, you must have a system that meets the following hardware and software requirements:
•   PC-compatible system with an Intel Pentium® class, or higher  processor, or equivalent
•   4 MB RAM (16 MB or more, recommended) 
•   CD-ROM drive (for use with the accompanying CD) 
•   Standard Ethernet card (10 Mbps) with RJ45 (10-Base T) connector  
•   One available standard serial port, with a matching COM port available 
  through the operating system 
•   Microsoft Windows 95, Windows 98, Windows NT 4.0 or Windows 2000 
  Professional Desktop (any version) 
•   Microsoft IE, or Netscape Navigator V3.0 or better.

•   A terminal emulation package, such as HyperTerminal® 
2.1
Setting Up the Test System
Assuming that  an  Ethernet  card  has  already  been installed and is working properly in the Host system, and that the TCP/IP protocol has been installed and bound to the card. The simplest configuration uses a  single host computer connected directly to the Proton-NET board using a crossover cable. Creating this isolated test system involves the following steps: 
1.	Connect the Proton-NET board to the host system via the crossover cable
2.	Configure the Host
3.	Configure the Proton-NET

Assuming that you have connected the Proton-Net board to your host system via the crossover cable supplied with the Proton-Net development system, you must configure the host system:
It  is  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:
IP address:   
192.168.0.10 
255.255.255.0 
Subnet mask:  

If everything is working correctly, the Tx and Rx lights should be lit or flickering and the LCD display will show a sign on message similar to this:

ChipWeb v2.xx 192.168.0.20
If your Proton-NET does not show the sign on message check all connections with the power supply and the board.
2.2
Setting up the Host IP Address
This process will vary depending on the host system.
 In general you will need to select a free IP range i.e 192.168.0.xxx
Set a subnet mask e.g. 255.255.255.0
Ensure that DHCP is not used
And that TCP/IP protocol is selceted
Be sure to ensure that the host system is on the same domain as the Proton-Net will be If the two addresses are  dissimilar,  the  host system will  be  looking  for  an  IP  ‘router’  to  complete  the connection to the proton-NET,  even  though  the  electrical  connection  is  fine.  A good starting point is 192.168.0.10 for the host and we can then select 192.168.0.20 for the Proton-NET
The actual version of the firmware will be reflected in the first line of the LCD display. The Version may be different to the example shown here.

The  IP  address  “192.168.0.20 is an example the IP address displayed will be set by you later on during setup.
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. 
To test the Proton-Net, any IP address may be used, but it is important that 
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. 
Assuming that you are using Hyper- Terminal the terminal that ships with Windows operating systems.  If  you  are  using  another  terminal  emulation  package,  the procedure  you  use  to  configure  a  terminal  session  may  differ.

2.3
Configuring the PICDEM.net IP Address
From    the Start    menu:
•	SelectPrograms
•	Accessories
•	Communications
•	HyperTerminal (or sometimes, Programs>Accessories>HyperTerminal)

•	At the initial “Connection Description” dialog box, enter a name for the connection.(You may call the session any name that you want) Click “OK”.

•	 At the “Connect To” dialog box that follows, choose the appropriate COM port from the drop-down menu. Click “OK”.

•	 At the COM Properties dialog box that follows, select the settings:
o	Bits per second: 9600
o	Data bits: 8
o	Parity: none
o	Stop bits: 1
o	Flow: none
Click “OK”.

•	The terminal window opens with a flashing cursor. The message “Connected” appears in the status bar at the bottom of the terminal window, along with an elapsed time display.

•	 Press and hold button RB5 on the Proton-Net Board ( above the two potentiometers and below the ICD socket. NOT the RESET button) While holding RB5, press and release the RESET button. The terminal responds with:

ChipWeb vx.x.x Config    Serial num?
The LCD also displays “V x.x.x Config”.
Note: The actual version of the firmware will be reflected in the first line  of the display.
•	Enter the serial number (Ethernet ID number) printed on the sticker on the board. Press <ENTER>.

•	At  the  response  IP   addr?,  enter the ip address of the proton-Net Board, this can be any free ip address in the range denoted by the subnet mask, for example, if the original host IP address is 192.168.0.10 , enter “192.168.0.20”.   Press <ENTER>.

•	The terminal responds with XMODEM?, followed by a series of characters appearing approximately once per second.

•	Press and release the MCLR button. The terminal responds with the sign on showing the new IP address entered in the stage above. The LCD also displays “Vx.x.x” and the new IP address.
•	You may now close the terminal session. You may want to save the setting for future use. 

Your Proton-NET development board is now ready for use no further software programming is required. All that remains is to connect to it to view the custom HTML page, stored in the on board eeprom. 

However you may need to make some small changes to your browser to view the web page whilst connected directly to the Proton-NET. Check that you are NOT using a proxy server, if you are disable it:
•	Access the browser’s configuration
•	Select the “Connections” tab, then click on the “LAN Settings” button.
•	Verify that the “Use a Proxy Server” box is deselected
•	Click “OK”, then “OK” again to close the Internet Properties dialog box.

Launch the Web browser (if not running already). At the URL address line, enter “http://”, and the IP address of the Proton-NET board. Press <Enter>.

You should see a page similar to this:

2.4
Reconfiguring the Iosoft Firmware
On the CDROM shipped with proton-NETR ,t he Iosoft firmware is provided in compiled format for demonstration purposes. Visit www.iosoft.co.uk for information on the book TCP/IP Lean and the source code license. 
The Ioosoft web page, is written in compiled HTML must be loaded into the EEPROM on board the Proton-NET development board.
The Web page can be reloaded, or a new page loaded in its place, without affecting the operating firmware on the microcontroller. Reloading the Network Configuration, however, does require the Web page to be reloaded.
At this point, the Proton-NET board’s network configuration can be changed as we saw previously. 1. At the Serial num? prompt, enter the serial number from the Ethernet  ID sticker on the board, or a new Ethernet ID number. Alternatively, press <ESC> to leave the ID unchanged.
2. At the IP addr? prompt, enter the new IP address in dotted-decimal notation. Alternatively, press <ESC> to leave the IP address unchanged. 
3. Press <ENTER>. The new network configuration is now programmed into the controller’s EEPROM.
4. The terminal responds with XMODEM
The LCD also displays “V x.x.x  Config”. 
When running the Iosoft firmware Proton-NET board will also enter the Configuration mode automatically, whenever an EEPROM checksum failure occurs (e.g., when the EEPROM is cleared or its contents are corrupted).
IP ADDRESS CONFIGURATION: 
•   If more than one PICDEM.net board is being evaluated, give each board a different IP address - even if one is connected at a time. The system may become confused with different Ethernet IDs being linked to a single IP address. •   Rapid changes in Ethernet IDs and/or IP addresses, especially when  more than one PICDEM.net board is being evaluated, may cause a sit- uation where the boards respond erratically. This is likely due to ARP caching by the host system, where it retains a mapping of MACs and IP addresses. •   For experienced users: the configuration of the PICDEM.net board   does not include either a net mask, or gateway IP address. This is because the current implementation of ChipWeb does not include rout- ing capabilities; all responses are returned directly to the IP and MAC of the sender. Routing capabilities will be added to subsequent versions.


2001 Microchip Technology Inc.
DS39563A-page 25

4.3.3
Loading (or Reloading) the Web Page
Before loading the Web page, the HTML file(s) must be translated into the appropriate binary format using the Webpage tool. The software is included with the CD accompanying the book “TCP/IP Lean”.  In general, creating a new Web page involves the following: 
1.
Create  the  HTML  or  GIF  files  using  the  appropriate  software  tools. Remember that the total size of any single file (including HTML header) must be no more than 1460 bytes.
2.
Place the files into a single directory.
3.
Merge  the  files  with  the  WEBROMTM  tool  (see  Chapters  5  and  11  of "TCP/IP Lean").
4.
Verify  that  the  size  of  the  finished  file  is  within  the  capacity  of  the EEPROM (32 Kbyte).
If you are reloading the original ChipWeb page, it is available in the proper format on the PICDEM.net Internet Solutions CD. The path is /iosoft/chipweb/pcm/webpage.rom..
Note:
Your   terminal   emulation   software   must   support   the   standard XMODEM protocol. Variants such as XMODEM-1K or any of the  CRC variants will not work. HyperTerminal supports both XMODEM and XMODEM-1K.

PICDEM.netTM User’s Guide
DS39563A-page 26

2001 Microchip Technology Inc.
To Load a Web Page: 1.
Enter Configuration mode (Section 4.3.1, page 24).
2.
Change  the  Ethernet  ID  and  IP  address  as  needed  (Section 4.3.2, page 24), or press <ESC> twice to bypass changes.
3.
At the XMODEM? prompt,  select Transfer>Send File from the main menu for HyperTerminal (the "Send File" command for other terminal emula- tors).  Specify  the  location  of  the  file,  and  select  "XMODEM"  for  the Transfer Protocol.
4.
When  the  transfer  has  finished,  the  PICDEM.net  board  will  return  to normal  operation  automatically.  The  terminal  and  LCD  return  with "ChipWeb v1.0.3" and the IP address. 
If the transfer did not complete successfully, the PICDEM.net board will return to Configuration mode. There may also be an error message from the terminal emulator, noting that the file transfer did not complete suc- cessfully. It is also possible that the controller EEPROM checksum has failed, and the network configuration needs to be reloaded.
4.4
Clearing the Controller Firmware
After investigating the PICDEM.net board and the ChipWeb server, you may be ready to design your own embedded application. To do this, it will be necessary to clear the existing TCP/IP stack in FLASH Program Memory of  the PIC16F877 microcontroller. 
The PICDEM.net. Ethernet/Internet Demonstration Board does not include   the tools for clearing and reprogramming the microprocessor. To do this, you must use an appropriate device programmer. You may also use the MPLAB ICD Development System, which provides a complete development suite for device emulation and programming. 
If you already have the development tools, you have everything you need to begin immediately. The PICDEM.net Internet Solutions CD, enclosed with the PICDEM.net Development kit, includes sample software to assist you in developing embedded Ethernet solutions.
Note:
The MPLAB Development System and the PICDEM.net Internet Solutions CD contain tools and solutions for both the PIC16C and PIC18C families of microcontrollers. You will need to obtain a pin- compatible PICmicro 18C or 18F device (such as the PIC18C452) to evaluate the full range of these Ethernet solutions.