MikroElektronika white logo
  • Products
    • Click Boards
      • Wireless Connectivity
        • GPS/GNSS
        • GSM/LTE
        • LTE IoT
        • BT/BLE
        • WiFi
        • RFID/NFC
        • GSM+GPS
        • 6LoWPAN
        • ZigBee
        • UWB
        • SigFox
        • Sub-1 GHz Transceievers
        • 2.4 GHz Trancevers
        • LoRa
        • WiFi+BLE
      • Sensors
        • Biometrics
        • Gas
        • Magnetic
        • Motion
        • Optical
        • Pressure
        • Proximity
        • Temperature & humidity
        • Current sensor
        • Miscellaneous
        • Environmental
        • Force
        • Inductance
        • RF meter
        • Click Shields
        • Click Bundles
      • Interface
        • Adapter
        • CAN
        • Port expander
        • RS485
        • USB
        • 1-Wire
        • RS232
        • Ethernet
        • LIN
        • PWM
        • Current
        • DALI
        • I2C
        • Fiber optics
        • SPI
        • DMX
        • CXPI
        • Click Shields
        • Click Bundles
      • Display & LED
        • LED Drivers
        • LED Matrix
        • LED Segment
        • OLED
        • LCD
        • TFT
        • Click Shields
        • Click Bundles
      • Miscellaneous
        • Relay
        • Optocoupler
        • ID
        • Proto
        • Encryption
        • Click Shields
        • Click Bundles
      • Mixed Signal
        • ADC
        • Measurements
        • DAC
        • Digital potentiometer
        • ADC-DAC
        • Click Shields
        • Click Bundles
      • Storage
        • EEPROM
        • FLASH
        • FRAM
        • microSD
        • MRAM
        • SRAM
        • EERAM
        • ReRAM
        • DRAM
        • Click Shields
        • Click Bundles
      • Motor Control
        • Brushed
        • Brushless
        • Servo
        • Stepper
        • Click Shields
        • Click Bundles
      • Audio & Voice
        • Amplifier
        • Microphone
        • Speakers
        • Signal Processing
        • Speech recognition
        • FM
        • MP3
        • Click Shields
        • Click Bundles
      • HMI
        • Capacitive
        • Pushbutton/Switches
        • Potentiometers
        • Rotary encoder
        • Haptic
        • Fingerprint
        • Click Shields
        • Click Bundles
      • Clock & Timing
        • RTC
        • Clock generator
        • Click Shields
        • Click Bundles
      • Power Management
        • Battery charger
        • Boost
        • Buck
        • Linear
        • Buck-Boost
        • Wireless Charging
        • Power Switch
        • USB-C PD
        • Click Shields
        • Click Bundles
      • Click Bundles
      • Click Shields
    • NECTO
      • NECTO Studio
    • Compilers
      • PIC
        • C
          • NECTO Studio
          • mikroC PRO for PIC
        • Basic
          • mikroBasic PRO for PIC
        • Pascal
          • mikroPascal PRO for PIC
        • Additional Software
          • CODEGRIP WiFi license
          • CODEGRIP SSL license
          • Visual TFT
          • Visual TFT AI
          • Visual GLCD
          • Package Manager
          • mikroBootloader
          • CAN calculator
          • GLCD Font Creator
          • Timer Calculator
          • MikroPlot
      • dsPIC/PIC24
        • C
          • NECTO Studio
          • mikroC PRO for dsPIC
        • Basic
          • mikroBasic PRO for dsPIC
        • Pascal
          • mikroPascal PRO for dsPIC
        • Additional Software
          • CODEGRIP WiFi license
          • CODEGRIP SSL license
          • Visual TFT
          • Visual GLCD
          • Package Manager
          • mikroBootloader
          • CAN calculator
          • GLCD Font Creator
          • Timer Calculator
          • MikroPlot
      • PIC32
        • C
          • NECTO Studio
          • mikroC PRO for PIC32
        • Basic
          • mikroBasic PRO for PIC32
        • Pascal
          • mikroPascal PRO for PIC32
        • Additional Software
          • CODEGRIP WiFi license
          • CODEGRIP SSL license
          • Visual TFT
          • Visual GLCD
          • Package Manager
          • mikroBootloader
          • CAN calculator
          • GLCD Font Creator
          • Timer Calculator
          • MikroPlot
      • ARM
        • C
          • NECTO Studio
          • mikroC PRO for ARM
        • Basic
          • mikroBasic PRO for ARM
        • Pascal
          • mikroPascal PRO for ARM
        • Additional Software
          • CODEGRIP WiFi license
          • CODEGRIP SSL license
          • Visual TFT
          • Visual TFT AI
          • Visual GLCD
          • Package Manager
          • mikroBootloader
          • CAN calculator
          • GLCD Font Creator
          • Timer Calculator
          • MikroPlot
      • AVR
        • C
          • NECTO Studio
          • mikroC PRO for AVR
        • Basic
          • mikroBasic PRO for AVR
        • Pascal
          • mikroPascal PRO for AVR
        • Additional Software
          • CODEGRIP WiFi license
          • CODEGRIP SSL license
          • Visual TFT
          • Visual GLCD
          • Package Manager
          • mikroBootloader
          • CAN calculator
          • GLCD Font Creator
          • Timer Calculator
          • MikroPlot
      • FT90x
        • C
          • mikroC PRO for FT90x
        • Basic
          • mikroBasic PRO for FT90x
        • Pascal
          • mikroPascal PRO for FT90x
        • Additional Software
          • CODEGRIP WiFi license
          • CODEGRIP SSL license
          • Visual TFT
          • Visual GLCD
          • Package Manager
          • mikroBootloader
          • CAN calculator
          • GLCD Font Creator
          • Timer Calculator
          • MikroPlot
      • 8051
        • C
          • mikroC PRO for 8051
        • Basic
          • mikroBasic PRO for 8051
        • Pascal
          • mikroPascal PRO for 8051
        • Additional Software
          • CODEGRIP WiFi license
          • CODEGRIP SSL license
          • Visual TFT
          • Visual GLCD
          • Package Manager
          • mikroBootloader
          • CAN calculator
          • GLCD Font Creator
          • Timer Calculator
          • MikroPlot
    • Dev Boards
      • PIC (8-bit)
        • 8th Generation
          • Fusion for PIC v8
          • EasyPIC PRO v8
          • EasyPIC PRO v8 over USB-C
          • EasyPIC v8
          • EasyPIC v8 over USB-C
          • UNI-DS v8
          • UNI-DS v8 over USB-C
        • 7th Generation
          • EasyPIC PRO v7a
          • PICPLC16 v7a
          • EasyPIC v7a
          • EasyPIC PRO v7
          • EasyPIC v7
        • 6th Generation
          • PICPLC16 v6
      • dsPIC/PIC24 (16-bit)
        • 8th Generation
          • EasyPIC v8 PIC24/dsPIC33
          • EasyPIC v8 for dsPIC30
          • EasyPIC v8 for dsPIC30 over USB-C
          • Fusion for PIC v8
          • UNI-DS v8
          • UNI-DS v8 over USB-C
        • 7th Generation
          • EasyPIC Fusion v7
          • EasyPIC v7 for dsPIC30
        • 6th Generation
          • Easy24-33 v6
      • PIC32 (32-bit)
        • 8th Generation
          • Fusion for PIC32
          • Fusion for PIC32 over USB-C
          • Fusion for PIC v8
          • UNI-DS v8
          • UNI-DS v8 over USB-C
        • 7th Generation
          • EasyPIC Fusion v7
      • ARM (32-bit)
        • 8th Generation
          • Fusion for ARM v8
          • Fusion for ARM v8 over USB-C
          • Fusion for STM32 v8
          • Fusion for STM32 over USB-C
          • Fusion for KINETIS v8
          • Fusion for Kinetis v8 over USB-C
          • Fusion for TIVA v8
          • Fusion for TIVA v8 over USB-C
          • UNI-DS v8
          • UNI-DS v8 over USB-C
        • 7th Generation
          • EasyMx PRO v7a STM32
          • EasyMx PRO v7 STM32
          • EasyMx PRO v7 Tiva
      • AVR (8-bit)
        • 8th Generation
          • EasyAVR v8
          • EasyAVR PRO v8
          • EasyAVR PRO v8 over USB-C
          • UNI-DS v8
          • UNI-DS v8 over USB-C
        • 7th Generation
          • EasyAVR v7
        • 6th Generation
          • AVRPLC16 v6
      • 8051 (8-bit)
        • 7th generation
          • BIG8051
        • 6th Generation
          • Easy8051 v6
      • PSoC (8-bit)
        • 6th Generation
          • UNI-DS6 Development System
      • RISC-V (32bit)
        • 8th Generation
          • UNI-DS v8
          • UNI-DS v8 over USB-C
      • Universal Boards
        • 8th Generation
          • UNI-DS v8
          • UNI-DS v8 over USB-C
          • Fusion for PIC v8
          • Fusion for ARM v8
        • 7th Generation
          • EasyPIC Fusion v7
        • 6th Generation
          • UNI-DS6
          • mikroBoard for PIC 80-pin
          • mikroBoard for AVR
          • mikroBoard for dsPIC
          • mikroBoard for PSoC
          • mikroBoard for 8051
          • mikroBoard for PIC 40-pin
          • mikroBoard for ARM
          • mikroBoard for ARM 144-pin
      • IoT - Wearable
        • Hexiwear
          • Hexiwear
          • Hexiwear Power User Pack
          • Hexiwear Docking Station
          • Hexiwear Battery Pack
          • Hexiwear Color Pack
          • Hexiwear Workstation
      • Analog Boards
        • 7th Generation
          • Analog System Lab Kit PRO
    • Starter Boards
      • PIC (8-bit)
        • Clicker
          • PIC clicker
        • Clicker 2
          • Clicker 2 for PIC18FJ
          • Clicker 2 for PIC18FK
        • Clicker 4
          • Clicker 4 for PIC18F
          • UNI Clicker
        • Ready
          • Ready for PIC Board
          • Ready for PIC (DIP28)
          • PIC-Ready2 Board
          • MMC Ready Board
        • StartUSB
          • StartUSB for PIC
      • dsPIC/PIC24 (16-bit)
        • Clicker 2
          • Clicker 2 for PIC24
          • Clicker 2 for dsPIC33
        • Clicker 4
          • UNI Clicker
        • Ready
          • dsPIC-Ready1 Board
          • dsPIC-Ready2 Board
          • DsPIC-Ready3 Board
          • dsPIC-Ready4 Board
      • PIC32 (32-bit)
        • Clicker
          • PIC32MX clicker
          • 6LoWPAN Clicker
          • PIC32MZ clicker
        • Clicker 2
          • Clicker 2 for PIC32MX
          • Clicker 2 for PIC32MZ
        • Clicker 4
          • UNI Clicker
        • MINI
          • MINI-32 Board
          • MINI-32 for PIC32MZ
        • Flip&Click
          • Flip&Click PIC32MZ
      • ARM (32-bit)
        • Clicker
          • RA4M1 Clicker
          • Kinetis Clicker
          • MSP432 Clicker
          • CEC1702 clicker
          • CEC1302 Clicker
          • STM32 M4 clicker
        • Clicker 2
          • Clicker 2 for STM32
          • Clicker 2 for Kinetis
          • Clicker 2 for CEC1702
          • Clicker 2 for MSP432
          • Clicker 2 for CEC1302
          • Clicker 2 for PSoC 6
        • Clicker 4
          • Clicker 4 for STM32F745VG
          • Clicker 4 for STM32F4
          • Clicker 4 for TMPM3H
          • Clicker 4 for TMPM4K
          • Clicker 4 for STM32
          • UNI Clicker
        • MINI
          • MINI-M4 for STM32
          • MINI-M4 For Kinetis
          • MINI-M4 for Tiva
          • MINI-M4 for Stellaris
          • MINI-M4 for MSP432
          • MINI-M0 for STM32
        • Flip&Click
          • Flip&Click SAM3X
      • AVR (8-bit)
        • Clicker 4
          • UNI Clicker
        • MINI
          • MINI-AT Board - 3.3V
          • MINI-AT Board - 5V
        • Ready
          • Ready for AVR Board
          • Ready For XMEGA
          • mikroXMEGA Board
          • AVR-Ready2 Board
        • StartUSB
          • StartUSB for AVR
      • 8051 (8-bit)
        • Ready
          • 8051-Ready Board
      • FT90x (32-bit)
        • Clicker 2
          • Clicker 2 for FT90x
      • Miscellaneous
        • USB
          • USB Wizard
          • Quail
          • FlowPaw Kit
      • Universal Boards
        • Clicker 4
          • UNI Clicker
    • Prog-Debug
      • PIC (8-bit)
        • CODEGRIP
          • UNI CODEGRIP
          • UNI CODEGRIP - USB-C
          • CODEGRIP for PIC
          • CODEGRIP for PIC USB-C
        • mikroProg
          • mikroProg for PIC
      • dsPIC/PIC24 (16-bit)
        • CODEGRIP
          • UNI CODEGRIP
          • UNI CODEGRIP - USB-C
          • CODEGRIP for PIC
        • mikroProg
          • mikroProg for dsPIC
      • PIC32 (32-bit)
        • CODEGRIP
          • UNI CODEGRIP
          • UNI CODEGRIP - USB-C
          • CODEGRIP for PIC
          • CODEGRIP for PIC USB-C
        • mikroProg
          • mikroProg for PIC32
      • ARM (32-bit)
        • CODEGRIP
          • UNI CODEGRIP
          • UNI CODEGRIP USB-C
          • CODEGRIP for ARM
          • CODEGRIP for ARM USB-C
          • CODEGRIP for STM32
          • CODEGRIP for KINETIS
          • CODEGRIP for Tiva
          • CODEGRIP for Tiva USB-C
        • mikroProg
          • mikroProg for STM32
          • mikroProg for Tiva
          • mikroProg for Kinetis
          • mikroProg for CEC
          • mikroProg for MSP432
          • mikroProg for PSoC 5LP
      • AVR (8-bit)
        • CODEGRIP
          • CODEGRIP for AVR
          • CODEGRIP for AVR - USB-C
          • UNI CODEGRIP
          • UNI CODEGRIP - USB-C
        • mikroProg
          • mikroProg for AVR
      • 8051 (8-bit)
        • mikroProg
          • mikroProg for 8051
      • FT90x (32-bit)
        • mikroProg
          • mikroProg for FT90x
    • Smart Displays
      • 2.8"
        • ARM (32-bit)
        • AVR (8-bit)
        • dsPIC/PIC24 (16-bit)
        • PIC (8-bit)
        • PIC32 (32-bit)
      • 3.5"
        • ARM (32-bit)
        • FT90x (32-bit)
        • PIC (8-bit)
        • PIC32 (32-bit)
      • 4.3"
        • ARM (32-bit)
        • FT90x (32-bit)
        • PIC (8-bit)
        • PIC32 (32-bit)
      • 5"
        • ARM (32-bit)
        • FT90x (32-bit)
        • PIC32 (32-bit)
      • 7"
        • ARM (32-bit)
        • FT90x (32-bit)
    • MCU Cards
      • PIC (8-bit)
        • 8th Generation
        • 7th Generation
        • 6th Generation
      • dsPIC/PIC24 (16-bit)
        • 8th Generation
        • 7th Generation
        • 6th Generation
      • PIC32 (32-bit)
        • 8th Generation
        • 7th Generation
      • ARM (32-bit)
        • 8th Generation
        • 7th Generation
      • AVR (8-bit)
        • 8th Generation
      • RISC-V (32bit)
        • 8th Generation
    • Accessories
      • TFT Displays
      • LCD Displays
      • LED Displays
      • E-Paper Displays
      • Sensors
      • Headers and Connectors
      • Wire Jumpers and Cables
      • Antennas
      • Batteries
      • RFID/NFC
      • Proto
      • Motors
      • Storage
      • Power
      • Adapters
      • Interface
      • Input/Output
      • Miscellaneous
      • FANware
      • MCUs
      • Books
    • Kits
      • PIC Kits
      • dsPIC/PIC24 Kits
      • PIC32 Kits
      • ARM Kits
      • AVR Kits
      • FT90x Kits
      • 8051 Kits
  • Shop
  • EmbeddedWiki
  • Support
    • Helpdesk
    • Contact us
    • Forum
    • LibStock
    • Learn
    • Let's make
    • Books
  • Services
    • Planet Debug
    • Design Service
    • Product Customization
    • Contract Manufacturing
    • Premium Technical Support
  • News
  • My profile
  • Privacy settings
  • Activity
  • Sign out

