📄 ex3c.c
字号:
/*= ex3c.c =====================================================================
*
* Copyright (C) 2003, 2004 Nordic Semiconductor
*
* This file is distributed in the hope that it will be useful, but WITHOUT
* WARRANTY OF ANY KIND.
*
* Author(s): Ole Saether
*
* DESCRIPTION:
*
* PWM example program.
*
* The functionality is the same as in ex3a.asm.
*
* COMPILER:
*
* This program has been tested with Keil C51 V7.07a.
*
* $Revision: 4 $
*
*==============================================================================
*/
#include <Nordic\reg24e1.h>
void main(void)
{
P0_ALT = 0x80; // Enable PWM output
PWMCON = 0xc0; // Enable 8 bit PWM with min prescaler
PWMDUTY = 10; // High 10 out of 255 periods
for(;;)
;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -