Principle and Application of PIC16C78 Series Mixed Signal Embedded Chips

Publisher:Tiger8Latest update time:2012-02-10 Source: 现代电子技术Keywords:PIC  MCU  DC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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 JiayouIntegrated Electronic Circuit Design Manual[M]. Fujian: Fujian Science and Technology Press,2002

Keywords:PIC  MCU  DC Reference address:Principle and Application of PIC16C78 Series Mixed Signal Embedded Chips

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

Introduction to the characteristics of various types of MCS-51 series microcontrollers
MCS is the series symbol for the microcontrollers produced by Intel, for example, Intel's MCS-48, MCS-51, and MCS-96 series of microcontrollers. The MCS-51 series of microcontrollers was developed by Intel in the early 1980s on the basis of the MCS-48 series. It is the first mainstream variety of microcontrollers that
[Microcontroller]
Non-isolated AC/DC step-down converter for smart meters
Central topics: Basic Buck Converter Working principle of drive circuit Current Limiting and Soft Switching Offline devices such as smart meters or power monitors have some electronic components that require non-isolated DC power under 10W. Until now, the only practica
[Power Management]
Non-isolated AC/DC step-down converter for smart meters
Minimizing Power Consumption in Battery-Powered Microcontroller Systems
       Today's portable product designs have some conflicting requirements for the batteries used. For example, more product features increase power consumption, and users also want longer battery life. However, the shrinking product size and cost constraints prevent the battery capacity from increasing. Therefore, sav
[Microcontroller]
Minimizing Power Consumption in Battery-Powered Microcontroller Systems
Single chip microcomputer detection AC power failure program (digital segment switch)
There is a controller called digital segment switch in lighting accessories. The basic working principle is to use the wall switch to turn on and off the power to realize the turn-on and turn-off of multiple loads. This involves how the single-chip microcomputer detects the loss of AC power. First, the synchronization
[Microcontroller]
Single chip microcomputer detection AC power failure program (digital segment switch)
51 microcontroller uart communication protocol
  51 microcontroller   51 microcontroller is the collective name for all microcontrollers compatible with the Intel 8031 ​​instruction system. The ancestor of this series of microcontrollers is Intel's 8004 microcontroller. Later, with the development of Flash rom technology, the 8004 microcontroller made great progre
[Microcontroller]
51 microcontroller uart communication protocol
Enhancing time-of-flight mass spectrometer performance with low-noise, high-speed ADCs
Summary Time-of-flight mass spectrometry (TOF MS) has become a vital instrument in many field applications, especially in bacterial identification in clinical microbiology laboratories, where it plays an irreplaceable role. The core of TOF MS is a low-noise, high-speed analog-to-digital converter (ADC). This articl
[Analog Electronics]
Enhancing time-of-flight mass spectrometer performance with low-noise, high-speed ADCs
MCU communication protocol
Now most of the instruments and equipment require to be operated by the host computer software, which is convenient for debugging and operation. This involves the communication process. In the actual production of several devices, the author summarized the general writing method of the communication program, including
[Microcontroller]
DC-UPS principle circuit
DC-UPS principle circuit Figure 4 DC-UPS principle circuit The principle circuit designed according to the scheme shown in Figure 3 is shown in Figure 4. The main design basis is as follows: (1) Since the output stage requires four simultaneous outputs and different voltage values, a DC/DC converter must be add
[Power Management]
DC-UPS principle circuit
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号