PIC-MAXI-WEB development board
Users Manual
Rev.B, April 2009
Copyright(c) 2009, OLIMEX Ltd, All rights reserved
Page 1
INTRODUCTION:
This board allows you to easily develop Ethernet connectivity applications.
It has everything you normally would need for such applications: power
relays which you can command through web interface, LCD display which
will display messages you fill in web forms, analogue inputs for connection
to sensors, digital optoisolated inputs, trimmer potentiometer, temperature
sensor, Ethernet connector. With this board you can easily automate your
home and then control and monitor it from any point in the world via
Internet. An extension connector is available so you can connect custom
made hardware to the board. The PIC18F97J60 has 128KB Flash program
memory and there is external 1Mbit (128KB) flash memory for data storage.
The on board DC/DC converter makes this board very tolerant to the
external power supply which could be in 9-25V DC or 7-18V AC range. The
bridge rectifier on the input allows AC and DC adapters to be used and
makes power supply polarity problems go away.
BOARD FEATURES:
PIC18F97J60 microcontroller with embedded Ethernet MAC
and PHY and 128KB Flash programming space
1Mbit on board serial flash for web pages storage
ICSP/ICD connector for programming and debugging with PICICD2 and PIC-ICD2-POCKET.
Temperature sensor
Trimmer potentiometer connected to analogue input
Two relays 10A/250VAC
Four optoisolated digital inputs
Twelve analogue inputs on terminal block
Two buttons
LCD16x2 with backlight
RS232 interface
Ethernet interface
Complete web server and TCP-IP stack support as per
Microchip's open source TCP-IP stack
Terminal block for power supply works with 9-25 VDC power
supply
Extension header to connect to other boards
Dimensions 120x108 mm (4.72x4.25")
ELECTROSTATIC WARNING:
The PIC-MAXI-WEB board is shipped in protective anti-static packaging.
The board must not be subject to high electrostatic potentials. General
practice for working with static sensitive devices should be applied when
working with this board.
BOARD USE REQUIREMENTS:
Cables:
Depends on the used programming/debugging tool. It could
be 1.8 meter USB A-B cable to connect PIC-ICD2-POCKET or PIC-ICD2 to
USB host on PC or RS232 cable for PIC-ICD2-TINY and PIC-ICD2. You will
Page 2
need a serial cable if not for programming, than for configuring the board.
You will also need a LAN cable.
Hardware:
Programmer/Debugger –Olimex programmers are applicable,
for example PIC-ICD2, PIC-ICD2-POCKET, PIC-ICD2-TINY or
other compatible programming/debugging tool.
!!!Warning!!! When you want to program this microcontroller with PICICD2, PIC-ICD2-POCKET or PIC-ICD2-TINY, before
connecting the programmer to your target board, you should
first connect the programmer to your computer and open
MPLAB. There, first from menu Configure – Select Device –
choose the microcontroller you are about to program, then from
menu Programmer – Select Programmer – choose MPLAB ICD
2, wait while MPLAB is downloading operation system, and
after ICD2 is connected – check in menu Programmer –
Settings – Power – there is option – Power target circuit from
MPLAB ICD 2 – this option should be forbidden, you could not
select it. Now it is safe to connect the programmer to your
target board.
Software:
PIC-WEB is tested with MPLAB IDE v.7.62 + MPLAB C18 C
compiler. It is possible that the stack might not function
properly if used with later versions of MPLAB IDE.
You will also need a terminal program configured at 19 200
bps, 8N1 and no flow control.
PROCESSOR FEATURES:
PIC-MAXI-WEB board use MCU PIC18F97J60 from Microchip with these
features:
- IEEE 802.3 compatible Ethernet Controller
- Integrated MAC and 10Base-T PHY
- 8-Kbyte Transmit/Receive Packet Buffer SRAM
- Supports One 10Base-T Port
- Programmable Automatic Retransmit on Collision
- Programmable Padding and CRC Generation
- Programmable Automatic Rejection of Erroneous Packets
- Activity Outputs for 2 LED Indicators
- Buffer:
o Configurable transmit/receive buffer size
o Hardware-managed circular receive FIFO
o Byte-wide random and sequential access
o Internal DMA for fast memory copying
o Hardware assisted checksum calculation for various protocols
- MAC:
o Support for Unicast, Multicast and Broadcast packets
o Programmable Pattern Match of up to 64 bytes within packet at
user-defined offset
o Programmable wake-up on multiple packet formats
- PHY:
Page 3
-
-
-
-
o Wave shaping output filter
Selectable System Clock derived from Single 25 MHz External Source:
o 2.778 to 41.667 MHz
Internal 31 kHz Oscillator
Secondary Oscillator using Timer1 @ 32 kHz
Fail-Safe Clock Monitor:
o Allows for safe shutdown if oscillator stops
Two-Speed Oscillator Start-up
Address Capability of up to 2 Mbytes for External Memory Bus
8-Bit or 16-Bit Interface
2-Bit, 16-Bit and 20-Bit Addressing modes
High-Current Sink/Source: 25 mA/25 mA on PORTB and PORTC
Five Timer modules (Timer0 to Timer4)
Four External Interrupt pins
Two Capture/Compare/PWM (CCP) modules
Three Enhanced Capture/Compare/PWM (ECCP) modules:
o One, two or four PWM outputs
o Selectable polarity
o Programmable dead time
o Auto-shutdown and auto-restart
Up to Two Master Synchronous Serial Port (MSSP) modules supporting
SPI (all 4 modes) and I2C™ Master and Slave modes
Up to Two Enhanced USART modules:
o Supports RS-485, RS-232 and LIN 1.2
o Auto-wake-up on Start bit
o Auto-Baud Detect (ABD)
10-Bit, Up to 16-Channel Analog-to-Digital Converter module (A/D):
o Auto-acquisition capability
o Conversion available during Sleep
Dual Analog Comparators with Input Multiplexing
Parallel Slave Port (PSP) module (100-pin devices only)
5.5V Tolerant Inputs (digital-only pins)
Low-Power, High-Speed CMOS Flash Technology:
o Self-reprogrammable under software control
C compiler Optimized Architecture for Reentrant Code
Power Management Features:
o Run: CPU on, peripherals on
o Idle: CPU off, peripherals on
o Sleep: CPU off, peripherals off
Priority Levels for Interrupts
8 x 8 Single-Cycle Hardware Multiplier
Extended Watchdog Timer (WDT):
o Programmable period from 4 ms to 134s
Single-Supply 3.3V In-Circuit Serial Programming™ (ICSP™) via Two
Pins
In-Circuit Debug (ICD) with 3 Breakpoints via Two Pins
Operating Voltage Range of 2.35V to 3.6V (3.1V to 3.6V using Ethernet
module)
On-Chip 2.5V Regulator
Page 4
BLOCK DIAGRAM:
Page 5
MEMORY MAP:
Page 6
Page 7
SCHEMATIC:
R11
R16
0.68
R22
0.68
R12
+5V
U1
MC34063AP1/ACN_MBR
R28
3k/1%
C11
1000uF/6.3V/8mm
L2
D1
CL150uH/SW68
5
FB
U3
MC34063AP1/ACN_MBR
C23
R26
3.0k/1%
PWR_LED
RED
1000uF/6.3V/8mm
470pF
470pF
2
3.3V_E
1
2
1
7
8
VSS
SC
SE
+
C47
TC
1N5819
+
+
5
FB
3
C24
220u/25V
IS
DC
6
L3
CL150uH/SW68
4
C46
2
5V_E
1
2
D7
SC
SE
1N5819
TC
VSS
IS
DC
+
3
C48
220u/25V
VCC
PWR-2
1
7
8
6
B-DIL3
3.3V
0.68
0.68
VCC
G1
4
PWR-1
R27
1k/1%
R15
330
R29
1.8k/1%
R57
0
3.3V
U2
5
6
7
8
69
68
67
57
B2
EXT-26
EXT-25
B1
D_IN3
EXT-24
PGC
PGD
RB0/INT0/FLT0
RB1/INT1
RB2/INT2
RB3/INT3/ECCP2(1)/P2A(1)
RB4/KBI0
RB5/KBI1
RB6/KBI2/PGC
RB7/KBI3/PGD
C14
33pF
29
3.3V
R36
1M
Q1
25MHz
R44
T PINT PIN+
73
74
T POUT T POUT +
77
78
R42
2k/1%
ENVREG
63
64
C20
33pF
RST
3.3V
OSC1/CLKI
OSC2/CLKO
TPOUTTPOUT+
NC
RBIAS
13
C39
RE0/AD8/#RD/P2D
RE1/AD9/#WR/P2C
RE2/AD10/#CS/P2B
RE3/AD11/P3C(2)
RE4/AD12/P3B(2)
RE5/AD13/P1C(2)
RE6/AD14/P1B(2)
RE7/AD15/ECCP2(1)/P2A(1)
TPINTPIN+
9
80
270/1%
RD0/AD0/PSP0
RD1/AD1/PSP1
RD2/AD2/PSP2
RD3/AD3/PSP3
RD4/AD4/PSP4/SDO2
RD5/AD5/PSP5/SDI2/SDA2
RD6/AD6/PSP6/SCK2/SCL2
RD7/AD7/PSP7/#SS2
RF0/AN5
RF1/AN6/C2OUT
RF2/AN7/C1OUT
RF3/AN8
RF4/AN9
RF5/AN10/CVREF
RF6/AN11
RF7/#SS1
#MCLR
16
VDDCORE/VCAP
100nF
C40
17
37
59
62
86
100nF
C28
C29
C32
C33
C34
100nF
100nF
100nF
100nF
100nF
VDD
VDD1
VDD2
VDD3
VDD4
15
36
40
60
65
85
VSS
VSS1
VSS2
VSS3
VSS4
VSS5
76
75
3.3V
C35
C36
100nF
100nF
79
72
C37
VSSTX
VSSRX
VSSPLL
C49
47uF/6.3V
KG
AY
KY
T PIN+
7
6
T PIN8
LEDB
R5
49.9/1%
R6
49.9/1%
R8
#SS2
LAN
1:1
TD+
TCT
TDAG
KG
AY
KY
RD+
RCT
RD-
75
75
GREEN
YELLOW
1:1
75
75
1nF/2kV
1
4
5
2
IN1-1
180
2
R37
0
R60
4.7k
R30
T3
BC846
LIGHT_LCD
7
8
9
10
11
12
13
14
VO
RS
R/W
E
4
5
6
A
DB0
DB1
DB2
DB3
DB4
DB5
DB6
DB7
1.5K
R31
10K
EXT-16
K
_RS
R/W
E
NA
NA
NA
NA
NA
NA
1
SCK
2
SI
3
CS
4
NA
R1
100k
#SS1
EXT-10
EXT-9
EXT-8
EXT-7
EXT-6
EXT-5
EXT-4
EXT-3
EXT-1
EXT-2
C41
C42
C43
NA
NA
NA
C44
1
LED2
red
LD1
LD0
RED
yellow
R53
330
R54
330
R55
330
6
IN3-1
D4
1N4148
+
C50
AN_TR
10K
10uF/6.3V
AIN2
330
BUT1
C1+
C1V-
14
7
13
8
T1OUT
T2OUT
R1IN
R2IN
4
D_IN1
330
3
T1IN
T2IN
R1OUT
R2OUT
1 C16
3
100n
4 C17
5
100n
11
10
T XD
12
9
RXD
U4PWR
16
VCC
3.3V
C15
100n
+5V
RAS-05-15
REL1
LED5
green
R43
10K
D8
1N4148
1
4
2
3
R50
D_IN2
330
R33
OUT 1
OUT1-3
R35
1k
R18
Q3
BC817
1k
10K
LED4
red
R40
OUT1-1
+5V
1
4
2
3
R51
D_IN3
330
OPT4
330
D5
1N4148
R39
RAS-05-15
REL2
LED6
green
10K
D6
1N4148
1
4
2
3
R52
330
D_IN4
R41
10K
OUT 2
R13
10K
B1
330
BUT2
330
C51
C30
C12
10uF/6.3V
100n
100n
Q4
BC817
R10
10K
PIC-MAXI-WEB
R20
10K
R14
R2
1k
3.3V
R25
R21
B2
RST
330
C31
100n
Page 8
RST
OUT2-3
R9
1k
REL2
H11A817SMD
3.3V
OUT1-2
R47
10K
H11A817SMD
100nF
3.3V
+
AIN3
R48
OPT3
330
IN3-2
R23
10K
330
C2
100n
V+
15GND
H11A817SMD
LED3
red
R34
IN4-2
R19
5
C2-
C1
TH1
TERMISTOR
6
C2+
1
2
3
4
5
6
7
8
9
RED
OPT2
D3
1N4148
IN4-1
3.3V
/WP/
U4
ST3232
2
C18
100n
C19
100n
RS232
DB9_female
NA
LD2
OPT1
330
CON62.54-0-D
3.3V
VCC
/CS/
E
R/W
RS
X5-1
X5-2
X6-1
X6-2
X6-3
2
R32
IN2-1
RST
PGD
PGC
/RESET/
7
REL1
3.3V
1
2
3
4
5
6
GND
EXT-11
49
50
66
61
47
48
58
39
M ISO
8
SO
SCK
LIGHT _LCD
E
R/W
RS
99
100
1
2
27
26
25
24
MOSI
H11A817SMD
ICSP
3.3V
#SS2
16
AT45DB011
D_IN2
LIGHT _LCD
OUT 2
OUT 1
D2
1N4148
IN1-2
3
7
8
6
15
U5
C3 C4 C5 C6 C7 C8 C13
EXT-15
EXT-14
EXT-13
EXT-12
330
IN2-2
3
R59
4.7k
DB0
DB1
DB2
DB3
DB4
DB5
DB6
DB7
X1-2
X2-1
X2-2
X3-1
X3-2
X4-1
X4-2
#SS1
71
70
52
51
14
11
10
38
100nF
1
R49
opt
DB[0..7],RS,R/W,E,LIGHT _LCD
12
28
23
22
21
20
19
18
LED1
red
R17
RJLD-043TC
C10
R58
3
10k
DB0
DB1
DB2
DB3
DB4
DB5
DB6
DB7
4
3
98
97
96
95
94
93
C25
100nF
RJ45 SIDE
3
#SS1/#SS2
EXT-23
EXT-22
EXT-21
EXT-20
EXT-19
EXT-18
EXT-17
R38
opt
CONT RAST
3.3V
49.9/1%
T POUT + 1
T POUT - 2
LEDA AG
R24
10K
92
91
90
89
88
87
84
83
+5V
R3
R4
CS
15pF
100nF
49.9/1%
2
15pF
Q2
PIC18F97J60
C9
ferrite bead
R7
AVSS
100nF
C27
32768/6pF C26
D_IN1
SCK
MISO
3.3V
MOSI
T XD
RXD
GN D
3.3V
L1
180
AVDD
31
C38
+
3.3V
3.3V
30
AVDD
RJ0/ALE
RJ1/#OE
RJ2/#WRL
RJ3/#WRH
RJ4/BA0
RJ5/#CE
RJ6/#LB
RJ7/#UB
VDDPLL
82
100nF
R56
270
RH0/A16
RH1/A17
RH2/A18
RH3/A19
RH4/AN12/P3C(2)
RH5/AN13/P3B(2)
RH6/AN14/P1C(2)
RH7/AN15/P1B(2)
VDDTX
VDDRX
81
3.3V
RG0/ECCP3/P3A
RG1/TX2/CK2
RG2/RX2/DT2
RG3/CCP4/P3D
RG4/CCP5/P1D
RG5
RG6
RG7
44
43
53
54
55
56
45
46
3.3V
NA
RC0/T1OSO/T13CKI
RC1/T1OSI/ECCP2(1)/P2A(1)
RC2/ECCP1/P1A
RC3/SCK1/SCL1
RC4/SDI1/SDA1
RC5/SDO1
RC6/TX1/CK1
RC7/RX1/DT1
VDD
R46
100k
C45
RA0/LEDA/AN0
RA1/LEDB/AN1
RA2/AN2/VREFRA3/AN3/VREF+
RA4/T0CKI
RA5/AN4
1
R45
100k
X1-1
35
34
33
32
42
41
LEDA
LEDB
AIN2
AIN3
D_IN4
AIN4
VSS
3.3V
Rev. B
COPYRIGHT(C) 2009, Olimex Ltd.
http://www.olimex.com/dev
OUT2-2
OUT2-1
BOARD LAYOUT:
POWER SUPPLY CIRCUIT:
PIC-MAXI-WEB can take power only from power connector PWR, where (912) VDC or (6-9) VAC external voltage source has to be applied.
The board power consumption is about 200 mA with all peripherals and
MCU running at full speed, relays and LEDs on and working Ethernet
connection.
RESET CIRCUIT:
PIC-MAXI-WEB reset circuit is made with RC group R20 – 10k and C31 –
100nF. Serial resistor R21 – 330Ω is used to prevent fast C31 charge and
discharge when PIC18F97J60 is being programmed.
Manual reset is possible by the RESET button.
CLOCK CIRCUIT:
Quartz crystal 25MHz is connected to PIC18F97J60 pins OSC1 (CLK1) and
OSC2 (CLKO). Internal PLL circuit can multiply this frequency up to
41MHz.
32.768 KHz quartz crystal is connected to PIC18F97J60 pins T1SO and
T1OSI for its internal Timer1.
Page 9
JUMPER DESCRIPTION:
5V_E
enables 5V supply for LCD and relays.
Default state closed (shorted).
3.3V_E
enables 3.3V supply for PIC18F97J60 and all other devices.
Default state closed (shorted). 3.3V is also available to EXT-1,
so if you
want to connect external backup battery to the
PIC18F97J60 this jumper
should be opened and the external
battery to be connected to EXT-1 pin.
#SS1/#SS2
chip select for U5 (AT45DB011) serial flash. Default position is
selected to be #SS2 in compatibles with Microchip
software but user can
change it in its own application.
Default state closed (shorted)
INPUT/OUTPUT:
Two User buttons with names BUT1 and BUT2 – connected to
PIC18F97J60 pin 8 RB3/INT3/ECCP2(1)/P2A(1) and pin 6 RB1/INT1;
One analog trimmer AN_TR – connected to PIC18F97J60 pin 33
RA2/AN2/VREF-;
Thermistor TH1– connected to PIC18F97J60 pin 32 RA2/AN2/VREF+;
Three LEDs – LD0 (yellow) – connected to PIC18F97J60 pin 49 RJ0/ALE ,
LD1 (red) – connected to PIC18F97J60 pin 50 RJ1/#OE, LD2 (red) –
connected to PIC18F97J60 pin 66 RJ2/#WRL;
Four opto isolated digital inputs IN1-IN4;
Four red LEDs – LED1, LED2, LED3, LED4 for every digital input;
Two green LEDs – LED5, LED6 – for the relays;
Power supply red LED with name PWR_LED – indicates that 3.3V power
supply is available
Twelve analog inputs X1-X6;
LCD Display - SC1602A - 16 characters x 2 lines.
Page 10
EXTERNAL CONNECTOR DESCRIPTION:
ICSP:
Pin #
PGD
PGC
Signal Name
1
RST
2
VCC
3
GND
4
PGD
5
PGC
6
NC
I/O
Program Data. Serial data for programming.
Input Program Clock. Clock used for transferring the serial data (output from
ICSP, input for the MCU).
RS232:
Pin #
TXD
RXD
Signal Name
1
NC
2
TXD
3
RXD
4
NC
5
GND
6
NC
7
NC
8
NC
9
NC
OutputTransmit Data. This is the asynchronous serial data output (RS232) for the
shift register on the UART controller.
Input Receive Data. This is the asynchronous serial data input (RS232) for the
shift register on the UART controller.
Page 11
X(1÷6)-CONNECTORS
Pin #
Signal Name
1
AIN4
2
AIN5
3
AIN6
4
AIN7
5
AIN8
6
AIN9
7
AIN10
8
AIN11
9
AIN12
10
AIN13
11
AIN14
12
AIN15
13
GND
These are the 12 analog inputs.
IN(1÷4)-CONNECTORS
Pin #
Signal Name
1
IN1+
2
IN1-
3
IN2+
4
IN2-
5
IN3+
6
IN3-
7
IN4+
8
IN4These are the 4 opto isolated digital inputs.
Page 12
EXT:
Pin #
Signal Name
Pin #
Signal Name
1
VCC
2
GND
3
RJ7/#UB
4
RJ6/#LB
5
RJ5/#CE
6
RJ4/BA0
7
RJ3/#WRH
8
RJ2/#WRL
9
RJ1/#OE
10
RJ0/ALE
11
RH3/A19
12
PG3/CCP4/P3D
13
RG2/RX2/DT2
14
RG1/TX2/CK2
15
RG0/ECCP3/P3A
16
RF7/#SS1
17
RD6/AD6/PSP6/SCK2/SCL2
18
RD5/AD5/PSP5/SDI2/SDA2
19
RD4/AD4/PSP4/SDO2
20
RD3/AD3/PSP3
21
RD2/AD2/PSP2
22
RS1/AD1/PSP1
23
RD0/AD0/PSP0
24
RB5/KBI1
25
RB0/INT0/FLT0
26
RB2/INT2
Page 13
LAN:
Pin #
Signal Name Chip Side
Pin #
Signal Name Chip Side
1
TPOUT+
5
Not Connected (NC)
2
TPOUT-
6
Not Connected (NC)
3
3.3V
7
TPIN+
4
Not Connected (NC)
8
TPIN-
LED
Color
Usage
Right
Yellow
Activity
Left
Green
100MBits/s (Half/Full duplex)
RELAYS:
Pin #
Signal Name
1
Normal Open
2
Common
3
Normal Close
Page 14
PWR:
Pin #
Signal Name
1
AC in 1
2
AC in 2
Page 15
MECHANICAL DIMENSIONS:
All measures are in mm.
Page 16
AVAILABLE DEMO SOFTWARE:
You could find information about PIC-MAXI-WEB board, Microchip TCP/IP
stack and how to change and configure the software in Understanding PIC WEB boards on
www.olimex.com/dev.
Page 17
ORDER CODE:
PIC-MAXI-WEB – assembled and tested (no kit, no soldering required)
How to order?
You can order to us directly or by any of our distributors.
Check our web www.olimex.com/dev for more info.
All boards produced by Olimex are RoHS compliant
Revision history:
REV.A
- created July 2008
REV B
- created April 2009
Page 18
Disclaimer:
© 2009 Olimex Ltd. All rights reserved. Olimex®, logo and combinations thereof, are
registered trademarks of Olimex Ltd. Other terms and product names may be trademarks of
others.
The information in this document is provided in connection with Olimex products. No
license, express or implied or otherwise, to any intellectual property right is granted by this
document or in connection with the sale of Olimex products.
Neither the whole nor any part of the information contained in or the product described in
this document may be adapted or reproduced in any material from except with the prior
written permission of the copyright holder.
The product described in this document is subject to continuous development and
improvements. All particulars of the product and its use contained in this document are
given by OLIMEX in good faith. However all warranties implied or expressed including but
not limited to implied warranties of merchantability or fitness for purpose are excluded.
This document is intended only to assist the reader in the use of the product. OLIMEX Ltd.
shall not be liable for any loss or damage arising from the use of any information in this
document or any error or omission in such information or any incorrect use of the product.
Page 19