Your shoppingcart is empty.
Continue shopping.

MikroElektronika white logo
  • Products
    • click boards icon Click Boards
      • Wireless Connectivity
        • GPS/GNSS
        • GSM/LTE
        • LTE IoT
        • BT/BLE
        • WiFi
        • RFID/NFC
        • GSM+GPS
        • 6LoWPAN
        • ZigBee
        • UWB
        • SigFox
        • Sub-1 GHz Transceievers
        • 2.4 GHz Trancevers
        • LoRa
        • WiFi+BLE
      • Sensors
        • Biometrics
        • Gas
        • Magnetic
        • Motion
        • Optical
        • Pressure
        • Proximity
        • Temperature & humidity
        • Current sensor
        • Miscellaneous
        • Environmental
        • Force
        • Inductance
        • RF meter
        • Click Shields
        • Click Bundles
      • Interface
        • Adapter
        • CAN
        • Port expander
        • RS485
        • USB
        • 1-Wire
        • RS232
        • Ethernet
        • LIN
        • PWM
        • Current
        • DALI
        • I2C
        • Fiber optics
        • SPI
        • DMX
        • CXPI
        • Click Shields
        • Click Bundles
      • Display & LED
        • LED Drivers
        • LED Matrix
        • LED Segment
        • OLED
        • LCD
        • TFT
        • Click Shields
        • Click Bundles
      • Miscellaneous
        • Relay
        • Optocoupler
        • ID
        • Proto
        • Encryption
        • Click Shields
        • Click Bundles
      • Mixed Signal
        • ADC
        • Measurements
        • DAC
        • Digital potentiometer
        • ADC-DAC
        • Click Shields
        • Click Bundles
      • Storage
        • EEPROM
        • FLASH
        • FRAM
        • microSD
        • MRAM
        • SRAM
        • EERAM
        • ReRAM
        • DRAM
        • Click Shields
        • Click Bundles
      • Motor Control
        • Brushed
        • Brushless
        • Servo
        • Stepper
        • Click Shields
        • Click Bundles
      • Audio & Voice
        • Amplifier
        • Microphone
        • Speakers
        • Signal Processing
        • Speech recognition
        • FM
        • MP3
        • Click Shields
        • Click Bundles
      • HMI
        • Capacitive
        • Pushbutton/Switches
        • Potentiometers
        • Rotary encoder
        • Haptic
        • Fingerprint
        • Click Shields
        • Click Bundles
      • Clock & Timing
        • RTC
        • Clock generator
        • Click Shields
        • Click Bundles
      • Power Management
        • Battery charger
        • Boost
        • Buck
        • Linear
        • Buck-Boost
        • Wireless Charging
        • Power Switch
        • USB-C PD
        • Click Shields
        • Click Bundles
      • Click Bundles
      • Click Shields
    • necto icon NECTO
      • NECTO Studio
    • compilers icon Compilers
      • PIC
        • C
          • NECTO Studio
          • mikroC PRO for PIC
        • Basic
          • mikroBasic PRO for PIC
        • Pascal
          • mikroPascal PRO for PIC
        • Additional Software
          • CODEGRIP WiFi license
          • CODEGRIP SSL license
          • Visual TFT
          • Visual TFT AI
          • Visual GLCD
          • Package Manager
          • mikroBootloader
          • CAN calculator
          • GLCD Font Creator
          • Timer Calculator
          • MikroPlot
      • dsPIC/PIC24
        • C
          • NECTO Studio
          • mikroC PRO for dsPIC
        • Basic
          • mikroBasic PRO for dsPIC
        • Pascal
          • mikroPascal PRO for dsPIC
        • Additional Software
          • CODEGRIP WiFi license
          • CODEGRIP SSL license
          • Visual TFT
          • Visual GLCD
          • Package Manager
          • mikroBootloader
          • CAN calculator
          • GLCD Font Creator
          • Timer Calculator
          • MikroPlot
      • PIC32
        • C
          • NECTO Studio
          • mikroC PRO for PIC32
        • Basic
          • mikroBasic PRO for PIC32
        • Pascal
          • mikroPascal PRO for PIC32
        • Additional Software
          • CODEGRIP WiFi license
          • CODEGRIP SSL license
          • Visual TFT
          • Visual GLCD
          • Package Manager
          • mikroBootloader
          • CAN calculator
          • GLCD Font Creator
          • Timer Calculator
          • MikroPlot
      • ARM
        • C
          • NECTO Studio
          • mikroC PRO for ARM
        • Basic
          • mikroBasic PRO for ARM
        • Pascal
          • mikroPascal PRO for ARM
        • Additional Software
          • CODEGRIP WiFi license
          • CODEGRIP SSL license
          • Visual TFT
          • Visual TFT AI
          • Visual GLCD
          • Package Manager
          • mikroBootloader
          • CAN calculator
          • GLCD Font Creator
          • Timer Calculator
          • MikroPlot
      • AVR
        • C
          • NECTO Studio
          • mikroC PRO for AVR
        • Basic
          • mikroBasic PRO for AVR
        • Pascal
          • mikroPascal PRO for AVR
        • Additional Software
          • CODEGRIP WiFi license
          • CODEGRIP SSL license
          • Visual TFT
          • Visual GLCD
          • Package Manager
          • mikroBootloader
          • CAN calculator
          • GLCD Font Creator
          • Timer Calculator
          • MikroPlot
      • FT90x
        • C
          • mikroC PRO for FT90x
        • Basic
          • mikroBasic PRO for FT90x
        • Pascal
          • mikroPascal PRO for FT90x
        • Additional Software
          • CODEGRIP WiFi license
          • CODEGRIP SSL license
          • Visual TFT
          • Visual GLCD
          • Package Manager
          • mikroBootloader
          • CAN calculator
          • GLCD Font Creator
          • Timer Calculator
          • MikroPlot
      • 8051
        • C
          • mikroC PRO for 8051
        • Basic
          • mikroBasic PRO for 8051
        • Pascal
          • mikroPascal PRO for 8051
        • Additional Software
          • CODEGRIP WiFi license
          • CODEGRIP SSL license
          • Visual TFT
          • Visual GLCD
          • Package Manager
          • mikroBootloader
          • CAN calculator
          • GLCD Font Creator
          • Timer Calculator
          • MikroPlot
    • dev boards icon Dev Boards
      • PIC (8-bit)
        • 8th Generation
          • Fusion for PIC v8
          • EasyPIC PRO v8
          • EasyPIC PRO v8 over USB-C
          • EasyPIC v8
          • EasyPIC v8 over USB-C
          • UNI-DS v8
          • UNI-DS v8 over USB-C
        • 7th Generation
          • EasyPIC PRO v7a
          • PICPLC16 v7a
          • EasyPIC v7a
          • EasyPIC PRO v7
          • EasyPIC v7
        • 6th Generation
          • PICPLC16 v6
      • dsPIC/PIC24 (16-bit)
        • 8th Generation
          • EasyPIC v8 PIC24/dsPIC33
          • EasyPIC v8 for dsPIC30
          • EasyPIC v8 for dsPIC30 over USB-C
          • Fusion for PIC v8
          • UNI-DS v8
          • UNI-DS v8 over USB-C
        • 7th Generation
          • EasyPIC Fusion v7
          • EasyPIC v7 for dsPIC30
        • 6th Generation
          • Easy24-33 v6
      • PIC32 (32-bit)
        • 8th Generation
          • Fusion for PIC32
          • Fusion for PIC32 over USB-C
          • Fusion for PIC v8
          • UNI-DS v8
          • UNI-DS v8 over USB-C
        • 7th Generation
          • EasyPIC Fusion v7
      • ARM (32-bit)
        • 8th Generation
          • Fusion for ARM v8
          • Fusion for ARM v8 over USB-C
          • Fusion for STM32 v8
          • Fusion for STM32 over USB-C
          • Fusion for KINETIS v8
          • Fusion for Kinetis v8 over USB-C
          • Fusion for TIVA v8
          • Fusion for TIVA v8 over USB-C
          • UNI-DS v8
          • UNI-DS v8 over USB-C
        • 7th Generation
          • EasyMx PRO v7a STM32
          • EasyMx PRO v7 STM32
          • EasyMx PRO v7 Tiva
      • AVR (8-bit)
        • 8th Generation
          • EasyAVR v8
          • EasyAVR PRO v8
          • EasyAVR PRO v8 over USB-C
          • UNI-DS v8
          • UNI-DS v8 over USB-C
        • 7th Generation
          • EasyAVR v7
        • 6th Generation
          • AVRPLC16 v6
      • 8051 (8-bit)
        • 7th generation
          • BIG8051
        • 6th Generation
          • Easy8051 v6
      • PSoC (8-bit)
        • 6th Generation
          • UNI-DS6 Development System
      • RISC-V (32bit)
        • 8th Generation
          • UNI-DS v8
          • UNI-DS v8 over USB-C
      • Universal Boards
        • 8th Generation
          • UNI-DS v8
          • UNI-DS v8 over USB-C
          • Fusion for PIC v8
          • Fusion for ARM v8
        • 7th Generation
          • EasyPIC Fusion v7
        • 6th Generation
          • UNI-DS6
          • mikroBoard for PIC 80-pin
          • mikroBoard for AVR
          • mikroBoard for dsPIC
          • mikroBoard for PSoC
          • mikroBoard for 8051
          • mikroBoard for PIC 40-pin
          • mikroBoard for ARM
          • mikroBoard for ARM 144-pin
      • IoT - Wearable
        • Hexiwear
          • Hexiwear
          • Hexiwear Power User Pack
          • Hexiwear Docking Station
          • Hexiwear Battery Pack
          • Hexiwear Color Pack
          • Hexiwear Workstation
      • Analog Boards
        • 7th Generation
          • Analog System Lab Kit PRO
    • starter boards icon Starter Boards
      • PIC (8-bit)
        • Clicker
          • PIC clicker
        • Clicker 2
          • Clicker 2 for PIC18FJ
          • Clicker 2 for PIC18FK
        • Clicker 4
          • Clicker 4 for PIC18F
          • UNI Clicker
        • Ready
          • Ready for PIC Board
          • Ready for PIC (DIP28)
          • PIC-Ready2 Board
          • MMC Ready Board
        • StartUSB
          • StartUSB for PIC
      • dsPIC/PIC24 (16-bit)
        • Clicker 2
          • Clicker 2 for PIC24
          • Clicker 2 for dsPIC33
        • Clicker 4
          • UNI Clicker
        • Ready
          • dsPIC-Ready1 Board
          • dsPIC-Ready2 Board
          • DsPIC-Ready3 Board
          • dsPIC-Ready4 Board
      • PIC32 (32-bit)
        • Clicker
          • PIC32MX clicker
          • 6LoWPAN Clicker
          • PIC32MZ clicker
        • Clicker 2
          • Clicker 2 for PIC32MX
          • Clicker 2 for PIC32MZ
        • Clicker 4
          • UNI Clicker
        • MINI
          • MINI-32 Board
          • MINI-32 for PIC32MZ
        • Flip&Click
          • Flip&Click PIC32MZ
      • ARM (32-bit)
        • Clicker
          • RA4M1 Clicker
          • Kinetis Clicker
          • MSP432 Clicker
          • CEC1702 clicker
          • CEC1302 Clicker
          • STM32 M4 clicker
        • Clicker 2
          • Clicker 2 for STM32
          • Clicker 2 for Kinetis
          • Clicker 2 for CEC1702
          • Clicker 2 for MSP432
          • Clicker 2 for CEC1302
          • Clicker 2 for PSoC 6
        • Clicker 4
          • Clicker 4 for STM32F745VG
          • Clicker 4 for STM32F4
          • Clicker 4 for TMPM3H
          • Clicker 4 for TMPM4K
          • Clicker 4 for STM32
          • UNI Clicker
        • MINI
          • MINI-M4 for STM32
          • MINI-M4 For Kinetis
          • MINI-M4 for Tiva
          • MINI-M4 for Stellaris
          • MINI-M4 for MSP432
          • MINI-M0 for STM32
        • Flip&Click
          • Flip&Click SAM3X
      • AVR (8-bit)
        • Clicker 4
          • UNI Clicker
        • MINI
          • MINI-AT Board - 3.3V
          • MINI-AT Board - 5V
        • Ready
          • Ready for AVR Board
          • Ready For XMEGA
          • mikroXMEGA Board
          • AVR-Ready2 Board
        • StartUSB
          • StartUSB for AVR
      • 8051 (8-bit)
        • Ready
          • 8051-Ready Board
      • FT90x (32-bit)
        • Clicker 2
          • Clicker 2 for FT90x
      • Miscellaneous
        • USB
          • USB Wizard
          • Quail
          • FlowPaw Kit
      • Universal Boards
        • Clicker 4
          • UNI Clicker
    • prog-debug icon Prog-Debug
      • PIC (8-bit)
        • CODEGRIP
          • UNI CODEGRIP
          • UNI CODEGRIP - USB-C
          • CODEGRIP for PIC
          • CODEGRIP for PIC USB-C
        • mikroProg
          • mikroProg for PIC
      • dsPIC/PIC24 (16-bit)
        • CODEGRIP
          • UNI CODEGRIP
          • UNI CODEGRIP - USB-C
          • CODEGRIP for PIC
        • mikroProg
          • mikroProg for dsPIC
      • PIC32 (32-bit)
        • CODEGRIP
          • UNI CODEGRIP
          • UNI CODEGRIP - USB-C
          • CODEGRIP for PIC
          • CODEGRIP for PIC USB-C
        • mikroProg
          • mikroProg for PIC32
      • ARM (32-bit)
        • CODEGRIP
          • UNI CODEGRIP
          • UNI CODEGRIP USB-C
          • CODEGRIP for ARM
          • CODEGRIP for ARM USB-C
          • CODEGRIP for STM32
          • CODEGRIP for KINETIS
          • CODEGRIP for Tiva
          • CODEGRIP for Tiva USB-C
        • mikroProg
          • mikroProg for STM32
          • mikroProg for Tiva
          • mikroProg for Kinetis
          • mikroProg for CEC
          • mikroProg for MSP432
          • mikroProg for PSoC 5LP
      • AVR (8-bit)
        • CODEGRIP
          • CODEGRIP for AVR
          • CODEGRIP for AVR - USB-C
          • UNI CODEGRIP
          • UNI CODEGRIP - USB-C
        • mikroProg
          • mikroProg for AVR
      • 8051 (8-bit)
        • mikroProg
          • mikroProg for 8051
      • FT90x (32-bit)
        • mikroProg
          • mikroProg for FT90x
    • smart displays icon Smart Displays
      • 2.8"
        • ARM (32-bit)
        • AVR (8-bit)
        • dsPIC/PIC24 (16-bit)
        • PIC (8-bit)
        • PIC32 (32-bit)
      • 3.5"
        • ARM (32-bit)
        • FT90x (32-bit)
        • PIC (8-bit)
        • PIC32 (32-bit)
      • 4.3"
        • ARM (32-bit)
        • FT90x (32-bit)
        • PIC (8-bit)
        • PIC32 (32-bit)
      • 5"
        • ARM (32-bit)
        • FT90x (32-bit)
        • PIC32 (32-bit)
      • 7"
        • ARM (32-bit)
        • FT90x (32-bit)
    • mcu cards icon MCU Cards
      • PIC (8-bit)
        • 8th Generation
        • 7th Generation
        • 6th Generation
      • dsPIC/PIC24 (16-bit)
        • 8th Generation
        • 7th Generation
        • 6th Generation
      • PIC32 (32-bit)
        • 8th Generation
        • 7th Generation
      • ARM (32-bit)
        • 8th Generation
        • 7th Generation
      • AVR (8-bit)
        • 8th Generation
      • RISC-V (32bit)
        • 8th Generation
    • accessories icon Accessories
      • TFT Displays
      • LCD Displays
      • LED Displays
      • E-Paper Displays
      • Sensors
      • Headers and Connectors
      • Wire Jumpers and Cables
      • Antennas
      • Batteries
      • RFID/NFC
      • Proto
      • Motors
      • Storage
      • Power
      • Adapters
      • Interface
      • Input/Output
      • Miscellaneous
      • FANware
      • MCUs
      • Books
    • kits icon Kits
      • PIC Kits
      • dsPIC/PIC24 Kits
      • PIC32 Kits
      • ARM Kits
      • AVR Kits
      • FT90x Kits
      • 8051 Kits
  • Shop
  • EmbeddedWiki
  • Support
    • Helpdesk
    • Contact us
    • Forum
    • LibStock
    • Learn
    • Let's make
    • Books
  • Services
    • Planet Debug
    • Design Service
    • Product Customization
    • Contract Manufacturing
    • Premium Technical Support
  • News
  • Price :

    More info
