盛群单片机简介.ppt

上传人:王** 文档编号:184964 上传时间:2023-04-02 格式:PPT 页数:59 大小:2.54MB
下载 相关 举报
盛群单片机简介.ppt_第1页
第1页 / 共59页
盛群单片机简介.ppt_第2页
第2页 / 共59页
盛群单片机简介.ppt_第3页
第3页 / 共59页
盛群单片机简介.ppt_第4页
第4页 / 共59页
盛群单片机简介.ppt_第5页
第5页 / 共59页
盛群单片机简介.ppt_第6页
第6页 / 共59页
盛群单片机简介.ppt_第7页
第7页 / 共59页
盛群单片机简介.ppt_第8页
第8页 / 共59页
盛群单片机简介.ppt_第9页
第9页 / 共59页
盛群单片机简介.ppt_第10页
第10页 / 共59页
亲,该文档总共59页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《盛群单片机简介.ppt》由会员分享,可在线阅读,更多相关《盛群单片机简介.ppt(59页珍藏版)》请在优知文库上搜索。

1、2023/4/2Introduction of Holtek HT-46series MCU2023/4/2ContentFamily of A/D Type MCUi.Cost-Effective A/D type MCUii.A/D type MCUiii.A/D with LCD type MCUiv.A/D with VFD type MCUDetail of HT46R24i.Features of HT46R24ii.Block Diagramiii.Function Description(ROM, RAM, Interrupt, I/O, Timer, Buzzer, Osci

2、llator, ADC, I2C, PWM, .)2023/4/2Cost-Effective A/D Type MCU2023/4/2A/D Type MCU2023/4/2A/D with LCD Type MCU2023/4/2Features of HT46R242023/4/2Block Diagram2023/4/2HT46X24 PIN ASSIGMENT2023/4/2Program ROM and Interrupt Vector2023/4/2RAM MAPPINGSpecial Purpose Data Memory General Purpose Data Memory

3、 00h IAR0 10h TMR1L 20h HADR 01h MP0 11h TMR1C 21h HCR 02h IAR1 12h PA 22h HSR 03h MP1 13h PAC 23h HDR 04h BP 14h PB 24h ADRL 05h ACC 15h PBC 25h ADRH 06h PCL 16h PC 26h ADCR 07h TBLP 17h PCC 27h ACSR 08h TBLH 18h PD 28h PF 09h N.A. 19h PDC 29h PFC 0ah STATUS 1ah PWM0 0bh INTC0 1bh PWM1 0ch TMR0H 1c

4、h PWM2 0dh TMR0L 1dh PWM3 0eh TMR0C 1eh INTC1 0fh TMR1H 1fh N.A. 2ah . . . . 3fh N.A. 40h . . . . . . . . . . . . . . . ffh BANK 0 40h . . . . . . . . . . . . . . . ffh BANK 1 2023/4/263 InstructionsArithmeticlADD, SUBIncrement & DecrementlINC, INCA, DECLogic OperationlAND, OR, XORRotatelRR, RRC, RL

5、Data MovelMOVBit operationlSET, CLRTable ReadlTABRDC, TABRDLBranchlJMP, SZ, RET, RETIMiscellaneouslNOP, SWAP, HALT2023/4/2Arithmetic 2023/4/2Logic 2023/4/2Increment, Decrement, Rotate, Data Move, Bit Operation 2023/4/2Branch 2023/4/2Table Read ,Miscellaneous 2023/4/2Indirect AddressingIndirect addre

6、ssing Register:lIRA0,IRA1.Memory Pointers:lMP0,MP1.2023/4/2Status Register2023/4/2I/O Structure 2023/4/2InterruptInterrupt has priority issue.Once an interrupt subroutine is serviced, all the other interrupts will be block ( by cleaning the EMI flag).After the subroutine set the “RETI”, the EMI will

7、 be set again.2023/4/2Interrupt control register2023/4/2Interrupt Scheme2023/4/2Timer/Event Counter 02023/4/2Timer/Event Counter 12023/4/2Timer Control Register 02023/4/2Timer Control Register 12023/4/23 modes available for the Timer/Counter 1.Timer Mode 2.Event Counter Mode 3.Pulse Width Mode 2023/

8、4/24 steps to setup in the Timer Mode 1.Set to Timer Mode by writing 10 to TM1, TM0 2.Set the initial timer TMR value 3.Enable the corresponding interrupt by setting the ETI and EMI bit 4.Start the Timer by setting the TON bit of the TMRC 2023/4/25 steps to setup in the Even Counter Mode 1.Set to Ev

9、ent Counter Mode by writing 01 to TM1, TM0 2.Select TE=1 to count on the falling edge or TE=0 to count on the rising edge 3.Set the Timer initial value into TMR 4.Enable the corresponding interrupt by setting the ETI and EMI bits 5.Start the Timer by setting the TON bit in the TMRC register2023/4/25

10、 steps to setup in the Pulse Width Measurement Mode 1.Set to Pulse Width Mode by writing 11 to TM1, TM0 2.Select TE=1 to measure a High Pulse Width and TE=0 to measure a Low Pulse Width 3.Set the Timer initial value, TMR, usually set to 0H for Pulse Width Measurements 4.Enable the corresponding inte

11、rrupt by setting the ETI and EMI bits 5.Start the Timer by setting the TON bit in the TMRC 2023/4/2Programmable Frequency Divider (PFD) and BuzzerPFD is pin shared with PA3(selected via configuration optional).Clock source of PFD is come from timer0 or timer1 overflow signal (selected via configurat

12、ion optional).PFD output is controlled by switch on/off PA3.2023/4/2Watchdog TimerThe watchdog timer is provided to prevent program uncontrollable .3 clock sources can be selected as watchdog timing source: (by configuration)lT1(fsys /4) ,32KHz RTC,WDT OSC output.lAt HALT, only WDT OSC or RTC oscill

13、ator is still running.2023/4/2Watchdog RegisterIf watchdog timeout ,the system will be reset. The status bit “TO” will be set.There are two method of using software to clear watchdog timer (selected by configuration) :lOne instruction : CLR WDTlTwo instruction : CLR WDT1, CLR WDT2 2023/4/2PWMPWM is

14、Pulse Width Modulator. There are two modes 6+2 or 7+1 selected by configuration.User can change the duty cycle by softwarelby writing data to PWM0PWM3 special data register.PWM function can be controlled On/Off by software.lEnable PWM output : SET PD0lDisable PWM output : CLR PD0 2023/4/2PWM 6+2 Mod

15、e2023/4/2PWM 7+1 Mode2023/4/2Analog to Digital ConverterThe HT46R24 has a 10-bit ADC. ADC can be disabled by software.Max. 4 or 8 channels can input to the ADC.lChannels set in ADCR by softwareADC channels are pin-shared with Port B.lAs ADC input or Port B set in ADCR by softwareInput range is from

16、0 to VDD.Min. ADC clock period is 1 us.ADC sampling time is 32 ADC clocks.ADC convert time is 76 ADC clocks.Max. INL 1 LSB.2023/4/2ADC Convert Data RegisterADRL/ADRH are two registers to store the ADC convert data.2023/4/2A/D Convert Control Register2023/4/2A/D Convert Clock Source Register2023/4/2A/D Convert Timing Diagram2023/4/2I2C Bus InterfaceI2C bus is a bidirectional 2-wire serial interface.lSCL : serial clock pin.lSDA : serial data pin.I2C output is of open drain . An external pull high

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 通信/电子 > 电子设计

copyright@ 2008-2023 yzwku网站版权所有

经营许可证编号:宁ICP备2022001189号-2

本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!