1 Star 0 Fork 0

microchip-pic-avr-examples/pic18f47q10-cnano-i2c-write-mcc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

MCHP

PIC18F47Q10 I2C Master Write Data

Objective

This repository contains an example of MCC-generated source code for I2C as described in TBxxxx - Getting Started with I2C Using MSSP on PIC18 document from Microchip.

The PIC18F47Q10 configured in I2C Master Mode using the MSSP1 peripheral and performing write operations. This example will use the slave MCP23008, an I/O expander, addressed in 7-bit mode.

Related Documentation

Software Used

Hardware Used

Setup

The PIC18F47Q10 Curiosity Nano Development Board is used as the test platform.


The following configurations must be made for this project:

  • Clock
    • Oscillator Select: HFINTOSC
    • HF Internal Clock: 64 MHz
    • Clock Divider: 1
  • MSSP1
    • Serial Protocol: I2C
    • Mode: Master
    • I2C Clock Frequency: 100000
  • Watchdog Timer: disabled
  • Low-voltage Programming: disabled
Pin Configuration
RB1 (SCL1) With Pull Up
RB2 (SDA1) With Pull Up

Operation

  1. Connect the board to the PC.

  2. Open the pic18f47q10-cnano-i2c-read-write-int-bare.X project in MPLAB® X IDE.

  3. Configure the project properties:

    • Right click on the project and click Properties
    • Select the device pack in the Packs tab
    • Select the PIC18F47Q10 Curiosity Nano (click on the SN) in the Hardware Tool tab
    • Select the compiler version in the Compiler Toolchain tab
    • Click OK to save the changes


  1. Program the project to the board: right click on the project and click Make and Program Device

Demo:


Hardware Setup

Summary

This project is an illustration for a basic use case based around MSSP1.

空文件

简介

取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/microchip-pic-avr-examples/pic18f47q10-cnano-i2c-write-mcc.git
git@gitee.com:microchip-pic-avr-examples/pic18f47q10-cnano-i2c-write-mcc.git
microchip-pic-avr-examples
pic18f47q10-cnano-i2c-write-mcc
pic18f47q10-cnano-i2c-write-mcc
master

搜索帮助