1 Star 0 Fork 0

microchip-pic-avr-examples / pic18f47q10-cnano-adcc-low-pass-filtering-mcc

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

MCHP

PIC18F47Q10 ADCC Low-pass Filter Conversion Configuration Example

The PIC18F47Q10 features one 10-bit ADCC module. In this demo, the ADCC peripheral is used to read a value from an analog pin connected to a potentiometer a hundred times, the values passed through a low pass filter and an average is computed.

Related Documentation

Software Used

Hardware Used

Setup

The PIC18F47Q10 Curiosity Nano Development Board is used as test platform, along with the Curiosity Nano Base for Click boards™ and the POT Click board™.

The following configurations must be made for this project:

Pin Configuration
RA0 Analog Input
Hardware Setup

Operation:

  1. Connect the board to the PC.

  2. Open the pic18f47q10-cnano-adcc-low-pass-filtering-mcc.X project in MPLAB® X IDE.

  3. Set pic18f47q10-cnano-adcc-low-pass-filtering-mcc project as main project. Right click on the project in the Projects tab and click Set as Main Project:

  4. Select the PIC18F47Q10 Curiosity Nano in the Hardware Tool section of the project settings:

  • Right click on the project and click Properties;
  • Select the PIC18F47Q10 Curiosity Nano (click on the SN) in the Hardware Tool tab and then click OK:
  1. Run the code in debug mode: right click on the project and click Debug:

  2. Pause the debug process by clicking the Pause button (or click Debug -> Pause in the Menu bar):

  3. Add adcVal variable to the Variables window: right click on the adcVal variable in main.c file and click New Watch:

The ADC value on RA0 pin will be read only once, before the program gets to the infinite loop. The value of adcVal will reflect the potentiometer position.

Summary

This project showcases how the Analog-to-Digital Converter with Computation (ADCC) on the new PIC18-Q10 can be used to read an analog value from a pin while removing high-frequency noise form the measurement.

空文件

简介

A code example that shows how to configure ADCC to give a conversion averaged through a low pass filter. 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C
1
https://gitee.com/microchip-pic-avr-examples/pic18f47q10-cnano-adcc-low-pass-filtering-mcc.git
git@gitee.com:microchip-pic-avr-examples/pic18f47q10-cnano-adcc-low-pass-filtering-mcc.git
microchip-pic-avr-examples
pic18f47q10-cnano-adcc-low-pass-filtering-mcc
pic18f47q10-cnano-adcc-low-pass-filtering-mcc
master

搜索帮助