ex3c.c

来自「基于单片机、nrf24e1发射接受程序」· C语言 代码 · 共 32 行

C
32
字号
/*= ex3c.c =====================================================================
 * 
 * Copyright (C) 2003 Nordic VLSI ASA
 * 
 * Author(s)     : Ole Saether
 * Support mail  : nrfprog@nvlsi.no
 *
 * DESCRIPTION:
 *
 *  PWM example program.
 *
 *  The functionality is the same as in ex3a.asm.
 *
 * COMPILER:
 *  
 *  This program has been tested with Keil C51 V6.10 and V7.05.
 *
 * $Revision: 1 $
 *
 *==============================================================================
*/
#include <Nordic VLSI\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 + =
减小字号Ctrl + -
显示快捷键?