Sunteți pe pagina 1din 11

PIC16F1 Core Independent Peripherals (CIP) and graphical initialization using MPLAB Code

Configurator (MCC)

PIC16F1( 8 bit Microcontroller)

Core Independent Peripherals: To handle their tasks with no code or supervision from the CPU to
maintain operation

1. Configurable Logic Cell (CLC): Easily Create Custom Combination and Sequential Logic

Key Features:

 Combinational Logic Functions

o AND/OR/XOR/NOT/NAND/NOR/XNOR

 State Functions / Clock

o D & JK Flip-flops, D & SR Latch’s

 Customizable logic with run time control

 Up to 32 external or internal input sources

 Output to external pins or internal peripherals

 Configuration via Microchip Code Configurator (MCC)

Benefits:

 Increases on chip interconnectivity

 Reduces component count and PCB area

 Fast event response

 Core independent operation

 Operation while in low power SLEEP

Example Applications:

Data modulation,Power sequencing ,Manchester/IrDA encoder,Event sequencing,Conditional


signalling,General purpose logic,Customizable circuitry.

2. Complementary Waveform Generator (CWG), Complimentary Output Generator (COG):


The CWG provides a complementary waveform with rising and falling edge dead band control,
enabling high efficiency synchronous switching, with no processor overhead. The CWG also
incorporates auto shutdown, auto restart, and can interface directly with other peripherals / external
inputs. The COG improves upon the functionality of the CWG with the addition of blanking and
phase control.
Key Features:

 Various input sources inclusive of: Comparators, PWM, CLC, NCO

 Blanking control for transient filtering (COG only)

 Phase control for output delay (COG only)

 Auto shutdown/restart

 Independent rise and fall

 Dead band control

 Polarity control

Benefits:

 Works with multiple peripherals


 Fewer components and less space
 Lower power
 Improved switching efficiencies

Example Applications:

 Switch mode power supplies


 LED/fluorescent lighting
 Battery charger
 Motor drive
 Power factor correction
 Class D audio amplifiers

3. Numerically Controlled Oscillator (NCO): Precision Linear Frequency Generator

Key Features:

 16-bit numeric frequency control*


o 500 kHz max output
 20-bit numeric frequency control*
o 32 MHz max output
 0.0001% step size of source clock input frequency
 Multiple Clock Sources
 Operation while in low power SLEEP
 (2) output modes
o Fixed 50% duty cycle
o Pulse Frequency Modulation
 Useable as a general purpose 20-bit timer/counter
 True linear frequency control
 Increased frequency resolution
 Core independent operation

Benefits:

 True linear frequency control


 Increased frequency resolution

Example Applications:

 Fluorescent ballast and LED lighting control


 Motor drivers
 Modems
 Class D audio amplifiers
 Ultrasonic ranging

4. Cyclic Redundancy Check (CRC/Scan): The CRC/Scan peripheral provides automated CRC
polynomial generation and verification of Program / DATA Memory to test for Non Volatile Memory
Integrity. It can also be configured to provide 16-bit CRC for use with memory and communications
data.

Features:

 General purpose 2-bit to 16-bit CRC

o For use with memory and communications data

 Automated CRC checksum with background SCAN

o Program memory

o DataEE memory

 Calculates CRC checksum on communications data

 Configurable polynomial (all standard CRC implementations)

 Corruption is detected upon checksum mismatch

 All memory scan operations are controlled via software

Benefits:

 Increased code and data integrity

 Software configurable for easy updates and modifications

 Eases implementation of safety standards (ex. Class B, UL, etc.)

 Core independent operation

 Operation while in low power SLEEP

5. 24-bit Signal Measurement Timer (SMT): The Signal Measurement Timer (SMT) is a 24-bit
counter with advanced clocking and gating logic, which can be configured for measuring a variety of
digital signal parameters such as pulse width, frequency and duty cycle, and the time difference
between edges on two signals.
Features:

 Accurate measurement of any digital signal

o Period, pulse width, frequency, duration, duty cycle, time of flight, etc.

 High resolution 24-bit signal measurement

 Provides relative timing measurements

 Multiple interrupt sources

o Period match, measure period, pulse width

