HT46R47 Holtek, HT46R47 Datasheet

no-image

HT46R47

Manufacturer Part Number
HT46R47
Description
Manufacturer
Holtek
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Company:
Bonase Electronics (HK) Co., Limited Bonase Electronics (HK) Co., Limited
Part Number:
HT46R47
Manufacturer:
EVERLIGHT
Quantity:
2 300
Price:
Technical Document
Features
General Description
The Cost-Effective A/D Type MCU Devices are a series
of 8-bit high performance RISC architecture
microcontrollers, designed especially for applications
that interface directly to analog signals, such as those
from sensors. All devices include an integrated
multi-channel Analog to Digital Converter in addition to
one or two Pulse Width Modulation outputs. The usual
Holtek MCU features such as power down and wake-up
functions, oscillator options, programmable frequency
divider, etc. combine to ensure user applications require
a minimum of external components.
Rev. 1.20
Tools Information
FAQs
Application Note
Operating voltage:
f
f
13 to 23 bidirectional I/O lines
External interrupt input shared with an I/O line
8-bit programmable Timer/Event Counter with over-
flow interrupt and 7-stage prescaler
On-chip crystal and RC oscillator
Watchdog Timer function
PFD for audio frequency generation
Power down and wake-up functions to reduce power
consumption
SYS
SYS
HA0003E Communicating between the HT48 & HT46 Series MCUs and the HT93LC46 EEPROM
HA0049E Read and Write Control of the HT1380
HA0051E Li Battery Charger Demo Board - Using the HT46R47
HA0052E Microcontroller Application - Battery Charger
HA0075E MCU Reset and Oscillator Circuits Application Note
HA0083E Li Battery Charger Demo Board - Using the HT46R46
=4MHz: 2.2V~5.5V
=8MHz: 3.3V~5.5V
HT46R46/C46/R47/C47/R48A/C48A/R49
Cost-Effective A/D Type 8-Bit MCU
1
The benefits of integrated A/D and PWM functions, in
addition to low power consumption, high performance,
I/O flexibility and low-cost, provide these devices with
the versatility to suit a wide range of application possibil-
ities such as sensor signal processing, motor driving, in-
dustrial control, consumer products, subsystem
controllers, etc. Many features are common to all de-
vices, however, they differ in areas such as I/O pin
count, Program Memory capacity, A/D resolution, stack
capacity and package types.
Up to 0.5 s instruction cycle with 8MHz system clock
at V
4 or 6-level subroutine nesting
4 channels 8 or 9-bit resolution A/D converter
1 or 2 channel 8-bit PWM output shared with I/O lines
Bit manipulation instruction
Table read instructions
63 powerful instructions
All instructions executed in one or two machine
cycles
Low voltage reset function
Range of packaging types
DD
=5V
December 17, 2007

Related parts for HT46R47

HT46R47 Summary of contents

Page 1

... HA0003E Communicating between the HT48 & HT46 Series MCUs and the HT93LC46 EEPROM HA0049E Read and Write Control of the HT1380 HA0051E Li Battery Charger Demo Board - Using the HT46R47 HA0052E Microcontroller Application - Battery Charger HA0075E MCU Reset and Oscillator Circuits Application Note ...

Page 2

... Most features are common to all devices, the main feature distinguishing them are Program Memory capacity, I/O count, A/D resolution, stack capacity and package types. The following table summarises the main features of each de- vice. Program Data Part No. VDD Memory Memory HT46R46 2.2V HT46C46 5.5V HT46R47 2.2V HT46C47 5.5V HT46R48A 2.2V HT46C48A 5.5V 2.2V~ HT46R49 4K 15 128 8 5 ...

Page 3

... Pin Assignment Pin Description HT46R46, HT46R47 Configuration Pin Name I/O Option PA0~PA2 Bidirectional 8-bit input/output port. Each individual pin on this port can be config- PA3/PFD Pull-high ured as a wake-up input by a configuration option. Software instructions determine PA4/TMR I/O Wake-up if the pin is a CMOS output or Schmitt Trigger input. Configuration options deter- ...

Page 4

HT46R48A Configuration Pin Name I/O Option PA0~PA2 Bidirectional 8-bit input/output port. Each individual pin on this port can be config- PA3/PFD Pull-high ured as a wake-up input by a configuration option. Software instructions determine PA4/TMR I/O Wake-up if the pin ...

Page 5

HT46R49 Configuration Pin Name I/O Option PA0~PA2 Bidirectional 8-bit input/output port. Each individual pin on this port can be config- PA3/PFD Pull-high ured as a wake-up input by a configuration option. Software instructions deter- PA4/TMR I/O Wake-up mine if the ...

