MCC(MPLAB Code Configurator)开发文档

https://microchipdeveloper.com/xwiki/bin/view/software-tools/mcc/

Getting Started with MCC

The MCC GUI(Graphical User Interface):

  • setup the configuration and all the peripherals;
  • **generates driver code control the peripherals on PIC microcontrollers;
  • configure and generate libraries, which allows you to configure and generate code for software libraries and off-chip peripherals;
  • **The generated drivers or libraries can be used in any PIC device application program.
  • The GUI provides an easy means for setting up the configuration of the peripherals.

The MCC requires an MPLAB X IDE project to be created, or an existing project opened, before launching the MCC plugin.

This is necessary as the MCC needs to know the device used in the project to have access to device-specific information,

like registers, bits, and configurations and to set up the MCC GUI.

The MCC generates source and header files based on selections made in the GUI.

The generated files are added to the active project of MPLAB X IDE.

Getting Started with MCC

The first step of any project is to use the MPLAB X IDE wizard tool to create a project.

The wizard will walk through selecting:

  • the microcontroller,
  • the development programmer/debugger
  • and the compiler to use.

This should be done before launching the MCC.

The MCC tool, once installed, can be launched from:

"MPLAB X IDE menu" -> "Tools" -> "Embedded" -> "MPLAB Code Configurator v?: Open/Close"

MCC Sections Layout:

We will refer to these MCC sections by name throughout this training page(are shown in the image below).

  • Project Resources: shows the current using peripherals in the project.
  • Device Resources: shows the peripherals available on the device
  • Available Versions:
  • Composer Area
  • Pin Manager - Package View
  • Pin Manager - Table View

This highlight can be enabled over the MCC at any time by clicking on the information icon Info icon.

Using MCC to Select and Setup Peripherals

  • Select the Peripherals

    • The Device Resources shows the peripherals available on the device.

    • By clicking on the name of the peripheral, a list of associated options including multiple versions of the peripheral will appear.

      There may be multiple comparators on the device so the submenu will show the list of all available options.

    • Clicking on the specific peripheral will add that peripheral to the Project Resources.

  • Setup the Peripherals

    The **central Composer Area **is where the peripherals are set up.

    When the peripheral is selected in the Project Resources, the corresponding configuration GUI is displayed in the central composer area.

    There are three tabs: Easy Setup, Registers, and Notifications.:

    • Peripheral Setup: is where you select the settings for the peripheral through a variety of drop-down selections and checkboxes.

      The example shown is for the System Peripheral setup.

    • Register View: The Registers tab shows the various registers for the particular peripheral. The configuration settings can also be viewed and modified under this tab.
    • Notifications: Any conflicts or recommendations that a setup would require will show up under the Notifications tab. This may be as simple as an I/O pin being set to analog and is recommended to be set to digital for the peripheral setting selected.

Using MCC to Select I/O Pin Configuration

MCC allows you to set up the I/O pin configurations using a graphical interface in the Pin Manager.

The first step is to select the device package type to use then a representation of the device will appear.

Then click on the accompanying chart to select the arrangement.

  • A blue pin is unconnected;
  • A green pin is connected to a peripheral or designated as a digital I/O pin.

The menu of peripherals to connect the pin to,

can be positioned on the top (horizontal) or on the left side (vertical),

by clicking on the horizontal or vertical selection.

The pin(s) associated with the peripheral will show up in the row or column of the peripheral name.

This way it can be easily determined which pins to select for that particular peripheral.

Once the pin is selected, the color will change to green and the lock symbol will close,

indicating the pin is locked into that arrangement.

Clicking on the green lock will reset it back to a blue, unused state.

There are several other colors that will appear as described below:

  • Gray-colored pin: indicates that the pin is not usable in the selected configuration,

    and that there is no enabled module which has any functionality on that pin.

    There are also grayed-out locks on a white background that indicate pins that are locked out by selected system functions.
  • Blue-colored pin: indicates pins that are available to be allocated to a module.
  • Green-colored pin (with a lock): this combination indicates that the pin has been allocated and selected for a module.

    The name that appears on the pin is either the name of the pin in the module’s context or a custom name entered.
  • Green-colored pin (with chain link): this combination indicates that the pin is shared between multiple functions.
  • Yellow-colored pin: indicates a possible alternate pin for an already allocated pin function.
  • Grayed-out locks on a white background: indicate pins that are locked out by selected system functions.

Generating Code

MCC has a separate setup screen for each peripheral selected.

After each peripheral is set up along with the configuration and I/O,

then just click on the Generate Code button Generate button to have the MCC:

  • create all the peripheral driver code for the project.
  • a main.c file will also be produced if it is a new project.
  • it will only produce the peripheral driver files, If the project already has a main.c.
  • The generated code will be placed into the project automatically.
  • The code will show up in the project area of MPLAB X IDE.
  • The code produced is used as a base and modified for the project's needs.

This also makes a great way to start a new project so initially,

a set of peripheral driver code with functions for each peripheral is automatically developed.