Reset filter
  • 0
Authentication
Account

Create account

Forgot your password?

Your cart is empty !
View cart ( )
  1. Home
  2. ebooks
  3. PIC Microcontrollers - Programming in C
  4. ccp-modules
MikroElektronika books

3.7 CCP Modules

 

The CCP module (Capture/Compare/PWM) is a peripheral which allows the user to time and control different events.

Capture Mode provides access to the current state of a register which constantly changes its value. In this case, it is the timer TMR1 register. Compare Mode constantly compares values of two registers. One of them is the timer TMR1 register. This circuit also allows the user to trigger an external event when a predetermined amount of time has expired. PWM (Pulse Width Modulation) can generate signals of varying frequency and duty cycle on one or more output pins. The PIC16F887 microcontroller has two CCP modules- CCP1 and CCP2. Both of them are identical in normal mode of operation, while the Enhanced PWM features are available on CCP1 only. This is why this chapter gives a detailed description of the CCP1 module. Concerning CCP2, only the features distinguishing it from CCP1 will be covered.

CCP1 MODULE

A central part of this circuit is a 16-bit register CCPR1 which consists of the CCPR1L and CCPR1H registers. It is used for capturing or comparing with binary numbers stored in the timer register TMR1 (TMR1H and TMR1L).
pic-microcontrollers-programming-in-c-chapter-03-image-65
If enabled by software, the timer TMR1 reset may occur on match in Compare mode. Besides, the CCP1 module can generate PWM signals of varying frequency and duty cycle. Bits of the CCP1CON register are in control of the CCP1 module.

