⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex3c.c

📁 nRF24E1 sample transmit & receiver
💻 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 + -