完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
我有一个PIC16F1619微控制器的MICHSCIP好奇心板。我用这一块板上学,但我很难理解一些基本功能。当我触摸按钮(RC1-ToucButton)时,我试着点亮一些LED,我看到有很多代码使用一些更容易的库来控制TH按钮,但是我们只允许导入HTC。H,我可以帮助任何人纠正我的代码,这样我就可以得到一些东西。o对触摸按钮作出反应。
以上来自于百度翻译 以下为原文 I have a Microschip Curiosity-board with a PIC16F1619 microcontroller. I use this board for school but I am struggeling to understand some of the basic functions. I am trying to light up some leds when I touch the button (RC1 - Touchbutton) I have seen that there are alot of code which uses some easier library for controlling th button, but we are only allowed to import the htc.h as I understand. Can anyone help me correct my code so that I can get something to react to the touchbutton. #include #define _XTAL_FREQ 500000 void main(void){ OSCCON = 0b00111000; TRISA =0; TRISB=0; TRISC=0b00000010; OPTION_REG = 0b00000110; LATCbits.LATC1 = 1; INTCONbits.IOCIE = 1; IOCCNbits.IOCCN1 = 1; GIE=1; while(1){ LATA =0; LATB=0; } } void interrupt ISR(void){ if(IOCCFbits.IOCCF1){ IOCCFbits.IOCCF1=0; __delay_ms(5); LATA=1; LATB=1; LATC=0b11111101; } } |
|
相关推荐
3个回答
|
|
|
好奇心板上的“MouTouter”按钮只是一个连接到PIC的RC1 I/O引脚的PCD垫,您需要有必要的固件才能将它变成一个“触摸板”按钮。这有点牵涉,我建议您需要在Microchip文档中阅读一些关于MtUnt固件的操作以及使用什么代码和外围设备来实现它。
以上来自于百度翻译 以下为原文 The mTouch "button" on the Curiosity Board is simply a pcd pad connected to the RC1 I/O pin of the pic, you will need to have the required firmware to turn that into a "touch pad" button. This is a little involved, I suggest you will need to do some reading in the Microchip documentation on how the mTouch firmware operates and what code and peripherals are used to achieve it |
|
|
|
|
|
您好,您应该使用MCC插件中的触摸库并阅读该库的文档。我不确定您的好奇心板是否在库中支持(检查有关支持设备的文档)。
以上来自于百度翻译 以下为原文 Hi, you should use the touch library in MCC plugin and read the documentation of this library. I'm not sure if your Curiosity board is supported in the library (check the documentation about supported devices) Regards |
|
|
|
|
|
你可以遵循一个一步一步的例子:http://MyCHIPCDeave:…
以上来自于百度翻译 以下为原文 You can follow the step-by-step example: http://microchipdeveloper...:lowpincount-curiosity |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
475 浏览 0 评论
5794 浏览 9 评论
2334 浏览 8 评论
2224 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3530 浏览 3 评论
1124浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1098浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
873浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
475浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 10:58 , Processed in 0.696992 second(s), Total 76, Slave 59 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2405