Installation and Operation
2004 Microchip Technology Inc.
DS51523A-page 13
2.3.2
The Embedded System Firmware
The Mixed Signal PICtail™ Demo Board firmware utilizes PICmicro
®
microcontroller
assembly language, Microchip MPASM™ assembler and MPLINK™ linker to build
the.HEX machine file.
MixedSignal_v100.asm
,
DAC_dtmf.asm
,
p16F767.inc
and
MCP492X_16f767i.lkr
files are needed in your project to build the
MixedSignalPICtail.hex
.
MixedSignal_v100.asm
contains the main program and most of the subroutines.
After initialization of critical PICmicro microcontroller peripherals (including the internal
oscillator to 8 Mhz), the main loop polls the four DIP switches to determine the selected
mode of operation. The DIP switches create a 4-bit binary number from 0 to 15. If a
change of mode is detected for 100 ms during 500 ms of scanning, a new mode is
selected and the LEDs are alternately flashed for two seconds. Most of the modes will
time-out and re-scan the DIP switches periodically.
Refer to
Appendix C. “MixedSignal_V100.asm Description”
for the commented
source code further describing each mode.
Modes 0XXX primarily utilize the MCP492X DAC modes:
1.
Mode0000:
Use the DTMF generation subroutine (located in
DAC_dtmf.asm
)
to dial a phone number stored in memory. Analyze output on V
OUTB
or V
OUTD
’s
SMA connector. See
Appendix F. “DTMF Scope Captures”
for resulting
waveform frequency analysis.
2.
Mode0001:
Send 000h and FFFh commands to generate a 100 Hz R-R output
on the MCP492X. Probe V
OUTA
and V
OUTB
to see the resulting waveforms.
3.
Mode0010:
Send 400h and BFFh commands to generate a 100 Hz output on the
MCP492X. Probe V
OUTA
and V
OUTB
to see the resulting waveforms.
4.
Mode0011:
DACA = SHDN, DACB = SHDN, PIC = SLEEP. This mode demon-
strates the low-power nature of the DAC, the PICmicro microcontroller, the op
amp and the LDO. A power cycle is required after the mode switch is changed to
exit this mode.
5.
Mode0100:
DACB and DACA = 800h and Read w/PIC16F767 10b ADC, “broad-
cast on USART”. This mode is useful for evaluating the PICmicro microcontroller’s
ADC. A
IN_B
can be injected with an alternative signal and the result can be
analyzed through the 19200 baud async, 9-bit transmission. Microchip’s Data
View analysis tool, along with the MCP3551 USB evaluation board, provide a
“canned” analysis solution.
6.
Mode0101:
DACB = 801h, DACA = 800h and Read w/MCP3302 13b Dif, “broad-
cast on USART”. This mode is useful for evaluating the MCP3302 or the
MCP3204 ADC. A
IN_B
can be injected with an alternative signal and the result
can be analyzed through the 19200 baud async, 9-bit transmission. Microchip’s
Data View analysis tool, along with the MCP3551 USB evaluation board, provide
a “canned” analysis solution.
7.
Mode0110:
DACB and DACA = 800h and Read w/MCP3551, “broadcast on
USART”. This mode is useful for evaluating the MCP3551 ADC or the MCP1541
V
REF
. A
IN_B
can be injected with an alternative signal and the result can be
analyzed through the 19200 baud async, 9-bit transmission. Microchip’s Data
View analysis tool, along with the MCP3551 USB evaluation board, provide a
“canned” analysis solution.
8.
Mode0111:
Open for user to define their own routine.