Page 6

D.C. Characteristics Symbol Parameter V Operating Voltage DD Operating Current I DD1 (Crystal OSC) Operating Current I DD2 (RC OSC) Operating Current I DD3 (Crystal OSC, RC OSC) Standby Current I STB1 (WDT Enabled) Standby Current I STB2 (WDT Disabled) ...

Page 7

... Interrupt Pulse Width INT A/D Clock Period t AD1 HT46R46 A/D Clock Period t AD2 HT46R47/HT46R48A/HT46R49 A/D Conversion Time t ADC1 HT46R46 A/D Conversion Time t ADC2 HT46R47/HT46R48A/HT46R49 A/D Sampling Time t ADCS1 HT46R46 A/D Sampling Time t ADCS2 HT46R47/HT46R48A/HT46R49 Note: *t =1/f SYS SYS Rev. 1.20 HT46R46/C46/R47/C47/R48A/C48A/R49 Test Conditions Min. V Conditions DD 2.2V~5.5V 400 3.3V~5.5V 400 2.2V~5.5V 0 3.3V~5. ...

Page 8

System Architecture A key factor in the high-performance features of the ...

Page 9

... S11~S0: Stack register bits For the HT46R49, the Program Counter is 12 bits wide, i.e. from b11~b0. For the HT46R47 and HT46R48A, the Program Counter is 11 bits wide, i.e. From b10~b0, therefore the b11 column in the table is not applicable. For the HT46R46, the Program Counter is 10 bits wide, i.e. from b9~b0, therefore the b11 and b10 the columns in the table are not applicable ...

Page 10

Stack This is a special part of the memory which is used to save the contents of the Program Counter only. The stack can have either levels depending upon which device is selected and is neither part ...

Page 11

... Program Memory Structure Table Program Example The following example shows how the table pointer and table data is defined and retrieved from the HT46R47 microcontroller. This example uses raw table data lo- cated in the last page which is stored there using the ORG statement. The value at this ORG statement is ...

Page 12

... PC11~PC8: Current Program Counter bits @7~@0: Table Pointer TBLP bits For the HT46R49 the Table address location is 12 bits, i.e. from b11~b0. For the HT46R47 and HT46R48A, the Table address location is 11 bits, i.e. from b10~b0. For the HT46R46, the Table address location is 10 bits, i.e. from b9~b0. Rev. 1.20 ...

Page 13

Note: Most of the Data Memory bits can be directly manipulated using the SET [m].i and CLR [m].i with the excep- tion of a few dedicated bits. The Data Memory can also be accessed through the memory pointer register MP. ...

Page 14

The following example shows how to clear a section of four RAM locations already defined as locations adres1 to adres4. data .section data adres1 db ? adres2 db ? adres3 db ? adres4 db ? block db ? code .section ...

Page 15

Accumulator - ACC The Accumulator is central to the operation of any microcontroller and is closely related with operations carried out by the ALU. The Accumulator is the place where all intermediate results from the ALU are stored. Without the ...

Page 16

In addition, on entering an interrupt sequence or execut- ing a subroutine call, the status register will not be pushed onto the stack automatically. If the contents of the status registers are important and if the subroutine can corrupt the ...

Page 17

... Input/Output Ports Holtek microcontrollers offer considerable flexibility on their I/O ports. With the input or output designation of ev- ery pin fully under user program control, pull-high op- tions for all ports and wake-up options on certain pins, the user is provided with an I/O structure to meet the needs of a wide range of application possibilities. ...

Page 18

PWM Outputs All devices contain one or two PWM outputs pin shared with pins PD0 and PD1. The PWM output functions are chosen via configuration options and re- main fixed after the device is programmed. Note that the corresponding bit ...

Page 19

PA3/PFD and PD/PWM Input/Output Ports Rev. 1.20 HT46R46/C46/R47/C47/R48A/C48A/R49 PB Input/Output Ports 19 December 17, 2007 ...

Page 20

I/O Pin Structures The following diagrams illustrate the I/O pin internal structures. As the exact logical construction of the I/O pin may differ from these drawings, they are supplied as a guide only to assist with the functional understanding of ...

Page 21

... Timer/Event Counter Control Register Rev. 1.20 HT46R46/C46/R47/C47/R48A/C48A/R49 Timer Control Register - TMRC The flexible features of the Holtek microcontroller Timer/Event Counters enable them to operate in three different modes, the options of which are determined by the contents of the Timer Control Register TMRC. To- gether with the TMR register, these two registers control the full operation of the Timer/Event Counters ...