o (2) Data Capture interrupts

 Flexible input source sources

 Useable as a general purpose 24-bit timer

 Useable as a custom digital protocol decode

Benefits:

 Code size reduction

 Faster response to changing inputs

 Core independent operation

 Operation while in low power SLEEP

graphical MPLAB Code Configurator:

 To accelerate and automate the initialisation code generation

MPLAB® Code Configurator (MCC) is a free, graphical programming environment that generates
seamless, easy-to-understand C code to be inserted into your project. Using an intuitive interface, it
enables and configures a rich set of peripherals and functions specific to your application.

MPLAB Code Configurator supports 8-bit, 16-bit and 32-bit PIC® microcontrollers. MCC is
incorporated into both the down-loadable MPLAB X IDE and the cloud based MPLAB Xpress IDE.

Features:

 Free Graphical Programming Environment

 Intuitive Interface for Quick Start Development

 Automated Configuration of Peripherals & Functions

o Minimized reliance upon product datasheet

o Reduces overall design effort & time


MCC with different operating areas

RESOURCE AREA

The Resource Area is further divided into three sub-windows:

1. Project Resources Area 2. Device Resources Area 3.Versions Area


1. Up and down arrow keys: for moving up and down in the tree, respectively

2. Right arrow key: for expanding a node

3. Left arrow key: for collapsing a node

- A red dot means that the version of the library is not compatible with the version of the core
installed.
- A grey dot means that the version of the library is compatible but is not loaded in the device
resources.

- A green dot means that the version is compatible with the core and is loaded in the device resources.

ADDING LIBRARIES TO MCC :

The user can download the library from the MCC website and load it to MCC in MPLAB X.

1. Choose where you have downloaded the library; it should be a .jar file. (If you have downloaded
from the website, it might be in .zip format, which would need to be unzipped).

2. Using the “Open Library folder”, copy the library into that location.

3. Restart MCC.

4. The newly added library should appear in the Versions Area.

PIN MANAGER AREA:

The Pin Manager Area consists of the following two sub-areas:

1. The Package or Graphical View, which shows a graphical representation of the package selected
for the device (Figure 1).

2. Table View, which shows a tabular form of the Pin Manager (Figure 2). I/O pins of the selected
device can be configured from these windows.
Fig 1 Package view

Fig 2 Table view

COMPOSER AREA: When a peripheral or library is selected from the Project Resources Area, its
corresponding configuration GUI is displayed in the Composer Area.

Composer Area for UART module


Registers Tab: The Registers tab provides direct access for the user to configure the module’s
registers and settings. The Easy Setup tab allows configuration of the common usages of the modules.
The Registers tab allows the user unrestricted access to the configuration of the module.

Notifications Tab:

The Notifications tab has four columns: category, module name, type, and description.

1. Category: identifies the notification as an alert or information that the module depends on another
module.

2. Module Name: is the name of the module that generated the notification.

3. Type: indicates the severity of the notification.

MCC OPTIONS: Several aspects of the operation of the MCC can be managed by using the
“Options” panel, which can be invoked by clicking Tools → Options → Embedded → MPLAB Code
Configurator in the menu bar of the MPLAB® X IDE.
MCC File Handling:

1. Remove unused files from the project: enabling this option tells the MCC to remove .c and .h files
for modules which were removed from the MCC configuration between the subsequent generation
procedures. This option ensures that the files which are included in the project (and thus in the
compilation) are only those which are strictly necessary. However, this will not delete the files from
the disk. 2. Delete unused files from the disk: this option gets enabled only when selecting “Remove
unused files from the project”. This performs the additional task of deleting unused files from the disk
and therefore, files cannot be recovered anymore.

MCC Dialogs:

1. Always ask before removing a module: enabling this control enables the “Are you sure?” dialog
box which appears while disabling or removing an enabled module. 2. Always ask before removing a
pin: enabling this control enables the “Are you sure?” dialog box which appears while deallocating or
removing a pin from a peripheral.

MCC Line Endings:

Specify the type of line endings to use in the files generated by MCC. The default is DOS (). Unix
line endings () may be specified.

MCC Libraries:

1. Use the Add Library button to add a MCC modular library to the MCC plugin. 2. Use the Open
Library Folder button to view the MCC modular libraries folder.

S-ar putea să vă placă și