MEEPS CPU

Rev. C (ECPE 5 version)
J. Dunmire
February 27, 2003

Reference Documents:

Introduction

MEEPS has four (4) sections: Detailed descriptions of each section can be view by clicking on the associated link above.

The CPU section is the core of the Modular Embedded Experimenter's PIC System (MEEPS). The CPU section encompasses the CPU, either a PIC18F452 or a PIC16F877, interfaces for loading firmware in to the CPU, simple status LEDs, and an expansion connector to connect to MEEPS daughter boards.

The remainder of this document describes the subsections of the CPU, configuration options, and variations from the requirements.

CPU

The CPU section has been designed to support either the PIC18F452 or the PIC16F877 (other Microchip 40 pin CPUs may also work) with several bootloader and debug options.

Power and LEDs

Beginning at the top left of the schematic is the power supply for the MEEPS CPU. The CPU section requires a DC voltage between 3 and 5.5 volts. The requirement for 2 volt operation was not possible due to the lack of a suitable RS-232 buffer (U102).

The MEEPS CPU is protected from reversed power input by R111 and D105. R111 is a thermistor based resettable fuse. It will not trip for currents less than 500 mA and will trip for currents >1A. If power is reversed, then D105 will be forward biased and will draw the maximum current available from the external powersupply until R111 trips. R111 is a Bourns Model MF-R050. See the datasheet for more details.

A switch, S102, allows the power to be turned on and off without disconnecting the external power supply. LED D106 indicates that power is on.

There are five (5) LEDs on the CPU section. All are high efficiency types and are associated with current limiting resistors that limit the current to <2 mA when a 5 volt power supply is used.

LEDs D101 - D104 are connected to port C of the PIC processor, U101. The LEDs will turn on when the associated signal line is low.

RESET

The reset pin, U101-1 (MCLR/VPP), has multiple uses which complicates the reset circuit. There are also multiple sources of reset.

Notice that the reset circuit does not include a RC component. Therefore VCC must rise quickly (>0.05V/ms, see Section 3.1 of the PIC18FXX2 datasheet). The RC component has been omitted because it conflicts with the In-Circuit Serial Programming functionality which requires VPP to have a fast rise and fall time.

MCLR is held high by R106 and is pulled low to reset the PIC processor. A blocking diode, D107, protects the reset of the circuit from the programming voltage, VPP, which can be as high as 13 volts.

A manual reset can be generated by pressing S103. To suppress voltage spikes below VSS (GND), R105 has been included per the recommendations of Section 22 of the PIC18FXX2 datasheet.

A remote reset can be generated by the DTR signal on the RS-232 port (J102). The XWisp program uses DTR to reset the processor (16F877) and force entry into the WLoader program. J105 allows the Remote Reset to be disabled when other programs (such as terminal emulators) are used to communicate with the MEEPS. J105 should also be removed when using ICSP through J101 since VPP would conflict with the output from U102 (DTRD).

WARNING: For reliable operation, you must remove J105 when using the Microchip MPLAB ICD2 debugger. The ICD2 debugger will appear to work with J105 install, but it will frequently hang.

RS-232 Interface

Jumpers J108 to J111 configure the serial port (J102) for use with QwikBug, QwikLoader, or WLoader. The CTS and RTS signals on J102 are used as a secondary serial channel, rather than handshaking signals. The RX and TX signals constitue the primary serial channel and the CTS and RTS signals the secondary serial channel. A custom cable could be constructed to provide separate connectors for each channel (and then you would not have to move the jumpers).

RX is pulled high by R108 to enable WLoader to determine the RS-232 signals are connected to a remote device. Normally (by RS-232 convention) RX would be pulled low by the 5k resistor built into the input buffers of U102. When a computer is connected to J102 the RX signal will be driven low by the computer. When a reset occurs, WLoader checks the state of the RX signal. If the signal is high then WLoader jumps to the application program (if present). If the signal is low (indicating that a computer is present) then WLoader continues to execute and look for commands from the computer.

U102 is a RS-232 signal buffer with built-in switching power supplies that provide the +/- voltage levels required by RS-232. The pin-out is common to several devices, both generic and low voltage (3v).

Oscillator

The oscillator is composed of X101, C106, and C107. The capacitors can be omitted when a ceramic oscillator is used for X101. X101 frequency is 20MHz for WLoader and QwikLoader. QwikBug assumes a 10MHz clock.
Good News! QwikBug works just fine at 20MHz. The only visible effects are that the serial port runs at 38400 MHz rather than 19200 and the startup delay is 1 second instead of 2. [jed Sept. 19, 2003]

In-Circuit Debugging support

J101 is a 6 pin modular connector that is wired for use with the MPLAB ICD 2 in-circuit debugger ( ICD2) from Microchip. J101 can also be used for in-circuit serial programming (ICSP).

Expansion

Daughter boards are connected to the CPU section through the 40 pin header, J103. All of the signals from U101 are available except for the OSC pins (13 and 14). The OSC pins have not been connected to protect the system clock from stray capacitance and interference from devices on the daughter boards.

Daughter boards may draw power through pins 18, 20, 21, and 23 of J103 provided that the total current requirements of the CPU section and the daughter board do not exceed 500 mA.

The following signals should be used with caution since they have may interfere with programming or debugging.

Boot Loaders / Monitors

The CPU section of the MEEPS has been designed with the following bootloaders and monitors in mind:

Display and Basic I/O

Sensor and Control Board

Remote Sensor and Control

$Date: 2008-10-21 19:17:34 $
$Revision: 1.10 $
$Source: /home/cvsroot/MEEPSTop/hardware/cpu.html,v $
Contact me by email: jedunmire at gmail.com