Page 22

Configuring the Timer Mode In this mode, the timer can be utilised to measure fixed time intervals, providing an internal interrupt signal each time the counter overflows. To operate in this mode, bits TM1 and TM0 of the TMRC register ...

Page 23

As in the case of the other two modes, when the counter is full and overflows, the timer will be reset to the value already loaded into the preload register. If the timer in- terrupt is enabled, an interrupt signal ...

Page 24

Programming Considerations When configured to run in the timer mode, the internal system clock is used as the timer clock source and is therefore synchronized with the overall operation of the microcontroller. In this mode when the appropriate timer register ...

Page 25

Pulse Width Modulator Each microcontroller in the Cost-effective A/D Type MCU series contains either one or two Pulse Width Modulation, PWM, outputs. Useful for such applications such as motor speed control, the PWM function pro- vides outputs with a fixed ...

Page 26

The following diagram illustrates the waveforms associ- ated with the 6+2 mode of PWM operation impor- tant to note how the single PWM cycle is subdivided into 4 individual modulation cycles, numbered from 0~3 and how the AC ...

Page 27

... Input Conversion Device Channels Bits HT46R46 4 8 HT46R47 4 9 HT46R48A 4 9 HT46R49 4 9 The following diagram shows the overall internal struc- ture of the A/D converter, together with its associated registers ...

Page 28

The ADCR control register also contains the PCR2~PCR0 bits which determine which pins on Port B are used as analog inputs for the A/D converter and which pins are to be used as normal I/O pins. If the 3-bit address ...

Page 29

ADCS1, ADCS0=00 SYS (f /2) SYS 1MHz 2 s 2MHz 1 s 4MHz 500ns* 8MHz 250ns* A/D Input Pins All of the A/D analog input pins are pin-shared with the I/O pins on Port B. Bits PCR2~PCR0 in the ...

Page 30

The following timing diagram shows graphically the various stages involved in an analog to digital conversion process and its associated timing. The setting up and operation of the A/D converter func- tion is fully under the control of the application ...

Page 31

A/D Programming Example The following two programming examples illustrate how to setup and implement an A/D conversion. In the first exam- ple, the method of polling the EOCB bit in the ADCR register is used to detect when the conversion ...

Page 32

Example: using an interrupt method to detect the end of conversion for the HT46R46 clr EADI mov a,00000001B mov ACSR,a mov a,00100000B mov ADCR Start_conversion: clr START set START clr START clr ADF set EADI set EMI : ...

Page 33

A/D Transfer Function As the HT46R46 device contain an 8-bit A/D converter, their full-scale converted digitized value is equal to 0FFH. Since the full-scale analog input value is equal to the voltage, this gives a single bit analog input value ...

Page 34

Interrupts Interrupts are an important part of any microcontroller system. When an external event or an internal function such as a Timer/Event Counter or an A/D converter re- quires microcontroller attention, their corresponding in- terrupt will enforce a temporary suspension ...

Page 35

Stack Pointer is decremented. If immediate service is desired, the stack must be prevented from becoming full. Interrupt Priority Interrupts, occurring in the interval between the rising edges of two consecutive T2 pulses, will ...

Page 36

... Basic Reset Circuit For applications that operate within an environment where more noise is present the Enhanced Reset Cir- cuit shown is recommended. Enhanced Reset Circuit More information regarding external reset circuits is located in Application Note HA0075E on the Holtek website invoked to provide December 17, 2007 ...

Page 37

RES Pin Reset This type of reset occurs when the microcontroller is already running and the RES pin is forcefully pulled low by external hardware such as an external switch. In this case as in the case of other reset, ...

Page 38

