Today, with the increasing requirements for the size, power consumption, and integration of embedded systems, it is becoming increasingly difficult for MCUs with only AD conversion circuits to handle other peripheral analog circuits. Accordingly, some MCU manufacturers have launched MCUs that mix analog circuits, providing designers with new choices. Microchip's PIC16C78X series is one of the 8-bit MCUs. The circuit integrates a general-purpose operational amplifier, an 8-bit DAC converter, an 8-bit ADC converter, a programmable switch mode controller (PSMC), a comparator, and a precision reference voltage in a 20-pin chip. It also has user-programmable low voltage detection, internal oscillator, power-saving sleep mode, and online programming functions.
Hybrid chips that integrate the above analog circuits have a wide range of applications, especially for applications that require closed-loop control. For example, in the design of a power switch control system, the PSMC can be used for switch switching control, the DAC for voltage indication, and the ADC, op amp, and comparator for system monitoring and stability and dynamic characteristics control.
This paper introduces the internal analog circuit resources and instructions used in the PIC16C78 series circuits, and gives typical application examples.
1Internal structure of PIC16C78 series chips
PIC16C78 series chips include 781 and 782. Both have 128b user RAM, can work at up to 20MHz oscillation frequency, have 16 I/O ports, 4MHz internal oscillator, 1 16-bit timer and 1 8-bit timer/watchdog timer. The difference is that 16C781 has 1024×14 bits of OTP program memory, while 16C782 has 2048×14 bits. Figure 1 shows the internal structure and pin definition of 781 and 782. Both have PDIP, SOIC and SSOP packaging, and OTP and MTP programming chips are available.
1.1MicroController — Microcontroller
It is an 8-bit controller. In addition to all the functions of the usual PIC series microcontrollers, it also has RESET and monitoring functions. RESET includes master reset and power-down reset. The master reset includes internal and external (RA5) reset; the power-down reset has 4 voltage setting points. The monitoring function includes watchdog timer and EPROM code protection.
1.2Votage Refference — Reference Voltage (VR)
At 25°C, 5 V, it is accurate to 3.072 V ± 0.7% and is internally connected to the ADC and DAC. It is also available at pin RB0 (with 5 mV source/sink capability).
1.3ADC — Analog-to-Digital Converter
ADC has 8-bit resolution, 8 external input channels (AN7:0), 2 internal input channels (from VR and digital-to-analog output voltage VDAC), and the reference voltage can come from pin AVDD, V, VR or VDAC. After the conversion is completed, the interrupt service is automatically triggered. This module can realize conversion even in SLEEP mode.
1.4 OSCILLATOR — Oscillator
Standard LP, XT, HS and RC oscillators can be used, with the internal INTRC oscillator being selectable at either 4 MHz or 37 kHz.
1.5PAMP — Operational Amplifier
The module has a leakage current input of only 50 nA, has two gain bandwidth products to choose from: 3 MHz and 30 kHz, and has two modes for offset voltage calibration: VOS < 200 μV or select DAC to adjust the output voltage. It can also be selected as a comparator mode.
1.6COMPARATOR — Comparator
PIC16C78X integrates two analog comparators C1 and C2, with four-channel input selection, low input bias voltage and two speed setting properties. The reference source of C1 can be selected as VDAC and VREF1 (RA3), and C2 can be selected as VDAC and VREF2 (RA2). The comparator has two programmable output polarities, unipolar and bipolar, which are output to the register. The interrupt setting of the comparator can be set separately, and the output of C2 can be synchronized to the TIMER1 clock. [page]
1.7PSMC — Programmable Switch Mode Controller
PSMC has two pulse modes (programmable switching frequency 32.5~250 kHz) for selection: PWM (pulse width modulation) and PSM (pulse interval modulation). In PWM mode, analog feedback determines the pulse width. In PSM mode, analog feedback gated pulses can be provided; the pulse frequency is programmable; the output can be selected as single output or complementary dual output, and slope compensation output can also be selected.
1.8DAC — Digital to Analog Converter
The DAC has 8-bit resolution, and its output can be connected to the comparator and ADC internally through programming. When external output is selected, VDAC outputs at RB1 (1 mA source/sink capability), its reference source can come from AVDD, VREF1 or VR, the conversion time is 10 μs, and the conversion error (INL/DNL) is less than 1/2LSB.
In addition to the above internal resources, this series of chips also includes standard TIMER0, enhanced TIMER1 module, and programmable low voltage detection. The standard TIMER0 can read and write 8-bit timer/counter, with optional 8-bit prescaler (shared with WDT), optional external clock input on RA4, and timer overflow interrupt. The enhanced TIMER1 module has a 16-bit timer/counter with 4-bit prescaler, selectable synchronous and asynchronous clock modes, external clock input on T1CK1 on RA6, external clock control, T1G on RB7, and optional CPU LP oscillator when the CPU is in INTRC mode, and timer overflow interrupt can be set. The programmable low voltage detection has 11 voltage levels (2.5~4.5 V), and the voltage level value can be obtained using interrupt or query method.
2 Application of PIC16C78X
2.1 Instructions, simulation and programming download
Like other PIC MCUs, this series of chips uses a reduced instruction set RISC, which uses a total of 35 single-word instructions. Except for program branches that require two cycles, the remaining instructions are single-cycle, and the execution time of each instruction can reach up to 200 ns.
This series of microcontrollers can be programmed and simulated with MPLAB. MPLAB is a cheap PIC series microcontroller development tool. The development environment can use MPLAB (r) IDE, the simulation system can use MPLAB (r) ICD2000, its program generator can use MPLAB (r) C18, the online debugger can use MPLAB (r) ICD, and the PICSTART (r) PLUS burner can be used to burn this series of chips. This chip also has a more convenient compilation software PICDEM (r) MSC1 graphical user interface (GUI), which can automatically set each peripheral function module, verify the user circuit without writing program code, and generate assembly header files to help the development of user code. Users should be reminded that some earlier PIC emulators and programmers do not support this series of chips. This series of chips has online download and offline download functions.
2.2 Application examples in DC/DC
The function of DC/DC is to convert an existing DC voltage into other DC voltages required by the equipment. The DC/DC implemented by 16C782 is shown in Figure 2.
PSMC uses PWM pulse mode. When the FET is turned on, energy is stored in the inductor L. According to the electrical characteristics of the inductor, the current will rise linearly until the FET is turned off. Since the current in the inductor cannot change immediately, when the state of the FET is switched, the current in L continues to flow through the diode and stores energy in the capacitor C.
This will make Vout and Vin have a certain relationship. The maximum value of this circuit can reach Vout=2Vin. The DAC module provides the reference voltage source for the comparator. The digital signal comes from the microcontroller. When the reference voltage is determined, the analog feedback composed of R1 and R2 determines the input voltage at the other end of the comparator, which in turn determines the duty cycle of the pulse signal of the PSMC in PWM mode. When the voltage on R1 is the same as the reference voltage, the comparator triggers the programmable switch mode controller to control the field effect tube through the buffer. The timer TIMER1 in the microcontroller can provide a clock signal that determines the PWM cycle. The entire circuit forms a closed-loop control. As can be seen from Figure 2, the entire circuit uses very few peripheral devices, while the traditional DC/DC circuit design is much more complicated than this circuit.
3 Conclusion
The PIC16C78 series chips are very suitable for circuit design in closed-loop control situations and various microcontroller system designs using general peripheral analog circuits. Utilizing internal analog circuit resources can greatly simplify the design.
References
[1]PIC16C781/782 data sheet[M]. Microchip Technology Inc, 2001
[2]Song JiayouIntegrated Electronic Circuit Design Manual[M]. Fujian: Fujian Science and Technology Press,2002
Previous article:Design of control system for robot's dexterous hand based on PIC microcontroller
Next article:Features and Applications of Configurable Analog Microcontroller PIC16C781/782
Recommended ReadingLatest update time:2024-11-16 18:04
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Help! How to convert assembly language into C language? ? ?
- 【MSP430】Capture mode to measure signal duty cycle
- Short-range wireless positioning technology
- In addition to the cost of electronic components, what other costs are there in hardware product development?
- Questions about the power supply of the communication system
- [Shanghai Hangxin ACM32F070 development board] The second part lights up the LCD screen and operates the touch button functions, serial port, ADC.
- EEWORLD University ---- TE Smart City
- Develop IoT in 10 minutes - Smoke sensor monitoring (Wifi version)
- Hearing aid chips
- Installation of TI C2000 Embedded Code Support Package in Matlab