SN8F5703 : PWM 輸出

寄存器:
在这里插入图片描述


代碼:


#include <SN8F5703.h>

#define		P22_PWM10_ENABLE						0x01
#define		P24_PWM11_ENABLE						0x02
#define		P17_PWM12_ENABLE						0x04
#define		P23_PWM20_ENABLE						0x10
#define		P25_PWM21_ENABLE						0x20
#
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
1 1 1 产品简介 1.1 功能特性  产品性能列表 定时器 单片机名称 ROM RAM 堆栈 T0 TC0 TC1 T1 SIO MSP I/O 比较器 PWM 唤醒功能 引脚数目 封装形式 SN8P2522 2K*16 128 8 V V V V V - 16 8-ch 2 9 DIP18/SOP18/ SSOP20 SN8P2523 2K*16 256 8 V - V - V V 22 12-ch 8+1 14 SKDIP24/SOP24 /SSOP28 SN8P25231 2K*16 256 8 V - V - V V 16 8-ch 2+1 12 DIP18/SOP18/ SSOP20  存储器配置  1 个 8位基本定时器 T0 ROM:2K * 16 位。  1 个 8位定时器,具有占空比/周期可编程控制的 PWM 功能 RAM:256 * 8 位。  8 通道 LED PWM驱动  8 层堆栈缓存器  12 通道比较器  6 个中断源  SIO 串行输入/输出接口 5 个内部中断:T0,TC1,CM0,SIO,MSP。  MSP从动模式接口 1 个外部中断:INT0。  内置看门狗定时器,时钟源由内部低速 RC时钟提供 (16KHz @3V, 32KHz @5V)  I/O 引脚配置 双向输入输出端口:P0,P1,P5。 具有唤醒功能的端口:P0,P1 电平变换。  2 种系统时钟 具有上拉电阻的端口:P0,P1,P5。 内部高速时钟:RC,16MHz。 可编程的开漏引脚:P5.0~P5.2。 内部低速时钟:RC,16KHz(3V),32KHz(5V)。 比较器输入引脚:CM0N0~CM0N11。 比较器输出引脚:CM0O。  4 种工作模式 普通模式:高低速时钟正常工作。  Fcpu(指令周期) 低速模式:仅低速时钟工作。 Fcpu = Fpsc/1,Fpsc/2,Fosc/4,Fosc/8,Fosc/16。 睡眠模式:高低速时钟都停止工作。 绿色模式:由定时器周期性的唤醒。  功能强大的指令集 指令的长度为 1个字长。  封装形式 大多数指令只需要一个周期。 SKDIP 24 pin JMP/CALL 指令可寻址整个 ROM区。 SOP 24 pin 查表指令 MOVC 可寻址整个 ROM区。 SSOP 28 pin
1.1 FEATURES  Memory configuration  Four 8-bit timer. (T0, TC0, TC1, TC2). Flash ROM size: 6K x 16 bits. Including EEROM T0: Basic timer. emulation. (In system programming) TC0: Timer/counter/PWM0. RAM size: 512 x 8 bits. TC1: Timer/counter/PWM1.  8 levels stack buffer. TC2: Timer/counter/PWM2  13 interrupt sources  3 channel duty/cycle programmable PWM to 11 internal interrupts: T0, TC0, TC1, TC2, T1, ADC, Generate PWM, Buzzer and IR carrier signals. SIO, MSP, UTX(UART TX), URX(UART RX), WAKE (PWM0~2). 2 external interrupts: INT0, INT1  One 16-bit timer (T1) with capture timer function.  Multi-interrupt vector structure.  12- channel 10-bit SAR ADC. Each of interrupt sources has a unique interrupt vector.  Serial Interface: SIO, UART, MSP  Build in Embedded ICE function.  I/O pin configuration Bi-directional: P0, P1, P4, P5.  Four system clocks Wakeup: P0, P1 level change. External high clock: RC type up to 10MHz Pull-up resisters: P0, P1, P4, P5. External high clock: Crystal type up to 16MHz External interrupt: P0.0, P0.1 Internal high clock: RC type 16MHz ADC input pin: AIN0~AIN11. Internal low clock: RC type 16KHz  Four operating modes  Fcpu (Instruction cycle) Normal mode: Both high and low clock active Fcpu = Fhosc/1, Fhosc/2, Fhosc/4, Fhosc/8, Fhosc/16, Slow mode: Low clock only Fhosc/32, Fhosc/64, Fhosc/128 Sleep mode: Both high and low clock stop  On chip watchdog timer and clock source Green mode: Periodical wakeup by timer  1.8V/2.4V/3.3V 3-level LVD with trim.  Package (Chip form support) PDIP 32 pin  Powerful instructions LQFP 32 pin Instruction’s length is one word. QFN 32 pin Most of instructions are one cycle only. SKDIP 28 pin All ROM area JMP instruction. SOP 28 pin All ROM area lookup table function (MOVC). SSOP 28 pin QFN 28 pin DIP 20 pin SOP 20 pin
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值