CCP1 IN CAPTURE MODE

In this mode, the timer register TMR1 (consisting of TMR1H and TMR1L) is copied to the CCP1 register (consisting of CCPR1H and CCPR1L) in the following situations:
  • Every falling edge (1 -> 0) on the RC2/CCP1 pin;
  • Every rising edge (0 -> 1) on the RC2/CCP1 pin;
  • Every 4th rising edge (0 -> 1) on the RC2/CCP1 pin; and
  • Every 16th rising edge (0 -> 1) on the RC2/CCP1 pin.
A combination of the four bits (CCP1M3 - CCP1M0) of the control register determines which of these events will cause 16-bit data to be transfered. In addition, the following conditions must be met:
  • The RC2/CCP1 pin must be configured as an input; and
  • TMR1 module must operate as timer or synchronous counter.
pic-microcontrollers-programming-in-c-chapter-03-image-66
The flag bit CCP1IF is set when capture is made. If the CCP1IE bit of the PIE1 register is set when it happens, an interrupt occurs. When the CCP1 module exsits the capture mode, an unwanted capture interrupt may be generated. In order to avoid this, both a bit enabling CCP1IE interrupt and flag bit CCP1IF should be cleared prior to any change occurs in the control register. Unwanted interrupts may also be generated by switching from one capture prescaler to another. To avoid this, the CCP1 module should be temporarily switched off before changing the prescaler. The following program sequence, written in assembly language, is recommended:
BANKESEL CCP1CON
CLRF CCP1CON  ;CONTROL REGISTER IS CLEARED
              ;CCP1 MODULE IS OFF
