Icsp Interface Circuit
Online serial programming icsp is one of the features of the PIC microcontroller.ProgramDirectly burn it into a single-chip microcomputer, and conduct online serial programming and debugging on the single-chip microcomputer.
There are only five lines of the icsp interface circuit, which are VPP, VDD, VSS, PGD, and PGC in sequence. their connection with the PIC microcontroller is as follows:
To ensure the safe and normal operation of icsp, PGD, PGC, and VPP must be completely isolated from other circuits.
USB Interface Circuit
The USB interface diagram in this design is as follows. The pic18f4550 adopts the bus power supply mode. All power supplies of the application come from USB. In the four USB cables, D + and D-are two data cables for USB communication.
The pic18f4550 has a built-in 3.3 V voltage regulator that provides power to the internal transceiver and internal/external pull-up circuits. When using the USB function, you need to set the internal voltage regulator to enable. The external capacitor cusb is added for the stable operation of the PIC microcontroller.
A/D Conversion
The A/D conversion module is integrated into the pic18f4550 and is the main component of the data collection circuit. A 40-pin pic18f4550 built-in analog-to-digital converter with 13 inputs and 10-bit digital output.
I2C bus interface, SPI interface, I/O interface
1) I2C bus
I2C bus is a two-wire serial bus that transmits data between devices connected to the bus through SDA and SCL. Each device is identified based on a unique address and used to connect the microcontroller and its peripheral devices.
2) SPI interface
The SPI bus system is a synchronous serial peripheral interface that enables the microcontroller to communicate with various peripheral devices in serial mode.
3) I/O interface
The above three modules are functions of pic18f4550, which can be used as the input end of the data collection system to transmit external data to the MCU for conversion and processing. Their use expands the data collection function, so that the collected data is not only limited to analog signals, but also can be digital signals collected by sensors, or serial input signals, it can also be a signal of parallel input.
Circuit schematic: