The Modtronix SBC65EC Web Server can be built to be used with any revision of the SBC65EC. All new (since hardware V2.01) boards are delivered programmed with a network bootloader for updating firmware. Such a board can be identified by a
BLN Vm.nn label on the front of the board - normally stuck on the RTL8019AS 100 pin network chip. Where
Vm.nn is the version number of the bootloader. The bootloader is contained in the bottom 2K bootblock of the PIC microcontroller.
For older versions of the SBC65EC without a bootloader, a PIC programmer is required to program the board. For details on programming the target board, see Updating The Firmware.
For pre build binary versions of the latest firmware, see firmware for the SBC65EC.
A C compiler and the
MPLAB IDE is required to build the project. The
MPLAB C18 Compiler or
Hi Tech PICC18 Compiler can be used. A free version of the MPLAB C18 Compiler is available. When using the MPLAB C18 Compiler, ensure the version of the Compiler is higher than V3.02, and the version of MPLAB is higher than V7.22.
All MPLAB projects included with this source code download have been configured for when the MPLAB C18 C compiler has been installed on the c drive in a folder named "mcc18". If this is not the case, the user will have to:
- Modify the paths in the MPLAB project. Right click on the MPLAB project in the "Project" window in MPLAB, select "Build Options" from the context menu, and update the paths.
- Modify the Language tool locations in MPLAB. Select "Set Language Tool Locations" from the "Project" menu in MPLAB. Update the paths for the MPLAB C18 compiler.
When using the HI-TECH PICC18 compiler, V8.35PL3 or higher should be used. This project was tested with V8.35PL3.
The simplest way to build a project is to open the MPLAB Workspace for the target board in MPLAB, select the desired project, and built it.
A couple of different MPLAB Workspace files (*.mcw) are supplied in the root directory of the downloaded source code. The name of the Workspace file will indicate the target board it is for. The first part of the filename indicates the target board type, and the second part (after the '_' character) the hardware version. See below for details on identifying the hardware version of a board. The Workspace files starting with websrvr65_ are for the SBC65EC boards. For example, the file "websrvr65_hw301.mcw" will be for the hardware version HW3.01 of the SBC65EC board.
Each Workspace contains a couple of different MPLAB projects. After opening the workspace in MPLAB, the projects will be listed in the Project Window. The current project will be highlighted. To select a different project, right click on the project name, and select "Set Active" from the context menu.
- The projects containing the string "_ht_" are for the Hi Tech PICC18 Compiler
- The projects containing the string "_mc_" are for the MPLAB C18 Compiler
- The projects containing the string "_nobl_" are for boards without a bootloader
The active project can be built by clicking on the "Build All" button in the toolbar. This will create a hex file in the "../src" folder.
All MPLAB projects with names that do not contain the "_nobl_" string produce code for boards with Bootloaders. For example, the "websrvr65_mc_hw211.mcp" project will use the
MPLAB C18 Compiler to create code for a SBC65EC board (hardware version 2.11) with a bootloader.
When building a project for a board with a bootloader, it basically means that in stead of starting from address 0, the code starts from address 0x800. The bootloader lives in the code space 0x0 to 0x7ff. The generated hex file can be uploaded to the SBC65EC via the Modtronix Network Bootloader application.
All MPLAB projects with names that contain a "_nobl_" string produce code for boards without Bootloaders. For example, the "websrvr65_nobl_ht_hw211.mcp" project will use the
Hi Tech PICC18 Compiler to create code for a SBC65EC board (hardware version 2.11) without a bootloader.
When building a project for a board without a bootloader, it basically means that in stead of starting from address 0x800, the code starts from the normal location, address 0.
Compiled (binary) versions of the firmware for all revisions of the SBC65EC are contained in the "../src" folder of the downloaded
source code. The hex file name indicates if it is meant for a board with a bootloader, and the hardware version of the board.
The trailing "_hwx" part of the file name indicates for what hardware version board the file is meant (see below for details on identifying the version number of a board). For example, the "websrvr_mc_hw211.hex" file will be for a hardware V2.11 board. Many hardware versions use the same firmware, so look for a version equal or less than the version of the board. For example, HW2.11, HW2.12 and HW3.01 versions of the SBC65EC all use the HW2.11 firmware.
The following hex files are included for all SBC65EC board versions:
- websrvr_mc_hwx.hex - Hex file for use with bootloader, compiled with the MPLAB C18 compiler.
- websrvr_nobl_mc_hwx.hex - Hex file for use with bootloader, compiled with the MPLAB C18 compiler.
To create any of the above mentioned hex files, open the MPLAB Workspace for that target board, select the required project, and click on the "Build All" toolbar button. This will compile and link the project, and create the hex file.
There are a couple of different hardware versions of the SBC65EC. The current version is HW3.01. The following is a complete list of all version boards, and information how to identify them:
- Hardware HW3.01: Label on front of board with "HW: V3.01". The PCB is marked "SBC65EC REV3". Same as HW2.12, except that a Micro Match connector was added.
- Hardware HW2.12: Label on front of board with "HW: V2.12". Same as HW2.11, except that the I2C pull up resistors were changed from 4k7 to 2k2.
- Hardware HW2.11: Label on front of board with "HW: V2.11". The PCB is marked "SBC65EC REV2", and is assembled with the PIC18F6627 chip. There are two small surface mount resistors soldered onto the back of the board, and space for a 8 pin surface mount chip (Ramtron FRAM). This board is programmed with the bootloader.
- Hardware HW2.01 with bootloader: Label on front of board with "HW: V2.01". The PCB is marked "SBC65EC REV2", and is assembled with the PIC18F6621 chip. There are two small surface mount resistors soldered onto the back of the board, and space for a 8 pin surface mount chip (Ramtron FRAM). This board is programmed with the bootloader.
- Hardware HW2.01 without bootloader: NO Label on front of board! The PCB is marked "SBC65EC REV2", and is assembled with the PIC18F6621 chip. There are two small surface mount resistors soldered onto the back of the board, and space for a 8 pin surface mount chip (Ramtron FRAM).
- Hardware HW1.00 without bootloader: NO Label on front of board! The PCB is marked "SBC65EC REV1", and is assembled with the PIC18F6621 chip. There are NO components on the back of the board.