MOVLW XX      ;NEW PRESCALER MODE IS SELECTED
MOVWF CCP1CON ;NEW VALUE IS LOADED TO THE CONTROL REGISTER
              ;CCP1 MODULE IS SIMULTANEOUSLY SWITCHED ON
Let's do it in mikroC...
...
ASM {
    BANKESEL CCP1CON
    CLRF CCP1CON  // CONTROL REGISTER IS CLEARED
                  // CCP1 MODULE IS OFF
    MOVLW XX      // NEW PRESCALER MODE IS SELECTED
    MOVWF CCP1CON // NEW VALUE IS LOADED TO THE CONTROL REGISTER
}                 // CCP1 MODULE IS SIMULTANEOUSLY SWITCHED ON
...

CCP1 IN COMPARE MODE

In this mode, the value stored in the CCP1 register is constantly compared to the value stored in the timer register TMR1. When a match occurs, the logic state of the RC2/CCP1 output pin may be changed, which depends on the state of bits in the control register (CCP1M3 - CCP1M0). The flag-bit CCP1IF will be simultaneously set.
pic-microcontrollers-programming-in-c-chapter-03-image-67
To set the CCP1 module to operate in this mode, two conditions must be met:
  • The RC2/CCP1 pin must be configured as an output; and
  • Timer TMR1 must be synchronized with internal clock.

