文件名称:zhongduan
- 所属分类:
- 其他嵌入式/单片机内容
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2013-04-08
- 文件大小:
- 56kb
- 下载次数:
- 0次
- 提 供 者:
- 杨**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
用PIC单片机内部定时器0,作为16位定时器使用,并开启溢出中断。单片机的外部中断0引脚接开关SW2,并设置为下降沿的触发方式。单片机的UART接口工作于全双工异步模式,1个起始位,8个数据位,1个停止位,波特率为9600,并开启接收中断,与PC机通信。编写程序实现功能:SW2按键按下时,LCD上显示“Timer0 Start”, 定时器0开始工作,然后LCD上显示“Timer0 Working”,当UART接收到PC机发送的命令“P”时,定时器0停止工作,LCD上显示“Timer0 Stop”,并把定时时间发回给PC机。
并使用ICD2仿真器进行程序的烧写和仿真调试。
-PIC microcontroller internal timer 0 as a 16-bit timer, and open the overflow interrupt. MCU external interrupt 0 pin is connected to switch SW2, and set to the falling edge of the trigger. The microcontroller UART interface operates in full-duplex asynchronous mode, one start bit, 8 data bits, 1 stop bit, baud rate of 9600, and open to receive interrupt communication with the PC. Write a program to achieve functional: SW2 button is pressed, the display on the LCD Timer0 Start " to, timer 0 start work, and then displayed on the LCD Timer0 Working" When UART receives commands sent to the PC, " P" , the timer 0 stop working, the Timer0 Stop " is displayed on the LCD, and the timing time is sent back to the PC. And to use ICD2 emulator for procedural programming and simulation debugging.
并使用ICD2仿真器进行程序的烧写和仿真调试。
-PIC microcontroller internal timer 0 as a 16-bit timer, and open the overflow interrupt. MCU external interrupt 0 pin is connected to switch SW2, and set to the falling edge of the trigger. The microcontroller UART interface operates in full-duplex asynchronous mode, one start bit, 8 data bits, 1 stop bit, baud rate of 9600, and open to receive interrupt communication with the PC. Write a program to achieve functional: SW2 button is pressed, the display on the LCD Timer0 Start " to, timer 0 start work, and then displayed on the LCD Timer0 Working" When UART receives commands sent to the PC, " P" , the timer 0 stop working, the Timer0 Stop " is displayed on the LCD, and the timing time is sent back to the PC. And to use ICD2 emulator for procedural programming and simulation debugging.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
中断系统应用
............\18f452i.lkr
............\Ex4.cod
............\Ex4.cof
............\Ex4.hex
............\Ex4.lst
............\Ex4.mcp
............\Ex4.mcs
............\Ex4.mptags
............\Ex4.tagsrc
............\P18F_LCD.h
............\WAP_LCD.c
............\WAP_LCD.o
............\ex4.c
............\ex4.mcw
............\ex4.o
............\untitled.mcw