PDA

View Full Version : Little "monitor" program



Charles Linquis
- 29th January 2008, 05:51
This is a "Monitor" program that
will READ/WRITE any pin on an 18F8720,18F8720 or
18F8723. It is set up to work with either a 10MHz
crystal and a X4 PLL (40Mhz) or a simple crystal
at 20MHz. The device configuration registers are
read to determine the mode (PLL running or not)
and the chip type. It uses the hardware serial
port, so it needs a MAX232 or equiv.
9600 is used as the baud rate regardless of
whether the chip is running at 20 or 40Mhz.
Vref is set at 4.096V in this hardware, and that
figure is used to convert the COUNTS to volts.
The 8723 has a 12-bit A/D, but that is accounted
for.

If an 'S' is pressed when the port is being
requested, you are asked to enter the PWM freq
The UP and DOWN arrows on the
keyboard change the PWM value. CCP1 is used as
the PWM output. <ESC> breaks out of most routines.
All PAUSES are correct regardless whether it is
running at 20 or 40 Mhz.

Many thanks to Darrel Taylor

Charles Linquis
- 29th January 2008, 05:56
Didn't have attachment. Here it is.