CCP1 IN PWM MODE

Signals of varying frequency and duty cycle have a wide range of application in automation. A typical example is a power control circuit. Refer to figure below. If a logic zero (0) indicates the switch-off and a logic one (1) indicates the switch-on, the electrical power that load consumers will be directly proportional to the pulse duration. This ratio is often called Duty Cycle.
pic-microcontrollers-programming-in-c-chapter-03-image-68
Another example, common in practice, is the use of PWM signals in the circuit for generating signals of arbitrary waveforms such as sinusoidal waveform. See figure below:
pic-microcontrollers-programming-in-c-chapter-03-image-69
Devices which operate in this way are often used in practice as adjustable frequency drivers controlling the electric motor (speed, acceleration, deceleration etc.).
pic-microcontrollers-programming-in-c-chapter-03-image-70
The figure above shows the block diagram of the CCP1 module set in PWM mode. In order to generate a pulse of arbitrary form on its output pin, it is necessary to set pulse period (frequency) and pulse duration.
pic-microcontrollers-programming-in-c-chapter-03-image-71

PWM PERIOD

The output pulse period (T) is determined by the PR2 register of the timer TMR2. The PWM period can be calculated using the following equation: PWM Period = (PR2 +1) * 4Tosc * TMR2 Prescale Value If the PWM period (T) is known, then it is easy to determine the signal frequency F because these two values are related by equation F=1/T.

PWM DUTY CYCLE

The PWM duty cycle is specified by using in total of 10 bits: eight MSbs of the CCPR1L register and two additional LSbs of the CCP1CON register (DC1B1 and DC1B0). The result is a 10-bit number contained in the formula: Pulse Width = (CCPR1L,DC1B1,DC1B0) * Tosc * TMR2 Prescale Value The following table shows how to generate PWM signals of varying frequency if the microcontroller uses 20 MHz quartz-crystal (Tosc=50nS).
FREQUENCY [KHZ] 1.22 4.88 19.53 78.12 156.3 208.3
TMR2 Prescaler 16 4 1 1 1 1
PR2 Register FFh FFh FFh 3Fh 1Fh 17h
Just two more things:
  • The output pin will be constantly set if the pulse width is by negligence determined to be larger than PWM period.
  • In this application, the timer TMR2 postscaler cannot be used for generation of longer PWM periods.

PWM RESOLUTION

An PWM signal is nothing more than a pulse sequence with varying duty cycle. For one specified frequency (number of pulses per second), there is a limited number of duty cycle combinations. This number represents a resolution measured by bits. For example, a 10- bit resolution will result in 1024 discrete duty cycles, whereas an 8-bit resolution will result in 256 discrete duty cycles etc. In relation to this microcontroller, the resolution is determined by the PR2 register. The maximum value is obtained by writing number FFh. PWM frequencies and resolutions (Fosc = 20MHz):
PWM FREQUENCY 1.22KHZ 4.88KHZ 19.53KHZ 78.12KHZ 156.3KHZ 208.3KHZ
Timer Prescale 16 4 1 1 1 1
PR2 Value FFh FFh FFh 3Fh 1Fh 17h
Maximum Resolution 10 10 10 8 7 6
PWM frequencies and resolutions (Fosc = 8MHz):
PWM FREQUENCY 1.22KHZ 4.90KHZ 19.61KHZ 76.92KHZ 153.85KHZ 200.0KHZ
Timer Prescale 16 4 1 1 1 1
PR2 Value 65h 65h 65h 19h 0Ch 09h
Maximum Resolution 8 8 8 6 5 5
Let's do it in mikroC...
/* In this example, PWM module is initialized and set to give a pulse train of 50% dutycycle.
For this purpose, functions PWM1_Init(), PWM1_Start() and PWM1_Set_Duty() are used.
All of them are already contained in the mikroC PRO for PIC PWM library and just need to
be copied to the program. */

unsigned short duty_c;     // Define variable duty_c

void initMain() {
    ANSEL = ANSELH = 0;    // All I/O pins are configured as digital
    PORTC = TRISC = 0;     // Initial state of port C output pins
    PWM1_Init(5000);       // PWM module initialization (5KHz)
}

