Presented by
Jabez Winston C
Jagdeesh S
Shibin B
About Microchip
 Microchip Technology is an American manufacturer of
microcontroller, memory and analog semiconductors.
 HQ - Chandler, Arizona
 Wafer Fabs - Tempe, Arizona and Gresham, Oregon
 Assembly/Test facilities - Chachoengsao, Thailand
Competitors to Microchip
 Analog Devices
 Atmel
 Freescale
 Infineon
 Maxim Integrated Products
 NXP Semiconductors
 Renesas Electronics
 STMicroelectronics
 Texas Instruments
PIC architecture
 RISC instruction set
 PIC – Programmable Interface Controller ??
Peripheral Interface Controller ??
Programmable Interface Controller ??
Microchip Microcontroller variants
 8-bit MCUs
 PIC10, PIC12 - 12 bit wide code memory/instruction
 PIC16 - 14 bit wide code memory/instruction
 PIC18 - 8 bit wide code memory / 16 bit instruction
 16-bit MCUs –
 PIC24 -12 bit wide code memory / 24 bit instructions
 dsPIC - 12 bit wide code memory / 24 bit instructions
 32-bit MCUs - PIC32MX, PIC32MZ
 32 bit instruction set
 16 bit instruction set for compact code
Problem
Design a circuit to turn on LED
when voltage is less than 3 V or
greater than 4 V
ADC(Analog to Digital Converter)
 ADC converts physical quanity(usually voltage) to a
digital number.
(for n-bit ADC)
 n-bit ADC can produce value in the range 0 to 2n
Analog Digital
input output
Range: Vref- to Vref+ Range: 0 to 2n
ADC
For example , a 8 bit ADC has +ve voltage reference of 5
V and –ve voltage reference of 0V. What is ADC value
for 2.5 V ?
PIC12F683
 PIC12F683 has 10 bit Successive Approximation ADC.
 Default reference voltages are
 For 3 V , ADC value 
 For 4 V , ADC value 
PIC 12F683 registers
 ANSEL – Configure pins as digital/analog and
A/D conversion clock select
 ADCON0 – Channel , Reference voltage select,etc.,
 ADRESH
 ADRESL ADC Result registers
ANSEL
ADCON0
ADRESH & ADRESL Registers
Left justified result
Right justified result

MPLABX with proteus

  • 1.
    Presented by Jabez WinstonC Jagdeesh S Shibin B
  • 2.
    About Microchip  MicrochipTechnology is an American manufacturer of microcontroller, memory and analog semiconductors.  HQ - Chandler, Arizona  Wafer Fabs - Tempe, Arizona and Gresham, Oregon  Assembly/Test facilities - Chachoengsao, Thailand
  • 4.
    Competitors to Microchip Analog Devices  Atmel  Freescale  Infineon  Maxim Integrated Products  NXP Semiconductors  Renesas Electronics  STMicroelectronics  Texas Instruments
  • 5.
    PIC architecture  RISCinstruction set  PIC – Programmable Interface Controller ?? Peripheral Interface Controller ?? Programmable Interface Controller ??
  • 6.
    Microchip Microcontroller variants 8-bit MCUs  PIC10, PIC12 - 12 bit wide code memory/instruction  PIC16 - 14 bit wide code memory/instruction  PIC18 - 8 bit wide code memory / 16 bit instruction  16-bit MCUs –  PIC24 -12 bit wide code memory / 24 bit instructions  dsPIC - 12 bit wide code memory / 24 bit instructions  32-bit MCUs - PIC32MX, PIC32MZ  32 bit instruction set  16 bit instruction set for compact code
  • 7.
    Problem Design a circuitto turn on LED when voltage is less than 3 V or greater than 4 V
  • 8.
    ADC(Analog to DigitalConverter)  ADC converts physical quanity(usually voltage) to a digital number. (for n-bit ADC)  n-bit ADC can produce value in the range 0 to 2n Analog Digital input output Range: Vref- to Vref+ Range: 0 to 2n ADC
  • 9.
    For example ,a 8 bit ADC has +ve voltage reference of 5 V and –ve voltage reference of 0V. What is ADC value for 2.5 V ?
  • 10.
  • 11.
     PIC12F683 has10 bit Successive Approximation ADC.  Default reference voltages are  For 3 V , ADC value   For 4 V , ADC value 
  • 12.
    PIC 12F683 registers ANSEL – Configure pins as digital/analog and A/D conversion clock select  ADCON0 – Channel , Reference voltage select,etc.,  ADRESH  ADRESL ADC Result registers
  • 13.
  • 14.
  • 15.
    ADRESH & ADRESLRegisters Left justified result
  • 16.