文件名称:chuangxing
- 所属分类:
- 其他嵌入式/单片机内容
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2013-04-08
- 文件大小:
- 111kb
- 下载次数:
- 0次
- 提 供 者:
- 杨**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
配置CCP1模块使之工作于PWM模式,并初始化周期和占空比。单片机的UART接口工作于全双工异步模式,1个起始位,8个数据位,1个停止位,波特率为9600,并开启接收中断,与PC机通信。编写程序实现功能:当UART接收到命令“S”时,LCD上显示“PWM Start”, PWM开始工作。当UART接收到命令“U”时,占空比增加,当UART接收到命令“D”时,占空比减少,并在LCD上显示占空比。当UART接收到命令“P”时, PWM停止工作,LCD上显示“PWM Stop”。并用示波器观察PWM输出波形的变化。
并使用ICD2仿真器进行程序的烧写和仿真调试。
-Configure the CCP1 module for PWM operation, and initialize the period and duty cycle. 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: " PWM Start" , PWM start working when the UART receiver to command " S" is displayed on the LCD. Increase the duty cycle when received by the UART command " U" , When UART receives command " D" , the duty cycle to reduce the duty cycle is displayed on the LCD. When the when UART receives command " P" , the the PWM stop working, PWM Stop " is displayed on the LCD. And observe the change of the PWM output waveform with an oscilloscope. And to use ICD2 emulator for procedural programming and simulation debugging.
并使用ICD2仿真器进行程序的烧写和仿真调试。
-Configure the CCP1 module for PWM operation, and initialize the period and duty cycle. 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: " PWM Start" , PWM start working when the UART receiver to command " S" is displayed on the LCD. Increase the duty cycle when received by the UART command " U" , When UART receives command " D" , the duty cycle to reduce the duty cycle is displayed on the LCD. When the when UART receives command " P" , the the PWM stop working, PWM Stop " is displayed on the LCD. And observe the change of the PWM output waveform with an oscilloscope. And to use ICD2 emulator for procedural programming and simulation debugging.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
串行数据传输控制PWM
...................\18f452i.lkr
...................\Ex5-3.cod
...................\Ex5-3.cof
...................\Ex5-3.hex
...................\Ex5-3.lst
...................\Ex5-3.map
...................\Ex5-3.mcp
...................\Ex5-3.mcs
...................\Ex5-3.mptags
...................\Ex5-3.tagsrc
...................\P18F_LCD.h
...................\WAP_LCD.c
...................\WAP_LCD.o
...................\ex5-3.c
...................\ex5-3.mcw
...................\ex5-3.o