1 Star 0 Fork 0

microchip-pic-avr-examples / pic18f47q10-cnano-tmr2-hlt-interrupt-bare

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

MCHP

PIC18F47Q10 Configure TMR4 as HLT to generate an interrupt (like a WDT without reset)

The PIC18F47Q10 features features timers with Hardware Limit Timer (HLT) and a 10-bit ADC with computation (ADCC) module. In this demo, uses TMR4 peripheral as a HLT in order to generate an interrupt and stop TMR2 that also stops the ADCC auto-conversion.

Related Documentation

Software Used

Hardware Used

Setup

  • The PIC18F47Q10 Curiosity Nano Development Board (DM182029) is used as the test platform.
  • Insert it into the Curiosity Nano Base for Click Boards™ (AC164162) along with the POT click board™ (MIKROE-3402).
    HardwareSetup

The following pin configurations must be made for this project:

Pin Configuration
RA0 Analog input for ADCC
RE0 Digital output (LED0)
RC7 Digital input as HLT trigger

Operation

  1. Build demo firmware, make and program the generated code onto the PIC18F47Q10 Curiosity Nano.
  2. Plug the POT click board™ into the mikroBUS™ slot (1) of the Curiosity Nano Base board.
  3. Run the code, LED0 will blink with Timer2Period period (100ms).
  4. LED0 will blink if Potentiometer value is below DesiredThreshold, and if above DesiredThreshold, LED0 will be ON.
  5. If the ADCC read value is above MaxThreshold and RC7 pin is pulled to GND for more than Timer4Period (500ms), TMR4 will stop TMR2.
  6. LED0 will blink with 500ms period as long as RC7 is tied to GND.
    Hardware Setup

Summary

This project showcases how easy it is to use the TMR4 of PIC18F47Q10 as HLT to generate an interrupt (like a WDT without reset).

空文件

简介

This repository provides a bare-metal code example for using TMR4 peripheral as a Hardware Limit Timer in order to generate an interrupt and stop TMR2 that also stops the ADCC auto-conversion. 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C
1
https://gitee.com/microchip-pic-avr-examples/pic18f47q10-cnano-tmr2-hlt-interrupt-bare.git
git@gitee.com:microchip-pic-avr-examples/pic18f47q10-cnano-tmr2-hlt-interrupt-bare.git
microchip-pic-avr-examples
pic18f47q10-cnano-tmr2-hlt-interrupt-bare
pic18f47q10-cnano-tmr2-hlt-interrupt-bare
master

搜索帮助