After introducing the product performance and corresponding package pins of PIC 8-bit microcontroller, I think that beginners need to understand the meaning of each pin symbol before they can further learn and use it. The author makes relevant explanations for this purpose so that beginners can improve together.
1. About I/O port symbols The PIC microcontroller series has the least 8 pins (such as PIC12C5XX and PIC12C6XX), and the most can reach 84 pins (such as PIC17C76X). The number of I/O (input/output) port lines varies according to the different PIC microcontroller product models. The 8-pin package has 6 I/O port lines, while the 84-pin package has up to 66 I/O lines. These port line symbols are numbered in alphabetical order, referred to as A port, B port, C port, D port, E port, F port... Each port is 8 bits, but not necessarily 8 bits. These ports are marked with an R symbol before each port in the package pin diagram. For example, port B is marked as RB0, RB1, RB2...RB7; port E is marked as RE0, RE1...RE7; port G is marked as RG1, RG2...; and for the 8-pin packaged microcontroller, there are 6 I/O lines, and the pin diagram is slightly different from the above, but GP0~GP5. The above lines are all independently programmable bidirectional I/O lines.
2. Pin multiplexing functions and symbols The signal pins of the microcontroller are the embodiment of the external characteristics of the microcontroller. In terms of hardware, users can only use the pins and build a microcontroller system by connecting the pins. The PIC 8-bit microcontroller series is the same as the MCS-51 series microcontrollers. Except for the power supply VDD and VSS, which have a single function, the remaining signal pins often have multiple functions, that is, the multiplexing function of the pins. Common pin symbols and main functions are as follows:
1. MCLR/Vpp Clear (reset) input/programming voltage input. When MCLR is low, the chip is reset. The voltage on this pin cannot exceed VDD, otherwise the test method will be entered. Vpp represents the programming voltage.
2. OSC1/CLKIN oscillator crystal/external clock input.
3. OSC2/CLKOUT Oscillator crystal output terminal. Connect the crystal in crystal oscillation mode and output the signal CLKOUT with 1/4 of OSC1 frequency in RC mode.
4. TOCK1 TMRO counter input terminal, if not used, should be grounded or connected to VDD to reduce functionality.
5. TICK1 TMR1 clock input terminal.
6. TIOSI Oscillation input terminal of TMR1.
7. TIOSO Oscillation output terminal of TMR1.
8. RD, WR, and CS represent the parallel port read signal, write signal, and chip select control line, respectively.
9. AN0~AN7 Analog input terminals for A/D conversion. AN0, AN1, etc. represent the number of channels respectively.
10. CCP Capture/Compare/Pulse Width Modulation (PWM) function terminal. CCP is the abbreviation of Capture/Compare/PWM. Some PIC chips have two CCP components, and their pins are represented by the symbols CCP1 and CCP2.
11. SCK/SCL synchronous serial communication clock input terminal.
12. TX/CK asynchronous communication transmitter/SCI synchronous transmission clock end.
13. SDI/SDA SPI communication data input terminal.
14. SD0 SPI communication data output terminal.
15. RD0/PSP0~RD7/PSP7 D port, bidirectional and programmable, can also be used as a parallel port. When used as a parallel port, it is TTL input, and when used as an I/O port, it is Schmidt input.
The above is the description of the package pin symbols of the PIC 8-bit microcontroller series. In addition, when reading the relevant information about the PIC 8-bit microcontroller, some letter symbols and functions are often encountered, which are also briefly introduced as follows:
1. OTP: One Time Programming. OTP is the abbreviation of One Time Program.
2. RISC is short for Reduced Instruction Set Computer. RISC is the abbreviation of Reduced Instruction Set Computer.
3. SSP Synchronous Serial Port. SSP is the abbreviation of Synchronous Serial Port.
4. SCI Serial Communication Interface. SCI is the abbreviation of Serial Communication Interface.
5. USART Full-duplex universal serial asynchronous receiver and transmitter system. USART is the abbreviation of Universal Serial Aosynchronous Receiver Transmitter.
6. UART Universal Asynchronous Receiver Transmitter.
7. POR Power-on reset function. POR is the abbreviation of Power On Reset.
8. OST Oscillator Start-up Timer. OST is the abbreviation of Oscillator Start-up Timer.
9. PWRT Power-up Delay Timer. PWRT is the abbreviation of Power-up Timer.
10. SFR Special Function Register. SFR is the abbreviation of Special Function Register.
11. PWM Pulse Width Modulator. PWM is the abbreviation of Pulse Width Modulation.
12. MIPS: Millions of instructions can be executed per second. MIPS is the abbreviation of Million Instructions Per Second.
1. Brief description of pins
1. Main power pins Vcc and Vss
Vcc (pin 40): main power supply connected to +5V
Vss (pin 20): ground
2. Clock circuit pins XTAL1 and XTAL2)
XTAL2 (pin 18): Connect to one end of an external crystal oscillator. The chip is the output end of an oscillator circuit inverting amplifier.
XTAL1 (pin 19): Connect to the other end of the external crystal oscillator. The chip is the input end of an oscillator circuit inverting amplifier.
3. Control signals RST/Vpd, ALE/(/PROG),/PSEN and (/EA)/Vpp
RST/Vpd (pin 9): Reset terminal. High level is effective, and the width is more than 24 clock cycles, which resets the microcontroller. This pin has a multiplexing function, and Vpd is the backup power input terminal to prevent the main power from losing power.
ALE/(/PROG) (pin 30): Address latch signal terminal. When accessing the off-chip memory, ALE is used as the latch control signal for the lower eight bits of the address. When the off-chip memory is not accessed, this terminal outputs a fixed pulse at one-sixth of the clock oscillation frequency. The load driving capacity of the ALE terminal is 8 LSTTL gates. This pin has a multiplexing function and is the programming pulse input for programming (curing) the on-chip program memory.
/PSEN (pin 29): external program memory read select signal terminal. Load capacity is 8 LSTTL gates.
(/EA)/Vpp (pin 31): When the /EA terminal is connected to a high level, the CPU automatically fetches instructions from the on-chip program memory to the off-chip program memory. When the /EA terminal is connected to a low level, the CPU only fetches instructions from the off-chip program memory. This pin has a multiplexing function, and Vpp is the programming voltage when programming the on-chip program memory.
4. Input/output pins P0, P1, P2 and P3
P0.0~P0.7 (pins 39~32): used as the lower eight-bit address line and eight-bit data line (multiplexed) when accessing off-chip memory. Load capacity is 8 LSTTL gates.
P1.0~P1.7 (pins 1~8): 8-bit quasi-bidirectional I/O port. Load capacity is 3 LSTTL gates.
P2.0~P2.7 (pins 21~28): serve as the high eight-bit address lines when accessing external memory.
P3.0~P3.7 (pins 10~17): 8-bit quasi-bidirectional I/O port. Load capacity is 3 LSTTL gates. In addition, there is a special second function.
;
2. What is the second function of the P3 port?
P3.0 (pin 10): RXD (serial port input)
P3.1 (pin 11): TXD (serial port output)
P3.2 (pin 12): /INT0 (external interrupt 0 input terminal)
P3.3 (pin 13): /INT1 (external interrupt 1 input)
P3.4 (pin 14): T0 (timer/counter 0 external input terminal)
P3.5 (pin 15): T1 (timer/counter 1 external input terminal)
P3.6 (pin 16): /WR (external data memory write select signal output terminal)
P3.7 (pin 17): /RD (external data memory read select signal output terminal)
3. How to use the /EA pin?
When using the on-chip program memory, /EA is connected to a high level (the off-chip program memory can be used at the same time, and the address of the off-chip program memory is postponed after the address of the on-chip program memory);
When there is no on-chip program memory or the on-chip program memory is not used and only the off-chip program memory is used, /EA is connected to a low level.
Previous article:PIC microcontroller-AD conversion
Next article:PIC18F4520 MCU AD conversion program and comments
- Popular Resources
- Popular amplifiers
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
- Thank you-Chengdu
- TMS570LS erases BANK0
- Condensing exclusive technology - Nichicon's on-board charger solution
- Relationship between 12-pulse rectifier input current harmonics and control angle
- EEWORLD University ---- Haiwell IoT Cloud HMI Quick Start Video Tutorial
- What are IoT programming tools?
- The pipes kept exploding, and finally the power supply was blown away.
- Verilog Golden Reference Guide Chinese Edition
- Analysis of the interface technology circuit of the sensor used in ESP
- 5G infrastructure opens new integration frontiers inside RF chips