Skip to main content

The future of AI in business and its potential to transform industries

What are PIC controllers and it's families?

 What are PIC controllers and its families?

Intro for PIC controllers

  • PIC stands for peripheral interface controller.
  • It was manufactured by MICROCHIP TECH CORP in 1993.
  • This controller is used in many application like audio accessories, advance medical devices, automotive industries, controlling home appliances etc.
  • Some PIC families are:
  1. 10xxxx (10 series)
  2. 12xxxx (12 series)
  3. 14xxxx (14 series)
  4. 16xxxx (16 series)
  5. 18xxxx (18 series)
  • In this article, we will see the 18 series PIC i.e. PIC18F4520.

PIC18F4520

  • This controller comes in three packages:
  1. PDIP  (Plastic dual in-line package)
  2. QFN (quad flat no-lead package)
  3. TQFP (thin quad flat package)
different packages of PIC controller


  • The first one is 40 pins (mostly used) while the other two comes with the 44-pins interface.
  • This version of microcontrollers comes with CPU, timer, 10-bit ADC and other peripherals that are mainly used to develop a connection with external devices.

Features

  • No. of pins                                                 40
  • CPU                                                           8bit PIC
  • Operating voltage                                      2 to 5.5V
  • Program memory(ROM)                           32K
  • RAM                                                          1536 bytes
  • EEPROM                                                   256 bytes
  • ADC                                                           10-bit
  • Number of channels                                   13
  • I/O ports                                                      A,B,C,D,E
  • I/O pins                                                       36
  • Packages                                                     PDIP, QFN, TQFP
  • External oscillator                                       Up to 40MHz
  • USART Protocol                                         1
  • I2C Protocol                                                Yes
  • SPI Protocol                                                 Yes
  • Brown-out reset                                            Yes  
  • Watchdog timer                                             Yes
  • Comparators                                                  2
  • Master synchronous serial port(MSSP) module      1
  • Capture/compare/PWM                               16bit/16bit/10bit
  • Power-saving sleep mode                             Yes
  • Selectable Oscillator Option                         Yes
  • Operating high current sink/source               each pin 25mA
  • Programmable high/low voltage detect         Yes

PIN Diagram of PIC18F4520

PIn diagram of PIC 18 series controller

a) Digital Input/Output pins

Port A


Pin               Name

2                    RA0
3                    RA1
4                    RA2
5                    RA3
6                    RA4
7                    RA5
14                  RA6
13                  RA7

Port B

Pin                 Name

33                  RB0
34                  RB1
35                  RB2
36                  RB3
37                  RB4
38                  RB5
39                  RB6
40                  RB7

Port C

Pin                Name

15                  RC0
16                  RC1
17                  RC2
18                  RC3
23                  RC4
24                  RC5
25                  RC6
26                  RC7

Port D

Pin                Name

19                  RD0
20                  RD1
21                  RD2
22                  RD3
27                  RD4
28                  RD5
29                  RD6
30                  RD7

Port E

Pin                Name

8                    RE0
9                    RE1
10                  RE2
1                    RE3

b) Analog Input/Output pins


Pin                Name 

2                    AN0
3                    AN1
4                    AN2
5                    AN3
7                    AN4
8                    AN5
9                    AN6
10                  AN7
35                  AN8
36                  AN9
34                  AN10
37                  AN11
33                  AN12

c) Parallel slave port (PSP) for digital pin

Pin                Name

19                  PSP0
20                  PSP1
21                  PSP2
22                  PSP3
27                  PSP4
28                  PSP5
29                  PSP6
30                  PSP7
8                    RD                     PSP Read control
9                    WR                    PSP Write control
10                  CS                      PSP Chip select control

d) Interrupt on change pin

Pin                Name

37                  KB10
38                  KB11
39                  KB12
40                  KB13

e) External interrupt

Pin                 Name

33                  INT0
34                  INT1
35                  INT2

f) Enhanced CCPI output

Pin                 Name

17                   P1A
28                   P1B
29                   P1C
30                   P1D

g) Crystal oscillator pins

Pin                 Name

13                   OSC1             Crystal Oscillator input pin
14                   OSC2             Crystal Oscillator output pin