void main() {
    initMain();
    duty_c = 127;          // Initial value of duty-cycle
    PWM1_Start();          // Start PWM1 module
    PWM1_Set_Duty(duty_c); // Set PWM duty-cycle to 50%
    ...
    ...

CCP1CON Register

pic-microcontrollers-programming-in-c-chapter-03-image-72
P1M1, P1M0 - PWM Output Configuration bits - In all modes, except for PWM, the P1A pin is Capture/Compare module input. P1B, P1C and P1D pins act as input/output port D pins. In PWM mode, these bits affect the operation of the CCP1 module as shown in table below:
P1M1 P1M0 MODE
0 0 PWM with single output
Pin P1A outputs modulated signal. Pins P1B, P1C and P1D are port D input/output
0 1 Full Bridge - Forward configuration
Pin P1D outputs modulated signal Pin P1A is active Pins P1B and P1C are inactive
1 0 Half Bridge configuration
Pins P1A and P1B output modulated signal PinsP1C and P1D are port D input/output
1 1 Full Bridge - Reverse configuration
Pin P1B outputs modulated signal Pin P1C is active Pins P1A and P1D are inactive
DC1B1, DC1B0 - PWM Duty Cycle Least Significant bits - are only used in PWM mode in which they represent two least significant bits of a 10-bit number. This number determines duty cycle of the PWM signal. The rest of bits (8 in total) are stored in the CCPR1L register. CCP1M3 - CCP1M0 - CCP1 Mode Select bits determine the mode of the CCP1 module.
CCP1M3 CCP1M2 CCP1M1 CCP1M0 MODE
0 0 0 0 Module is disabled (reset)
0 0 0 1 Unused
0 0 1 0 Compare mode
CCP1IF bit is set on match
0 0 1 1 Unused
0 1 0 0 Capture mode
Every falling edge on the CCP1 pin
0 1 0 1 Capture mode
Every rising edge on the CCP1 pin
0 1 1 0 Capture mode
Every 4th rising edge on the CCP1 pin
0 1 1 1 Capture mode
Every 16th rising edge on the CCP1 pin
1 0 0 0 Compare mode
Output and CCP1IF bit are set on match
1 0 0 1 Compare mode
Output is cleared and CCP1IF bit is set on match
1 0 1 0 Compare mode
Interrupt request arrives and bit CCP1IF is set on match
1 0 1 1 Compare mode
Bit CCP1IF is set and timers 1 or 2 registers are cleared
1 1 0 0 PWM mode
Pins P1A and P1C are active-high Pins P1B and P1D are active-high
1 1 0 1 PWM mode
Pins P1A and P1C are active-high Pins P1B and P1D are active-low
1 1 1 0 PWM mode
Pins P1A and P1C are active-low Pins P1B and P1D are active-high
1 1 1 1 PWM mode
Pins P1A and P1C are active-low Pins P1B and P1D are active-low

CCP2 MODULE

Excluding the different names of registers and bits, this module is a very good copy of the CCP1 module set in normal mode. There is only one true difference between them when CCP2 operates in Compare mode. The difference refers to the timer T1 reset signal. Namely, if A/D converter is enabled, at the moment the values of the TMR1 and CCPR2 registers match, the timer T1 reset signal will automatically start A/D conversion.
pic-microcontrollers-programming-in-c-chapter-03-image-73
Similar to the pervious module, this circuit is also under control of the control register bits. This time, it is the CCP2CON register.

CCP2CON Register

pic-microcontrollers-programming-in-c-chapter-03-image-74
DC2B1, DC2B0 - PWM Duty Cycle Least Significant bits - are only used in PWM mode representing two least significant bits of a 10-bit number. This number determines duty cycle of the PWM signal. The rest of bits (8 in total) are stored in the CCPR2L register. CCP2M3 - CCP2M0 - CCP2 Mode Select bits select CCP2 mode.
CCP2M3 CCP2M2 CCP2M1 CCP2M0 MODE
0 0 0 0 Module is disabled (reset)
0 0 0 1 Unused
0 0 1 0 Unused
0 0 1 1 Unused
0 1 0 0 Capture mode
Every falling edge on the CCP2 pin
0 1 0 1 Capture mode
Every raising edge on the CCP2 pin
0 1 1 0 Capture mode
Every 4th rising edge on the CCP2 pin
0 1 1 1 Capture mode
Every 16th rising edge on the CCP2 pin
1 0 0 0 Compare mode
Output and CCP2IF bit are set on match
1 0 0 1 Compare mode
Output is cleared and CCP2IF bit is set on match
1 0 1 0 Compare mode
Interrupt is generated, CCP2IF bit is set and CCP2 pin is unaffected on match
1 0 1 1 Compare mode
CCP2IF bit is set, Timer 1 registers are cleared, A/D conversion is started if the A/D converter is on on match
1 1 x x PWM mode

In Short

Setting up CCP1 module for PWM operation

In order to set up the CCP module for PWM operation, the following steps should be taken:
  • Disable the CCP1 output pin. It should be configured as an input.
  • Set the PWM period by loading the PR2 register.
  • Configure the CCP module to operate in the PWM mode by combining bits of the CCP1CON register.
  • Set duty cycle of the PWM signal by loading the CCPR1L register and using bits DC1B1 and DC1B0 of the CCP1CON register.
  • Configure and start timer TMR2:
    • Clear the TMR2IF interrupt flag bit of the PIR1 register.
    • Set the timer TMR2 prescale value by loading bits T2CKPS1 and T2CKPS0 of the T2CON register.
    • Start the timer TMR2 by setting the TMR2ON bit of the T2CON register.
  • Enable PWM output pins after one PWM cycle has been complete:
    • Wait for the timer TMR2 overflow (the TMR2IF bit of the PIR1register is set).
    • Configure the appropriate pin as an output by clearing the bit of the TRIS register.
 

CCP1 IN ENHANCED MODE

The enhanced mode is available on CCP1 only. The CCP1 in enhanced mode basically doesn’t differ from the CCP1 in normal mode and enhancement refers to transmission of PWM signal to the output pins. Why is it so important? Because the microcontrollers are more frequently used in electric motor control systems. These devices are not described herein, but if you ever have had a chance to work on development of similar devices, you will recognize elements which, until quite recently, were used as external ones. We say ‘were used’ because all these elements are now integrated into the microcontroller and can operate in several different modes.

SINGLE OUTPUT PWM MODE

A single output PWM mode is enabled only in the event that the P1M1 and P1M0 bits of the CCP1CON register are cleared. In this case, one PWM signal can be simultaneously available on maximum of four different output pins. Besides, the PWM signal may appear in basic or inverted waveform. Signal distribution depends on the bits of the PSTRCON register, while its polarity depends on the CCP1M1 and CCP1M0 bits of the CCP1CON register. When an inverted output is in use, pins are low-active and pulses having the same waveform are always generated in pairs: on the P1A and P1C pins and P1B and P1D pins, respectively.
pic-microcontrollers-programming-in-c-chapter-03-image-75

HALF-BRIDGE MODE

In relation to the half-bridge mode, the PWM signal is the output on the P1A pin, while at the same time the complementary PWM signal is the output on the P1B pin. Such pulses activate MOSFET drivers in Half-Bridge mode which enable/disable current flow through the device.
pic-microcontrollers-programming-in-c-chapter-03-image-76
It is very dangerous to switch on MOSFET drivers simultaneously. The short circuit caused in that moment will be fatal. In order to avoid this, it is necessary to provide a short delay between switching drivers on and off. Such delay is marked as 'td' in figure below. The problem is solved by using the PDC0-PDC6 bits of the PWM1CON register.
pic-microcontrollers-programming-in-c-chapter-03-image-77
As shown in figure below, the half-bridge mode can also be used to activate MOSFET drivers in the Full Bridge configuration:
pic-microcontrollers-programming-in-c-chapter-03-image-78

FULL-BRIDGE MODE

All four pins are used as outputs in the full-bridge mode. In practice, this mode is commonly used to run motors, thus providing a simple and full control of speed and rotation direction. There are two configurations of this mode: Full Bridge-Forward and Full Bridge-Reverse.
pic-microcontrollers-programming-in-c-chapter-03-image-79

FULL BRIDGE - FORWARD CONFIGURATION

In Forward mode the following occurs:
  • Logic one (1) appears on the P1A pin (pin is active-high);
  • Pulse sequence appears on the P1D pin; and
  • Logic zero (0) appears on the P1B and P1C pins (pins are active-low).
Figure below shows the state of the P1A-P1D pins during one full PWM cycle.
pic-microcontrollers-programming-in-c-chapter-03-image-80

FULL BRIDGE - REVERSE CONFIGURATION

The similar occurs in Reverse mode, only that these pins have different functions:
  • Logic one (1) appears on the P1C pin (pin is active-high);
  • Pulse sequence appears on the P1B pin; and
  • Logic zero (0) appears on the P1A and P1D pins (pins are active-low).
pic-microcontrollers-programming-in-c-chapter-03-image-81

PWM1CON Register

pic-microcontrollers-programming-in-c-chapter-03-image-82

STRC PWM Restart Enable bit

  • 1 - Upon auto-shutdown, the PWM module automatically restarts, while the ECCPASE bit of the ECCPAS register is cleared.
  • 0 - In order to restart PWM module upon auto-shutdown, the ECCPASE bit must be cleared in software.
PDC6 - PDC0 PWM Delay Count bits - 7-digit binary number determines the number of instruction cycles (4*Tosc) added as a time delay during activation of PWM output pins.
pic-microcontrollers-programming-in-c-chapter-03-image-83
pic-microcontrollers-programming-in-c-chapter-03-image-84

PSTRCON Register

pic-microcontrollers-programming-in-c-chapter-03-image-85
STRSYNC - Steering Sync bit determines the moment of PWM pulse steering:
  • 1 - Steering occurs upon the PSTRCON register has been changed, but only if a PWM waveform is completed.
  • 0 - Steering occurs upon the PSTRCON register has been changed. The PWM signal on the output pin is immediately changed with no regard to whether the previous cycle is completed or not. This operation is useful when it is needed to immediately remove a PWM signal from the pin.
STRD - Steering Enable bit D determines the P1D pin function.
  • 1 - The P1D pin has the PWM waveform with polarity controlled by the CCP1M0 and CCP1M1 bits.
  • 0 - Pin is configured as a general port D input/output.
STRC Steering Enable bit C determines the P1C pin function.
  • 1 - The P1C pin has the PWM waveform with polarity controlled by the CCP1M0 and CCP1M1 bits.
  • 0 - Pin is configured as a general port D input/output.
STRB - Steering Enable bit B determines the P1B pin function.
  • 1 - The P1B pin has the PWM waveform with polarity controlled by the CCP1M0 and CCP1M1 bits.
  • 0 - Pin is configured as a general port D input/output.
STRA - Steering Enable bit A determines the P1A pin function.
  • 1 - The P1D pin has the PWM waveform with polarity controlled by the CCP1M0 and CCP1M1 bits.
  • 0 - Pin is configured as a general port C input/output.

ECCPAS Register

pic-microcontrollers-programming-in-c-chapter-03-image-86
ECCPASE - ECCP Auto-Shutdown Event Status bit indicates whether shut-down of CCP module has occurred (Shutdown state):
  • 1 - CCP module is in Shutdown state.
  • 0 - CCP module operates normally.
ECCPAS2 - ECCPAS0 - ECCP Auto-Shutdown Source Select bits select auto shutdown source:
ECCPAS2 ECCPAS1 ECCPAS0 SHUTHOWN STATE SOURCE
0 0 0 Shutdown state disabled
0 0 1 Comparator C1 output change
0 1 0 Comparator C2 output change
0 1 1 Comparator C1 or C2 output change
1 0 0 Logic zero (0) on INT pin
1 0 1 Logic zero (0) on INT pin or comparator C1 output change
1 1 0 Logic zero (0) on INT pin or comparator C2 output change
1 1 1 Logic zero (0) on INT pin or comparator C1 or C2 output change
PSSAC1, PSSAC0 - Pins P1A, P1C Shutdown State Control bits define the logic state of output pins P1A and P1C when CCP module is in shutdown state.
PSSAC1 PSSAC0 PINS LOGIC STATE
0 0 0
0 1 1
1 X High impedance (Tri-state)
PSSBD1, PSSBD0 - Pins P1B, P1D Shutdown State Control bits define the logic state of output pins P1B and P1D when CCP module is in shutdown state.
PSSBD1 PSSBD0 PINS LOGIC STATE
0 0 0
0 1 1
1 X High impedance (Tri-state)
The PIC16F887 microcontroller has several independent serial communication modules, and each of them can be configured to operate in several different modes, which make them irreplaceable in many situations. Remember what we advised you about the CCP modules as the same applies here. Don’t burden yourself with details of the operation of all of them, but select one and use only what you really need.

MIKROE

MIKROE is a development tools company dedicated to standardization and time-saving in the embedded industry.

  • About us
  • Success story
  • Contact
  • PressKit
  • Timeline
  • Partners
  • Legal
  • Distributors
  • Legacy Products

SOLUTIONS

  • Click boards™
  • Development boards
  • Mikromedia
  • CODEGRIP
  • NECTO Studio
  • Planet Debug
  • ClickID
  • Click Snap
  • EmbeddedWiki

SUPPORT

  • Helpdesk
  • Forum
  • Libstock
  • Learn
  • Let's Make
  • eBooks
  • Premium TS
  • Design service
  • Product Customization
  • Contract Manufacturing

STANDARD

  • mikroBUS™
  • mikroSDK
  • SiBRAIN
  • DISCON

Prodavnica za inostrano tržište

Nalazite se na prodavnici za inostrano tržište. Da li želite da Vas odvedemo na prodavnicu koja je namenjena za Srbiju?

Prodavnica za inostrano tržište

Nalazite se na prodavnici za inostrano tržište. Da li želite da Vas odvedemo na prodavnicu koja je namenjena za Srbiju?

Daily product releases, special offers, and more

  • FOLLOW US:

  • instagram
  • linkedin
  • facebook
  • github
  • newsletter
  • youtube
  • twitter twitter

Join us

Pridruži nam se

Careers
Internship
Posao
Napravi Click
Praksa
Copyright© 2025 MikroElektronika d.o.o.

Privacy