MCC(MPLAB® Code Configurator)开发文档的更多相关文章

  1. Mego开发文档 - 索引

    Mego 开发文档 Mego 快速概述 主要特性 获取Mego 使用流程 模型 查询 保存数据 入门 Mego 快速开始 创建项目 安装Nuget包 创建连接字符串 创建模型及数据上下文(添加引用) ...

  2. iOS开发-开发文档安装

    iOS开发肯定离不开开发文档,苹果有在线帮助文档,xCode其实可以下载模拟器文档和iOS8.1文档的,不过下载的速度实在不敢恭维,而且比较头疼的是不显示下载进度条的,苹果的开发文档都是放在)/应用程 ...

  3. jssip中文开发文档(完整版)

    jsSip开发文档 (官网地址:http://www.jssip.net/) 完整案例demo下载地址: http://download.csdn.net/download/qq_39421580/1 ...

  4. Web图片编辑控件开发文档-Xproer.ImageEditor

    版权所有 2009-2014 荆门泽优软件有限公司 保留所有权利 官方网站:http://www.ncmem.com 产品首页:http://www.ncmem.com/webplug/image-e ...

  5. 【原创】Odoo开发文档学习之:构建接口扩展(Building Interface Extensions)(边Google翻译边学习)

    构建接口扩展(Building Interface Extensions) 本指南是关于为Odoo的web客户创建模块. 要创建有Odoo的网站,请参见建立网站;要添加业务功能或扩展Odoo的现有业务 ...

  6. Android官方开发文档Training系列课程中文版:目录

    Android官方开发文档Training系列课程中文版:目录   引言 在翻译了一篇安卓的官方文档之后,我觉得应该做一件事情,就是把安卓的整篇训练课程全部翻译成英文,供国内的开发者使用,尤其是入门开 ...

  7. linux UART串口驱动开发文档

    转:http://www.360doc.com/content/10/0417/18/829197_23519037.shtml linux UART串口驱动开发文档时间:2010-01-09 14: ...

  8. [翻译]开发文档:android Bitmap的高效使用

    内容概述 本文内容来自开发文档"Traning > Displaying Bitmaps Efficiently",包括大尺寸Bitmap的高效加载,图片的异步加载和数据缓存 ...

  9. Net通用进销存管理系统 + 开发文档+ 使用说明

    通用进销存管理系统 + 开发文档+ 使用说明Net源码下载 包括下面的模块基础资料模块采购管理模块库存管理模块商务管理模块营业管理模块维修管理模块会员管理模块财务管理模块 Net通用进销存管理系统 + ...

  10. C#微信开发文档

    C#微信开发文档 开发前准备 微信公众平台链接: https://mp.weixin.qq.com/cgi-bin/home?t=home/index&lang=zh_CN 开发初期我们使用测 ...

随机推荐

  1. ThinkPHP 中闭包在数组查询条件中的深度应用

    一.闭包与数组条件的协同原理 在 ThinkPHP 的查询体系中,数组条件是构建查询逻辑的核心载体.当数组条件的值为闭包(Closure)时,框架会自动将其解析为动态子查询生成器,实现运行时按需构建 ...

  2. 解决get和post请求提交数据中文乱码问题

    目录 get请求乱码 乱码案例 解决办法 方法一:进行转码 方法二:修改tomcat中conf/server.xml post请求乱码 解决办法:在取参数之前设置编码格式 get请求乱码 Tomcat ...

  3. 工具 | webshell-decryptor

    0x00 简介 webshell-decryptor是一款通过获取到的webshell流量.url.key来还原攻击者使用webshell所做操作的工具. 下载地址: webshell-decrypt ...

  4. 南昌航空大学-软件学院-面向对象程序设计第一阶段总结性blog——钟文君24201237

    目录 前言 1.关于知识点 2.关于题量 3.关于难度 设计与分析 第一次作业 我的设计 我的分析 第二次作业 我的设计(在第一次基础上的增加与改变) 我的分析 第三次作业 我的设计 我的分析 踩坑心 ...

  5. 测试Python编译器性能

    import time t=time.time() num=input("输入一个质数:") def prime_number(num): i=2 for i in range(i ...

  6. SRv6 验证实验

    本文分享自天翼云开发者社区<SRv6 验证实验>,作者:f****n 引言 Segment Routing over IPv6 (SRv6) 是一种基于 IPv6 的新兴网络架构,其通过在 ...

  7. 现在的AI工具已经能够创作音乐了?

    本文由 ChatMoney团队出品 随着科技的不断进步,音乐是人类文明的一部分,它在社会.文化.艺术和娱乐领域发挥着重要作用.随着AI技术的发展,AI技术的应用正在以惊人的速度改变音乐创作.演奏.传播 ...

  8. Extend BOL Model BT with custom table type relationship

    Link to Content's target Space : http://wiki.sdn.sap.com/wiki/display/CRM/CRM+Web+Client+UI+Framewor ...

  9. 支付宝携手HarmonyOS SDK实况窗,开启便捷停车生活

    6月,华为开发者大会2025与全球开发者一起,用代码和创新编制智慧时代的经纬.这里不仅是技术峰会,更是开发者的「主场」,6月21日,<HarmonyOS SDK使能高效开发,打造优质创新应用体验 ...

  10. window10本地搭建DeepSeek R1(四)DeepSeek Api使用

    前面已经搭建好了本地DeepSeek ,可以使用OpenWebUi进行聊天访问,这里介绍使用本地的DeepSeek-Api进行访问. 1:在配置中打开api使用: 2:DeepSeek 模型自己是没有 ...