HT46R46 Reset Register (Power-on ACC PCL TBLP ...

Page 39

... HT46R47 Reset Register (Power-on ACC PCL TBLP TBLH STATUS INTC TMR TMRC ...

Page 40

HT46R48A Reset Register (Power-on ACC PCL TBLP ...

Page 41

HT46R49 Reset Register (Power-on ACC PCL TBLP ...

Page 42

... R refer to the Holtek website for typical RC Oscillator vs. Temperature and VDD characteristics graphics. that it is the only microcontroller internal circuitry to- gether with the external resistor, that determine the fre- quency of the oscillator ...

Page 43

... WDT oscillator by configuration option. Power Down Mode and Wake-up Power Down Mode All of the Holtek microcontrollers have the ability to enter a Power Down Mode, also known as the HALT Mode or Sleep Mode. When the device enters this mode, the nor- mal operating current, will be reduced to an extremely low standby current level ...

Page 44

If an interrupt request flag is set to 1 be- fore entering the Power Down Mode, the wake-up func- tion of the related interrupt will be disabled. No matter what the source of the wake-up event is, once ...

Page 45

Configuration Options Configuration options refer to certain options within the MCU that are programmed into the device during the program- ming process. During the development process, these options are selected using the HT-IDE software development tools. As these options are ...

Page 46

... Logical and Rotate Operations The standard logical operations such as AND, OR, XOR and CPL all have their own instruction within the Holtek microcontroller instruction set. As with the case of most instructions involving data manipulation, data must pass through the Accumulator which may involve additional programming steps ...

Page 47

... Bit Operations The ability to provide single bit operations on Data Mem- ory is an extremely flexible feature of all Holtek microcontrollers. This feature is especially useful for output port bit programming where individual bits or port pins can be directly set high or low using either the SET [m] ...

Page 48

Mnemonic Rotate RRA [m] Rotate Data Memory right with result in ACC RR [m] Rotate Data Memory right RRCA [m] Rotate Data Memory right through Carry with result in ACC RRC [m] Rotate Data Memory right through Carry RLA [m] ...

Page 49

Instruction Definition ADC A,[m] Add Data Memory to ACC with Carry Description The contents of the specified Data Memory, Accumulator and the carry flag are added. The result is stored in the Accumulator. Operation ACC ACC + [ ...

Page 50

CALL addr Subroutine call Description Unconditionally calls a subroutine at the specified address. The Program Counter then in- crements obtain the address of the next instruction which is then pushed onto the stack. The specified address is ...

Page 51

CPL [m] Complement Data Memory Description Each bit of the specified Data Memory is logically complemented (1 s complement). Bits which previously contained a 1 are changed to 0 and vice versa. Operation [m] [m] Affected flag(s) Z CPLA [m] ...

Page 52

INC [m] Increment Data Memory Description Data in the specified Data Memory is incremented by 1. Operation [m] [ Affected flag(s) Z INCA [m] Increment Data Memory with result in ACC Description Data in the specified Data Memory ...

Page 53

OR A,x Logical OR immediate data to ACC Description Data in the Accumulator and the specified immediate data perform a bitwise logical OR op- eration. The result is stored in the Accumulator. Operation ACC ACC OR x Affected flag(s) Z ...

Page 54

RLC [m] Rotate Data Memory left through Carry Description The contents of the specified Data Memory and the carry flag are rotated left by 1 bit. Bit 7 replaces the Carry bit and the original carry flag is rotated into ...

Page 55

SBC A,[m] Subtract Data Memory from ACC with Carry Description The contents of the specified Data Memory and the complement of the carry flag are sub- tracted from the Accumulator. The result is stored in the Accumulator. Note that if ...

Page 56

SIZ [m] Skip if increment Data Memory is 0 Description The contents of the specified Data Memory are first incremented the result is 0, the following instruction is skipped. As this requires the insertion of a dummy ...

Page 57

SWAP [m] Swap nibbles of Data Memory Description The low-order and high-order nibbles of the specified Data Memory are interchanged. Operation [m].3~[m].0 Affected flag(s) None SWAPA [m] Swap nibbles of Data Memory with result in ACC Description The low-order and ...

Page 58

XOR A,[m] Logical XOR Data Memory to ACC Description Data in the Accumulator and the specified Data Memory perform a bitwise logical XOR op- eration. The result is stored in the Accumulator. Operation ACC ACC XOR [m] Affected flag(s) Z ...

Page 59

Package Information 16-pin NSOP (150mil) Outline Dimensions Symbol Rev. 1.20 HT46R46/C46/R47/C47/R48A/C48A/R49 Dimensions in mil Min. Nom. 228 149 14 386 Max. 244 157 20 ...

Page 60

DIP (300mil) Outline Dimensions Symbol Rev. 1.20 HT46R46/C46/R47/C47/R48A/C48A/R49 Dimensions in mil Min. Nom. 895 240 125 125 16 50 100 295 335 0 60 Max. 915 260 135 145 20 ...

Page 61

SOP (300mil) Outline Dimensions Symbol Rev. 1.20 HT46R46/C46/R47/C47/R48A/C48A/R49 Dimensions in mil Min. Nom. 394 290 14 447 Max. 419 300 20 460 104 ...

Page 62

DIP (300mil) Outline Dimensions Symbol Rev. 1.20 HT46R46/C46/R47/C47/R48A/C48A/R49 Dimensions in mil Min. Nom. 1020 240 125 125 16 50 100 295 335 0 62 Max. 1045 260 135 145 20 ...

Page 63

SOP (300mil) Outline Dimensions Symbol Rev. 1.20 HT46R46/C46/R47/C47/R48A/C48A/R49 Dimensions in mil Min. Nom. 394 290 14 490 Max. 419 300 20 510 104 ...

Page 64

SSOP (150mil) Outline Dimensions Symbol Rev. 1.20 HT46R46/C46/R47/C47/R48A/C48A/R49 Dimensions in mil Min. Nom. 228 150 8 335 Max. 244 158 12 347 65 ...

Page 65

SKDIP (300mil) Outline Dimensions Symbol Rev. 1.20 HT46R46/C46/R47/C47/R48A/C48A/R49 Dimensions in mil Min. Nom. 1235 255 125 125 16 50 100 295 345 0 65 Max. 1265 265 135 145 20 ...

Page 66

SOP (300mil) Outline Dimensions Symbol Rev. 1.20 HT46R46/C46/R47/C47/R48A/C48A/R49 Dimensions in mil Min. Nom. 394 290 14 590 Max. 419 300 20 614 104 ...

Page 67

SSOP (150mil) Outline Dimensions Symbol Rev. 1.20 HT46R46/C46/R47/C47/R48A/C48A/R49 Dimensions in mil Min. Nom. 228 150 8 335 Max. 244 157 12 346 60 ...

Page 68

SKDIP (300mil) Outline Dimensions Symbol Rev. 1.20 HT46R46/C46/R47/C47/R48A/C48A/R49 Dimensions in mil Min. Nom. 1375 278 125 125 16 50 100 295 330 0 68 Max. 1395 298 135 145 20 ...

Page 69

SOP (300mil) Outline Dimensions Symbol Rev. 1.20 HT46R46/C46/R47/C47/R48A/C48A/R49 Dimensions in mil Min. Nom. 394 290 14 697 Max. 419 300 20 713 104 ...

Page 70

Product Tape and Reel Specifications Reel Dimensions SOP 16N (150mil) Symbol Description A Reel Outer Diameter B Reel Inner Diameter C Spindle Hole Diameter D Key Slit Width T1 Space Between Flange T2 Reel Thickness SOP 18W Symbol Description A ...

Page 71

SOP 20W Symbol Description A Reel Outer Diameter B Reel Inner Diameter C Spindle Hole Diameter D Key Slit Width T1 Space Between Flange T2 Reel Thickness SSOP 20S (150mil) Symbol Description A Reel Outer Diameter B Reel Inner Diameter ...

Page 72

SOP 28W (300mil) Symbol Description A Reel Outer Diameter B Reel Inner Diameter C Spindle Hole Diameter D Key Slit Width T1 Space Between Flange T2 Reel Thickness Rev. 1.20 HT46R46/C46/R47/C47/R48A/C48A/R49 Dimensions in mm 330 1 62 1.5 13+0.5 0.2 ...

Page 73

Carrier Tape Dimensions SOP 16N (150mil) Symbol Description W Carrier Tape Width P Cavity Pitch E Perforation Position F Cavity to Perforation (Width Direction) D Perforation Diameter D1 Cavity Hole Diameter P0 Perforation Pitch P1 Cavity to Perforation (Length Direction) ...

Page 74

SOP 20W Symbol Description W Carrier Tape Width P Cavity Pitch E Perforation Position F Cavity to Perforation (Width Direction) D Perforation Diameter D1 Cavity Hole Diameter P0 Perforation Pitch P1 Cavity to Perforation (Length Direction) A0 Cavity Length B0 ...

Page 75

SOP 24W Symbol Description W Carrier Tape Width P Cavity Pitch E Perforation Position F Cavity to Perforation (Width Direction) D Perforation Diameter D1 Cavity Hole Diameter P0 Perforation Pitch P1 Cavity to Perforation (Length Direction) A0 Cavity Length B0 ...

Page 76

SOP 28W (300mil) Symbol Description W Carrier Tape Width P Cavity Pitch E Perforation Position F Cavity to Perforation (Width Direction) D Perforation Diameter D1 Cavity Hole Diameter P0 Perforation Pitch P1 Cavity to Perforation (Length Direction) A0 Cavity Length ...

Page 77

... Holtek s products are not authorized for use as critical components in life support devices or systems. Holtek reserves the right to alter its products without prior notification. For the most up-to-date information, please visit our web site at http://www ...

Related keywords