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.
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.
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.
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).
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]
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.
QwikBug uses the PIC UART, therefore jumpers must be installed between pins 1&2 on both J108 and J109.
For full QwikBug functionality, J106 must be installed. Note that when J106 is installed, any RS-232 traffic on TX will cause the PIC processor to enter QwikBug. This, along with other QwikBug limitations, may preclude the use of the on-chip UART built into the PIC18F452.
QwikBug relies on features that exist only in the PIC18F family of processors and therefore can not be used with the PIC16F877.
Most of the documentation for QwikLoader is in the comments at the beginning of the source file.
QwikLoader is a derivative of PICloader v1.5 with the following enhancements:
PICLoader was written by Rick Farmer and is available at http://www.dontronics.com/rfarmer.html
QwikLoader uses the UART, so jumpers must be installed between pins 1&2 on both J108 and J109. Also install J107 so that QwikLoader can use CTS to detect when a terminal (or computer) is connected.
Warning: The default configuration for v1.6 enables the watchdog timer. Therefore user applications must service the watchdog timer to keep the processor from resetting. To avoid a watchdog timeout the timer must be cleared (QwikLoader does not work on the 18F452, but QwikBug is a better alternative anyway.clrwdt
) within 7 ms after the user application starts. The user application can reconfigure the watchdog timer so that it does not expire for 1.7 seconds, but the timer can not be disabled by the user application.The default configuration of v1.6 (19200 baud, watchdog enabled, 8k support) is easy to change by modiying the source and re-assembling.
To use WLoader and XWisp, jumpers J107 and J105 must be installed.
Jumpers are also needed between pins 2&3 on both J108 and J109.
When this was written (June 30, 2003), WLoader was only available for the PIC16F877. However the source code is available and it may be possible to modify WLoader to support the PIC18F452 and other processors. The WLoader operation is closely tied to the XWisp program, so it may be necessary to modify XWisp if PIC18F452 support is added to WLoader.
It may be useful to modify this bootloader to check the RE2 signal on reset and branch to the bootloader or the application based on the CTS signal. Other solutions, such as a delay at startup, have been implemented. Search the Web for details.
When using this bootloader, jumpers must be installed between pins 1&2 on both J108 and J109 to connect serial communications to the PIC UART.
$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 |