h) Oscillator Pins for timer 1

Pin                Name

15                  T1OSO            Oscillator output for timer1
16                  T1OSI              Oscillator input for timer1

i) Capture Pins 

Pin                Name

17                  CCP1                Capture1
16                  CCP2                Capture2

j)  USART pins

Pin                Name

25                  TX                   Asynchronous transmit
26                  RX                   Asynchronous receive
25                  CK                   Synchronous clock
26                  DT                   Synchronous data

k) ICSP programming pins

Pin               Name

38                PGM                  ICSP programming enable pin for low voltage
39                PGC                   ICSP programming clock and input circuit debugger pin    
40                PGD                   ICSP programming data and input circuit debugger pin       
1                  MCLR                ICSP programming enable pin

l) Comparator pins

Pin               Name

6                  C1OUT               Output comparator 1
7                  C2OUT               Output comparator 2

m) SPI Pins

Pin               Name

23                 SD1                    SPI data-IN pin
24                 SD0                    SPI data-OUT pin
18                 SCK                    SPI module serial clock input/output
7                   SS                       Slave select input for SPI

n) I2C Pins

Pin                Name

18                  SCL                   I2C module synchronous serial clock input/output
23                  SDA                   I2C data Input/Output pins

o) Other pins

Pin               Name

1                   Vpp                    Master clear active-low reset pin
32,11            Vdd                    Voltage pin
31,12            Vss                     Ground pin
4                   Vref-                   ADC reference input voltage(low)
5                   Vref+                  ADC reference input voltage(high)
7                   HLVDIN            (high low) detect input for low voltage
33                 FLTO                  Fault input for enhanced CCP1
15                 T13CK1             External clock input for timer1/timer3

Some applications of PIC controllers

  • In audio accessories
  • In advance medical devices
  • In the automotive industries
  • Automating home appliances
  • Electric door lock
  • Remote sensors

Popular posts from this blog

Top 7 domains to expertise after learning python

Top 7 domains to expertise after learning python Python is one of the most popular programming languages. It is an object-oriented, dynamic semantics and high-level programming language. It's high-level built-in data structure combined with dynamic binding and dynamic typing makes it attractive for rapid application development. Often programmers fall in love with python because of the increased productivity it provides. Python is one of the most readable languages in the world right now. This language is very popular among developers and is widely used by many programmers to create application and programs. The implementation of this programming language is simple and at the same time, the language has a very clean structure as compared to other languages.  So if you mastered your python concepts and skills, you can dominate these 7 domains. Machine learning / Artificial intelligence Desktop GUI Data analytics and data visualization  Web development Game development Mobile ap...

Different domains of Artificial intelligence(AI)

Artificial intelligence is a computer system that is able to perform tasks that ordinarily require human intelligence. Artificial intelligence systems are critical for companies that wish to extract value from data by automating and optimizing processes or producing actionable insights. There are certain domains of artificial intelligence on which we can create our expertise Machine learning Deep learning Robotics Expert systems Fuzzy logic Natural language processing Computer vision  1. Machine learning Machine learning is a subset of artificial intelligence. Machine learning enables computers or machines to make data-driven decisions rather than being explicitly programmed for a certain task. These programs or algorithms are designed in a way that they learn and improve over time when are exposed to new data. Different types of machine learning models Supervised learning Unsupervised learning Reinforcement learning Use cases Product recommendation on a shopping website. spam fil...

Top 5 free machine learning courses with certificate

In the era of 21st-century artificial intelligence, machine learning and data science became the most demanding and highest paying skills. After the covid-19 pandemic situation, the working style of the corporate sectors and the business had completely changed, now most of the business deals are made on the basis of data analysis, or when it comes to making the businesses automation the people hire a  machine learning engineer.    Hence it becomes really important for those who work in the corporate sector or a student pursuing a degree to get a job should update himself with these skills.  So, I listed you Top 5 machine learning courses from one of the leading organisations with completion certificates at free of cost. 1. Machine learning in the cloud with AWS batch About This course describes how to run and accelerate your machine learning applications in the cloud using AWS batch. AWS Batch is a fully managed service that allows you to easily and efficiently run b...