Using the Data EEPROM in the HT66Fxx

Size: px
Start display at page:

Download "Using the Data EEPROM in the HT66Fxx"

Transcription

1 Using the Data EEPROM in the HT66Fxx D/N: AN0191E Introduction The HT66Fxx series device contains an area of internal EEPROM Data Memory. The following gives a description about the EEPROM Data Memory using the HT66F40. Operation Principle The read/write function of the EEPROM in the HT66Fxx series device can be easily carried out by setting corresponding values to its related registers. There are three relevant registers: the address register EEA [41H], the data register EED [42H] and the control register EEC [140H], among which the EEA register and the EED register are located in BANK0, while the EEC register is located in BANK1. The EEA register is used for setting the address to be written to or read from the EEPROM. The EED register is used for the data that is to be written to the EEPROM or to save the data being read in the read mode. The EEC register is the EEPROM read/write control register and is located in BANK1 and needs to be operated using indirect addressing using the Indirect Address register, IAR1, and the Memory Pointer register, MP1. The following depicts the steps of the EEPROM read/write function: 1. Set the address to be read or written to the EEA register. 2. Set the data value to be written to the EED register (only in the write mode.) 3. Set the BP.0 to 1 to operate in BANK1. 4. Set the MP1 Memory Pointer to point to the EEC register of the EEPROM. 5. Set the read/write enable mode. 6. Set the read/write operation. 7. Wait for the completion of the read/write operation. 8. After the operations, the RD bit in the read mode or WT bit in the write mode will be cleared automatically to zero. Data read from the read mode is stored in the EED register where the interrupt require flag DEF will be set as 1. 1

2 Program Examples Two program examples are provided as follows. Example 1 is used to execute a read/write operation to the EEPROM using direct addressing. The description is mainly focused on how to setup the address register, the data register and the single control register to implement the read/write operation. Example 2 is used to execute a read/write operation using interrupts, which shows the way to implement a read/write function by setting the relevant interrupt registers and then enter the interrupt service routine. Example<1> : Read/Write EEPROM using a polling method ; Program name : EEPROM write and read mode (write_read.asm) ; Object : write data into the EEPROM and read out for comparison ; EEPROM interrupt : Disable ; Option : no demand ; Program list : #INCLUDE HT66F40.INC --- DATA.SECTION 'DATA' ADDR_TEMP DB? ; FEEPROM address variable DATA_TEMP DB? ; EPROM data variable CODE.SECTION 'CODE' ORG 00H JMP MAIN ORG 04H ; external interrupt 0 entry ORG 08H ; external interrupt 1 entry ORG 0CH ; comparator 0 interrupt entry ORG 010H ; comparator 0 interrupt entry ORG 014H ; CTM/STM CCRP or CCRA compare match interrupt entry ORG 018H ; ETM CCRP, CCRA or CCRB compare match interrupt entry ORG 01CH ; A/D interrupt entry ORG 020H ; SPI/I2C or external peripheral interrupt entry ORG 024H ; Time base 0 interrupt entry ORG 028H ; Time base 1 interrupt entry ORG 02CH ; LVD or EEPROM write/read interrupt entry ORG 30H MAIN: CLR PAC ; PA output ; PC output SET PAPU 2

3 SET PCPU CLR INTC0 ; disable interrupt MOV A,01H MOV SMOD,A ; set the system frequency as FH MOV A,0AH MOV WDTC,A ; disable WDT MOV CP0C,A MOV CP1C,A MOV ACERL,A MOV SCOMC,A WRITE_EEPROM: ; write mode ; set the address of the data to be written MOV A,055H MOV DATA_TEMP,A ; set the written data value -- ;EEPROM writing module -- WRITE_EEPROM_LOOP: MOV A,DATA_TEMP MOV EED,A SET IAR1.3 ; enable write SET IAR1.2 ; start writing WRITE_WAIT: SZ IAR1.2 ; wait for write completion, then clear WT to zero automatically JMP WRITE_WAIT NOP ; write completed NOP NOP CLR BP.0 CLR EEA CLR EED READ_EEPROM: ; read mode ; set the address of the data to be read ;FEEPROM reading module -- READ_EEPROM_LOOP: SET IAR1.1 ; enable read SET IAR1.0 ; start reading READ_WAIT: SZ IAR1.0 ; wait for read completion, and then clear RD to zero automatically JMP READ_WAIT MOV A, EED ; read completed, save the data to the EED register XOR A, DATA_TEMP ; compare the read/write data, and check if correct 3

4 SZ ACC ; false - output PC waveform CPL PA ; correct output PA waveform JMP WRITE_EEPROM FAIL: INC PC Program Description These examples depict the way to implement read/write operations to the EEPROM. In the description, a simple read and write operation to one address and data of the EEPROM is provided. The operating result will be compared with the value read from the EEPROM after writing 055H to [00H] of the EEPROM. If the values are the same, the PA port will output the waveform or else the PC port will output the waveform. Users can directly apply the writing or reading operation modules to their applications with some modifications to the ADDR_TEMP and DATA_TEMP. If more data reading and writing is required, call the operating module as a subroutine and modify the ADDR_TEMP and DATA_TEMP to be written and read. The operating method is as follows. Writing Module : write_eeprom_loop: mov a,addr_temp mov eea,a ; set the write data address mov a,data_temp mov eed,a ; set the write data value set bp.0 mov a,40h mov mp1,a set IAr1.3 ; enable write set IAr1.2 ; start writing WRITE_WAIT: sz IAr1.2 ; wait for write completion and then clear WT to zero automatically jmp WRITE_WAIT ret Reading Module: read_eeprom_loop: mov a,addr_temp mov eea,a ; set the write data address set bp.0 mov a,40h mov mp1,a set IAr1.1 ; enable read set IAr1.0 ; start reading READ_WAIT: sz IAr1.0 ; wait for read completion and then clear RD to zero automatically jmp READ_WAIT mov a, eed ; reading completed, save the data to the EED register ret 4

5 Example< 2> : EEPROM read/write operation using interrupts ; Program Name : enable EEPROM read/write mode interrupt (write_int.asm) ; Object : read/write operation to EEPROM with interrupts ; EEPROM interrupt : Enable ; Option: no demand ; Program List: #INCLUDE HT66F40.INC --- DATA.SECTION 'DATA' ADDR_TEMP DB? ; EEPROM address variable DATA_TEMP DB? ; EEPROM data variable TEMP DB? ; variable EEPROM_INT_FLAG DBIT ; interrupt flag CODE.SECTION 'CODE' ORG 00H JMP MAIN ORG 04H ; external interrupt0 entry ORG 08H ; external interrupt1 entry ORG 0CH ; comparator0 interrupt entry ORG 010H ; comparator1 interrupt entry ORG 014H ; CTM/STM CCRP or CCRA compare match interrupt entry ORG 018H ; ETM CCRP, CCRA or CCRB compare match interrupt entry ORG 01CH ; A/D interrupt entry ORG 020H ; SPI/I2C or external peripheral interrupt entry ORG 024H ; Time base 0 interrupt entry ORG 028H ; Time base 1 interrupt entry ORG 02CH ; LVD or EEPROM write/read 中斷入口 JMP EEPROM_INTERRUPT ORG 30H MAIN: CLR PAC ; PA output ; PC output SET PAPU SET PCPU CLR INTC0 ; disable interrupt MOV A,01H MOV SMOD,A ; set the system frequency as FH MOV A,0AH MOV WDTC,A ; disable WDT MOV CP0C,A MOV CP1C,A MOV ACERL,A MOV SCOMC,A SET EMI ; enable master interrupt SET DEE ; enable EEPROM interrupt 5

6 SET MF3E ; enable multi-function interrupt CLR DEF ; initialize interrupt request bit CLR EEPROM_INT_FLAG ; initialize flag -- WRITE_EEPROM: ; write mode ; set the write data address MOV A,055H MOV DATA_TEMP,A ; set the write data value -- ; EEPROM writing module ; WRITE_EEPROM_LOOP: MOV A,DATA_TEMP MOV EED,A SET IAR1.3 ; enable write SET IAR1.2 ; start writing WRITE_WAIT: SNZ EEPROM_INT_FLAG ; decide if the interrupt service routine is finished JMP WRITE_WAIT CLR EEPROM_INT_FLAG CLR TEMP READ_EEPROM: ; read mode ; set the address of the data to be read ; EEPROM reading module ;F READ_EEPROM_LOOP: SET IAR1.1 ; enable read SET IAR1.0 ; start reading READ_WAIT: SNZ EEPROM_INT_FLAG ; decide if the interrupt service routine has finished JMP READ_WAIT CLR EEPROM_INT_FLAG MOV A, TEMP ; this variable is the data being read XOR A, DATA_TEMP ; compare the read and write value SZ ACC ; false, PC outputs waveform CPL PA ; correct, PA outputs waveform JMP WRITE_EEPROM FAIL: INC PC EEPROM_INTERRUPT: ; EEPROM interrupt subroutine SET EEPROM_INT_FLAG 6

7 MOV A,EED ; save variables to the data being read MOV TEMP,A CLR DEF ; clear interrupt request flag by software for the next interrupt to be generated Program Description This example depicts how an EEPROM interrupt is generated and how its interrupt service routine is executed. When setting an EEPROM interrupt, there are three related control bits which must be set. These are it. Once an interrupt is generated, the interrupt require flag DEF will be set to 1 which will not be changed automatically to zero after entering the interrupt service routine. To ensure proper generation of following interrupts, it is necessary to clear the DEF bit to zero using the application program. The example here continuously writes 55H to one of the addresses in the EEPROM and compares it with the data values being read from the EEPROM. The interrupt request flag DEF will be set to 1 at every completion of a data read/write operation which will then generate an interrupt and then enter an interrupt service routine. Special Notes 1. To execute an EEPROM write operation, when using indirect addressing to setup the EEC register, first set the WTEN bit before setting the WT bit, in that order. 2. The EEC register, being located in BANK1, can only be setup using indirect addressing. 3. After an interrupt is generated, the system will not automatically clear the interrupt request flag DEF to zero. This must be executed using the application program to enable the next interrupt to be generated. During this process, read-only or write-only is allowed. In the write mode, the system will automatically erase the previous write operation. 7

Read and Write Control of the HT1380

Read and Write Control of the HT1380 Read and Write Control of the HT1380 D/N HA0049E Introduction Driver Description This application note applies to the HT48XXX and HT46XXX MCU devices. The HT1380/HT1381 is a standard Holtek device which

More information

HT1380 HT driver READ_ driver WRITE_1380

HT1380 HT driver READ_ driver WRITE_1380 HA0049s HT1380/HT1381 MCU 32K HT1380/HT1381 DRIVER driver driver rw_ht1380.asm I/O.section data equ driver 1 driver READ_1380 none acc time_temp, time_count 2 driver WRITE_1380 acc none time_temp, time_count

More information

Read and Write Control of the HT1380/HT1381

Read and Write Control of the HT1380/HT1381 Read and Write Control of the HT1380/HT1381 D/N:AN0049E Introduction Driver Description This application note applies to the HT48xxx and HT46xxx MCU devices. The HT1380/ HT1381 is a standard Holtek device

More information

Ultra-Low Voltage R to F Flash MCU BH67F2132

Ultra-Low Voltage R to F Flash MCU BH67F2132 Revision: V1.00 Date: November 12, 2018 Table of Contents Features... 5 CPU Features... 5 Peripheral Features... 5 General Description... 6 Block Diagram... 6 Pin Assignment... 7 Pin Descriptions... 7

More information

HT48F06E/HT48F10E/HT48F30E I/O Flash Type MCU with EEPROM

HT48F06E/HT48F10E/HT48F30E I/O Flash Type MCU with EEPROM I/O Flash Type MCU with EEPROM Features Operating voltage: f SYS =4MHz: 2.2V~5.5V f SYS =8MHz: 3.3V~5.5V f SYS =12MHz: 4.5V~5.5V Multi-programmable Flash Type Program Memory EEPROM data memory: 128 8 From

More information

Enhanced Flash MCU with EEPROM HT66F016/HT66F017 HT68F016/HT68F017 HT66F016R/HT66F017R HT68F016R/HT68F017R

Enhanced Flash MCU with EEPROM HT66F016/HT66F017 HT68F016/HT68F017 HT66F016R/HT66F017R HT68F016R/HT68F017R Enhanced Flash MCU with EEPROM HT66F016/HT66F017 HT68F016/HT68F017 HT66F016R/HT66F017R HT68F016R/HT68F017R Revision: 1.40 Date: November 22, 2016 Table of Contents General Description...7 Features...7

More information

HT48F70E I/O Flash Type MCU with EEPROM

HT48F70E I/O Flash Type MCU with EEPROM I/O Flash Type MCU with EEPROM Features Operating voltage: f SYS =4MHz: 2.2V~5.5V f SYS =8MHz: 3.3V~5.5V f SYS =12MHz: 4.5V~5.5V Multi-programmable Flash Type Program Memory: 819216 EEPROM Data Memory:

More information

HT48RAx/HT48CAx Software Application

HT48RAx/HT48CAx Software Application HT48RAx/HT48CAx Software Application Note D/N: HA0076E Introduction CALL and JUMP will load the BP to program counter. Interrupt will store the contents of program counter into stack. RETI/RET will load

More information

Controlling the HT1621 LCD Controller With the HT48 MCU Series

Controlling the HT1621 LCD Controller With the HT48 MCU Series Controlling the HT1621 LCD Controller With the HT48 MCU Series D/N HA0018E Introduction The HT1621 is a 128-bit multi-function LCD controller device with internal RAM memory mapping. The software configuration

More information

HT45R0072 I/O 8-Bit MCU with USB Interface

HT45R0072 I/O 8-Bit MCU with USB Interface I/O 8-Bit MCU with USB Interface Features Operating voltage: f SYS =6M/2MHz: 3.6V~5.5V (VBUS) Low voltage reset function 34 bidirectional I/O lines (max.) 8-bit programmable timer/event counter with overflow

More information

HT82B40R/HT82B40A I/O 8-Bit MCU with USB Interface

HT82B40R/HT82B40A I/O 8-Bit MCU with USB Interface I/O 8-Bit MCU with USB Interface Features Operating voltage: f SYS =6M/2MHz: 3.3V~5.5V Low voltage reset function 34 bidirectional I/O lines (max.) 8-bit programmable timer/event counter with overflow

More information

Enhanced I/O Flash Type MCU HT68F005/HT68F006

Enhanced I/O Flash Type MCU HT68F005/HT68F006 HT68F005/HT68F006 Revision: V1.00 Date: October 22, 2012 Table of Contents Features... 6 CPU Features... 6 Peripheral Features... 6 General... 7 Selection Table... 7 Block Diagram... 8 Pin Assignment...

More information

HT48 & HT46 MCU UART Software Implementation Method

HT48 & HT46 MCU UART Software Implementation Method HT48 & HT46 MCU UART Software Implementation Method HT48 & HT46 MCU UART Software Implementation Method D/NHA0004E Introduction With low power consumption and high performance, Holtek s 8-bit microcontrollers

More information

Using the HT45R36 and HT45R38 to implement Touch Switches

Using the HT45R36 and HT45R38 to implement Touch Switches Using the HT45R36 and HT45R38 to implement Touch Switches D/N: HA0115E Introduction This example uses the C/R to F internal feature of the HT45R36 and HT45R38 to implement a Touch Switch. It is one way

More information

8-Bit Touch Key Flash MCU BS83B08A-3/BS83B08A-4 BS83B12A-3/BS83B12A-4 BS83B16A-3/BS83B16A-4

8-Bit Touch Key Flash MCU BS83B08A-3/BS83B08A-4 BS83B12A-3/BS83B12A-4 BS83B16A-3/BS83B16A-4 BS83B08A-3/BS83B08A-4 BS83B12A-3/BS83B12A-4 BS83B16A-3/BS83B16A-4 Revision: V1.00 Date: May 02, 2013 Table of Contents Features... 6 CPU Features... 6 Peripheral Features... 6 General Description... 7

More information

Pin Assignment 2 ) # 2 ) % 2 ) $ 2 )! 2 ) 6 2 ) 2 )! " 4 # $ % /, & ' ' & % $ # "! 2 ) " : /, * ) 6 8,, * $ * 2 ) # 2 ) %

Pin Assignment 2 ) # 2 ) % 2 ) $ 2 )! 2 ) 6 2 ) 2 )!  4 # $ % /, & ' ' & % $ # ! 2 )  : /, * ) 6 8,, * $ * 2 ) # 2 ) % RF One Channel Mouse 8-bit OTP MCU Technical Document Tools Information FAQs Application Note HA0075E MCU Reset and Oscillator Circuits Application Note Features Operating voltage: f SYS = 27MHz: 2.0V~3.3V

More information

HT46F46E/HT46F47E/HT46F48E/HT46F49E. Cost-Effective A/D Flash Type 8-Bit MCU with EEPROM. Technical Document. Features. General Description

HT46F46E/HT46F47E/HT46F48E/HT46F49E. Cost-Effective A/D Flash Type 8-Bit MCU with EEPROM. Technical Document. Features. General Description Cost-Effective A/D Flash Type 8-Bit MCU with EEPROM Technical Document Tools Information FAQs Application Note HA0052E Microcontroller Application - Battery Charger HA0075E MCU Reset and Oscillator Circuits

More information

Fire Protection Flash MCU BA45F0082

Fire Protection Flash MCU BA45F0082 BA45F0082 Revision: V1.00 Date: August 17, 2017 Table of Contents Features... 6 CPU Features... 6 Peripheral Features... 6 General Description... 7 Block Diagrams... 7 Pin Assignment... 8 Pin Description...

More information

Preliminary. Technical Document. Features. General Description HT66F03C/ HT66F04C/HT68F03C/ HT68F04C. 8-Pin Enhanced Flash Type 8-Bit MCU with EEPROM

Preliminary. Technical Document. Features. General Description HT66F03C/ HT66F04C/HT68F03C/ HT68F04C. 8-Pin Enhanced Flash Type 8-Bit MCU with EEPROM HT66F03C/ HT66F04C/HT68F03C/ HT68F04C 8-Pin Enhanced Flash Type 8-Bit MCU with EEPROM Technical Document Application Note HA0075E MCU Reset and Oscillator Circuits Application Note Features CPU Features

More information

PIR 8-Bit Flash MCU HT45F0027

PIR 8-Bit Flash MCU HT45F0027 HT45F0027 Revision: V1.20 Date: January 21, 2016 Table of Contents Features... 6 CPU Features... 6 Peripheral Features... 6 General Description... 7 Block Diagram... 7 Pin Assignment... 8 Pin Description...

More information

I/O RF Transparent Transmission Flash MCU BC68F0031

I/O RF Transparent Transmission Flash MCU BC68F0031 Revision: V1.01 Date: April 11, 2017 Table of Contents Features... 6 CPU Features... 6 Peripheral Features... 6 General Description... 7 Block Diagram... 7 Pin Assignment... 8 Pin Description... 9 Absolute

More information

Enhanced A/D Flash MCU with High Current LED Driver HT66F24D/HT66F25D/HT66F26D

Enhanced A/D Flash MCU with High Current LED Driver HT66F24D/HT66F25D/HT66F26D HT66F24D/HT66F25D/HT66F26D Revision: V1.60 Date: August 02, 2018 Table of Contents Features... 6 CPU Features... 6 Peripheral Features... 6 General Description... 7 Selection Table... 7 Block Diagram...

More information

Assembly Language programming (2)

Assembly Language programming (2) EEE3410 Microcontroller Applications LABORATORY Experiment 2 Assembly Language programming (2) Name Class Date Class No. Marks Arithmetic, Logic and Jump instructions Objectives To learn and practice the

More information

A/D Flash MCU with EEPROM HT66F018

A/D Flash MCU with EEPROM HT66F018 HT66F018 Revision: V1.90 Date: December 07, 2017 Table of Contents Features... 7 CPU Features... 7 Peripheral Features... 7 General Description... 8 Block Diagram... 8 Pin Assignment... 9 Pin Description...

More information

315/433MHz RF Super-regenerative Receiver SoC Flash MCU BC68F2420

315/433MHz RF Super-regenerative Receiver SoC Flash MCU BC68F2420 BC68F2420 Revision: V1.00 Date: May 24, 2017 Table of Contents Features... 6 CPU Features... 6 Peripheral Features... 6 RF Receiver Features... 7 General Description... 7 Block Diagram... 8 Pin Assignment...

More information

HT46R01/HT46R02/HT46R03

HT46R01/HT46R02/HT46R03 1-Pin MSOP A/D Type 8-Bit OTP MCU Technical Document Tools Information FAQs Application Note HA3E Communicating between the HT48 & HT46 Series MCUs and the HT93LC46 EEPROM HA16E Writing and Reading to

More information

Voice MCU Workshop V2.3 User Guide

Voice MCU Workshop V2.3 User Guide Voice MCU Workshop V2.3 User Guide Revision: V1.50 Date: September 15, 2017 Table of Contents 1 Voice MCU Workshop Description... 4 Development platform Introduction and Software Installation... 4 Characteristics...

More information

HT95R22 I/O Type Phone 8-bit MCU

HT95R22 I/O Type Phone 8-bit MCU I/O Type Phone 8-bit MCU Features Operating voltage at f SYS = 3.58MHz: 2.2V~5.5V 4K6 OTP type Program Memory 5768 Data Memory 8 bidirectional I/Os with pull-high options 2 NMOS output-only lines External

More information

Cost-Effective A/D Flash MCU with EEPROM HT66F005/HT66F006

Cost-Effective A/D Flash MCU with EEPROM HT66F005/HT66F006 HT66F005/HT66F006 Revision: V1.30 Date: April 27, 2017 Table of Contents Features... 6 CPU Features... 6 Peripheral Features... 6 General Description... 7 Selection Table... 7 Block Diagram... 8 Pin Assignment...

More information

3. (a) Explain the steps involved in the Interfacing of an I/O device (b) Explain various methods of interfacing of I/O devices.

3. (a) Explain the steps involved in the Interfacing of an I/O device (b) Explain various methods of interfacing of I/O devices. Code No: R05320202 Set No. 1 1. (a) Discuss the minimum mode memory control signals of 8086? (b) Explain the write cycle operation of the microprocessor with a neat timing diagram in maximum mode. [8+8]

More information

A/D Flash MCU HT66F0182

A/D Flash MCU HT66F0182 HT66F0182 Revision: V1.10 Date: August 28, 2017 Table of Contents Features... 5 CPU Features...5 Peripheral Features...5 General Description... 6 Block Diagram... 6 Pin Assignment... 7 Pin Description...

More information

HT48 & HT46 LCM Interface Design

HT48 & HT46 LCM Interface Design HT48 & HT46 LCM Interface Design D/N HA0013E Introduction The following note introduces a way of using 8 bit MCUs to control a DV16100NRB LCD display driver. The LCM is driven and controlled by a built-in

More information

HT56R67/HT56R668/HT56R678 TinyPower TM A/D Type with LCD 8-Bit OTP MCU

HT56R67/HT56R668/HT56R678 TinyPower TM A/D Type with LCD 8-Bit OTP MCU TinyPower TM A/D Type with LCD 8-Bit OTP MCU Technical Document Application Note HA0075E MCU Reset and Oscillator Circuits Application Note Features Operating voltage: f SYS =100kHz: 2.2V~5.5V f SYS =4MHz:

More information

HT82K70E-L/HT82K70A-L/HT82K76E-L I/O Type 8-Bit MCU

HT82K70E-L/HT82K70A-L/HT82K76E-L I/O Type 8-Bit MCU I/O Type 8-Bit MCU Features Operating voltage: 1.8V~5.5V 43 bidirectional I/O lines Program Memory: 4K16 -- HT82K70E-L/HT82K70A-L 8K16 -- HT82K76E-L 2168 Data RAM One external interrupt input shared with

More information

HT95R54/HT95R55 CID Phone 8-Bit MCU

HT95R54/HT95R55 CID Phone 8-Bit MCU CID Phone 8-Bit MCU Features Operating voltage: f SYS =3.58MHz: 2.2V~5.5V f SYS =7.16MHz: 3.0V~5.5V f SYS =10.74MHz: 3.0V~5.5V f SYS =14.32MHz: 4.5V~5.5V Program Memory: 8K16 (HT95R54) 16K16 (HT95R55)

More information

HT36A4 Music Synthesizer 8-Bit MCU

HT36A4 Music Synthesizer 8-Bit MCU Music Synthesizer 8-Bit MCU Technical Document Tools Information FAQs Application Note Features Operating voltage: 2.4V~5.0V Operating frequency: 3.58MHz~2MHz (typ. 8MHz) 8 bidirectional I/O lines Two

More information

8051 Microcontroller

8051 Microcontroller 8051 Microcontroller EE4380 Fall 2001 Pari vallal Kannan Center for Integrated Circuits and Systems University of Texas at Dallas 8051 Architecture Programmer s View Register Set Instruction Set Memory

More information

Small Package 8-Bit OTP MCU HT48R005/HT46R005

Small Package 8-Bit OTP MCU HT48R005/HT46R005 Small Package 8-Bit OTP MCU HT48R005/HT46R005 Revision: 1.00 November 29, 2011 Table of Contents Features...5 CPU Features...5 Peripheral Features...5 General...5 Selection Table...6 Block Diagram...6

More information

HT46R46/C46/R47/C47/R48A/C48A/R49 Cost-Effective A/D Type 8-Bit MCU

HT46R46/C46/R47/C47/R48A/C48A/R49 Cost-Effective A/D Type 8-Bit MCU Cost-Effective A/D Type 8-Bit MCU Features Operating voltage: f SYS =4MHz: 2.2V~5.5V f SYS =8MHz: 3.3V~5.5V 13 to 23 bidirectional I/O lines External interrupt input shared with an I/O line 8-bit programmable

More information

Cost-Effective Flash MCU with EEPROM HT68F002/HT68F0025/HT68F003

Cost-Effective Flash MCU with EEPROM HT68F002/HT68F0025/HT68F003 HT68F002/HT68F0025/HT68F003 Revision: V1.41 Date: April 11, 2017 Table of Contents Features... 5 CPU Features... 5 Peripheral Features... 5 General Description... 6 Selection Table... 6 Block Diagram...

More information

Control Transfer Instructions Jump, Loop, and Call. ECE473/573 Microprocessor System Design, Dr. Shiue

Control Transfer Instructions Jump, Loop, and Call. ECE473/573 Microprocessor System Design, Dr. Shiue Control Transfer Instructions Jump, Loop, and Call 1 Jump Instructions JZ label ; Jump if A=0 JNZ label ; Jump if A!=0 DJNZ reg, label ; Decrement and Jump if A (or reg.)!=0 CJNE A, byte ; Compare and

More information

Cost-Effective A/D Flash MCU with EEPROM HT66F007/HT66F008

Cost-Effective A/D Flash MCU with EEPROM HT66F007/HT66F008 Revision: V1.50 Date: August 29, 2017 Table of Contents Features... 6 CPU Features... 6 Peripheral Features... 6 General Description... 7 Block Diagram... 7 Selection Table... 8 Pin Assignment... 8 Pin

More information

8051 Microcontroller Assembly Programming

8051 Microcontroller Assembly Programming 8051 Microcontroller Assembly Programming EE4380 Fall 2002 Class 3 Pari vallal Kannan Center for Integrated Circuits and Systems University of Texas at Dallas Topics Machine code 8051 Addressing Modes

More information

HT46RU26/HT46CU26 A/D Type 8-Bit MCU with UART

HT46RU26/HT46CU26 A/D Type 8-Bit MCU with UART A/D Type 8-Bit MCU with UART Technical Document Tools Information FAQs Application Note HA0003E Communicating between the HT48 & HT46 Series MCUs and the HT93LC46 EEPROM HA0049E Read and Write Control

More information

Enhanced I/O Type 8-Bit OTP MCU HT48R063B/HT48R064B HT48R065B/HT48R066B

Enhanced I/O Type 8-Bit OTP MCU HT48R063B/HT48R064B HT48R065B/HT48R066B Enhanced I/O Type 8-Bit OTP MCU HT48R063B/HT48R064B HT48R065B/HT48R066B Revision: 1.20 Date: June 3, 2013 Table of Contents General...6 Features...6 CPU Features...6 Peripheral Features...6 Technical Document...6

More information

8051 Programming using Assembly

8051 Programming using Assembly 8051 Programming using Assembly The Instruction Addressing Modes dest,source ; dest = source A,#72H ;A=72H A, # r ;A= r OR 72H R4,#62H ;R4=62H B,0F9H ;B=the content of F9 th byte of RAM DPTR,#7634H DPL,#34H

More information

Brushless DC Motor Flash MCU HT45FM2C

Brushless DC Motor Flash MCU HT45FM2C HT45FM2C Revision: V1.30 Date: December 16, 2016 Table of Contents Features... 7 CPU Features... 7 Peripheral Features... 7 General Description... 8 Block Diagram... 8 Pin Assignment... 9 Pin Description...

More information

Holtek C Compiler V3 FAQ

Holtek C Compiler V3 FAQ Revision: V1.60 Date: May 05, 2017 Notice 1. This document may be not the latest version. As Holtek's tools and documents will continue to be updated, some dialog boxes and tool descriptions in actual

More information

8-Bit Flash MCU with Op Amps & Comparators HT45F23/HT45F43

8-Bit Flash MCU with Op Amps & Comparators HT45F23/HT45F43 HT45F23/HT45F43 Revision : 1.20 Date : September 15, 2011 Contents Table of Contents Features...7 CPU Features...7 Peripheral Features...7 General Description...8 Block Diagram...9 Pin Assignment...9 Pin

More information

Microcontroller Intel [Instruction Set]

Microcontroller Intel [Instruction Set] Microcontroller Intel 8051 [Instruction Set] Structure of Assembly Language [ label: ] mnemonic [operands] [ ;comment ] Example: MOV R1, #25H ; load data 25H into R1 2 8051 Assembly Language Registers

More information

This document mainly describes how to use EM78M680 EEPROM function.

This document mainly describes how to use EM78M680 EEPROM function. Application Notes 1 Introduction This document mainly describes how to use EM78M680 EEPROM function. 2 How to use EM78M680 ADC In order to make use of EEPROM function, please refer to following steps.

More information

Memory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples.

Memory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples. MICROCONTROLLERS AND APPLICATIONS 1 Module 2 Module-2 Contents: Memory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples. MEMORY

More information

~: Simple Programs in 8051 assembly language :~

~: Simple Programs in 8051 assembly language :~ ~: Simple Programs in 8051 assembly language :~ Here some simple programs of 8051 are given to understand the operation of different instructions and to understand the logic behind particular program.

More information

AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo

AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo 1 Lecture Overview AVR ISA AVR Instructions & Programming (I) Basic construct implementation 2 Atmel AVR 8-bit RISC architecture

More information

HT45R36 C/R to F Type 8-Bit OTP MCU

HT45R36 C/R to F Type 8-Bit OTP MCU C/R to F Type 8-Bit OTP MCU Technical Document Tools Information FAQs Application Note Features Operating voltage: f SYS =4MHz: 2.2V~5.5V f SYS =8MHz: 3.3V~5.5V 25 bidirectional I/O lines Two external

More information

CPEG300 Embedded System Design. Lecture 6 Interrupt System

CPEG300 Embedded System Design. Lecture 6 Interrupt System CPEG300 Embedded System Design Lecture 6 Interrupt System Hamad Bin Khalifa University, Spring 2018 Correction Lecture 3, page 18: Only direct addressing mode is allowed for pushing or popping the stack:

More information

A/D Type 8-Bit OTP MCU HT45R2W

A/D Type 8-Bit OTP MCU HT45R2W HT45R2W Revision: 1.00 Date: February 08, 2012 Table of Contents Features... 5 CPU Features... 5 Peripheral Feature... 5 General... 6 Block Diagram... 6 Pin Assignment... 6 Pin... 7 Absolute Maximum Ratings...

More information

Introduction To MCS-51

Introduction To MCS-51 Introduction To MCS-51 By Charoen Vongchumyen Department of Computer Engineering Faculty of Engineering KMITLadkrabang 8051 Hardware Basic Content Overview Architechture Memory map Register Interrupt Timer/Counter

More information

AVR ISA & AVR Programming (I)

AVR ISA & AVR Programming (I) AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo Week 1 1 Lecture Overview AVR ISA AVR Instructions & Programming (I) Basic construct implementation Week 1 2 1 Atmel AVR 8-bit

More information

A/D Flash MCU with EEPROM HT66F019

A/D Flash MCU with EEPROM HT66F019 HT66F019 Revision: V1.00 Date: December 01, 2017 Table of Contents Features... 7 CPU Features... 7 Peripheral Features... 7 General Description... 8 Block Diagram... 8 Pin Assignment... 9 Pin Description...

More information

ELEG3923 Microprocessor Ch.4 I/O Ports

ELEG3923 Microprocessor Ch.4 I/O Ports Department of Electrical Engineering University of Arkansas ELEG3923 Microprocessor Ch.4 I/O Ports Dr. Jingxian Wu wuj@uark.edu OUTLINE 2 8051 I/O programming I/O bit manipulation programming I/O PORT

More information

COMP2121: Microprocessors and Interfacing

COMP2121: Microprocessors and Interfacing Interfacing Lecture 9: Program Control Instructions http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 1, 2006 Program control instructions in AVR Stacks Overview Sample AVR assembly programs

More information

Assembly Language programming (3)

Assembly Language programming (3) EEE3410 Microcontroller Applications LABORATORY Experiment 3 Assembly Language programming (3) Name Class Date Class No. Marks Conditional Program Branching and Subroutine Call in 8051 Objectives To learn

More information

Assembly Language Programming of 8085

Assembly Language Programming of 8085 Assembly Language Programming of 8085 1. Introduction A microprocessor executes instructions given by the user Instructions should be in a language known to the microprocessor Microprocessor understands

More information

Microprocessors 1. The 8051 Instruction Set. Microprocessors 1 1. Msc. Ivan A. Escobar Broitman

Microprocessors 1. The 8051 Instruction Set. Microprocessors 1 1. Msc. Ivan A. Escobar Broitman Microprocessors 1 The 8051 Instruction Set Microprocessors 1 1 Instruction Groups The 8051 has 255 instructions Every 8-bit opcode from 00 to FF is used except for A5. The instructions are grouped into

More information

HT48R11 8-bit OTP Microcontrollers

HT48R11 8-bit OTP Microcontrollers 8-bit OTP Microcontrollers Features Operating voltage: 3.0V~5.2V 8 bidirectional I/O lines Interrupt input 8-bit programmable timer/event counter with overflow interrupt On-chip crystal and RC oscillator

More information

HT48R32 8-bit OTP Microcontrollers

HT48R32 8-bit OTP Microcontrollers 8-bit OTP Microcontrollers Features Operating voltage: 3.0V~5.2V 22 bidirectional I/O lines An interrupt input An 8-bit programmable timer/event counter with overflow interrupt On-chip crystal and RC oscillator

More information

HT48F10E. I/O Type 8-Bit Flash MCU With EEPROM. Technical Document. Features. General Description. Tools Information FAQs Application Note

HT48F10E. I/O Type 8-Bit Flash MCU With EEPROM. Technical Document. Features. General Description. Tools Information FAQs Application Note I/O Type 8-Bit Flash MCU With EEPROM Technical Document Tools Information FAQs Application Note Features Operating voltage: f SYS =4MHz: 2.2V~5.5V f SYS =8MHz: 3.3V~5.5V Low voltage reset function 9 bidirectional

More information

AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo

AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo 1 Lecture Overview AVR ISA AVR Instructions & Programming (I) Basic construct implementation 2 Atmel AVR 8-bit RISC architecture

More information

Chapter 2 Sections 1 8 Dr. Iyad Jafar

Chapter 2 Sections 1 8 Dr. Iyad Jafar Introducing the PIC 16 Series and the 16F84A Chapter 2 Sections 1 8 Dr. Iyad Jafar Outline Overview of the PIC 16 Series An Architecture Overview of the 16F84A The 16F84A Memory Organization Memory Addressing

More information

Enhanced A/D Type 8-Bit OTP MCU HT46R064B/HT46R065B/HT46R066B

Enhanced A/D Type 8-Bit OTP MCU HT46R064B/HT46R065B/HT46R066B Enhanced A/D Type 8-Bit OTP MCU HT46R064B/HT46R065B/HT46R066B Revision: 1.10 Date : October 23, 2012 Contents Table of Contents General...6 Features...6 CPU Features...6 Peripheral Features...6 Technical

More information

I/O Emulated UART Baud Rate Calibration Application Note

I/O Emulated UART Baud Rate Calibration Application Note I/O Emulated UART Baud Rate Calibration Application Note D/N: AN0475E Introduction Not every HOLTEK MCU contains a Universal Asynchronous Receiver/Transmitter function, otherwise known as a UART. If this

More information

S.R.M. INSTITUTE OF SCIENCE & TECHNOLOGY SCHOOL OF ELECTRONICS & COMMUNICATION ENGINEERING

S.R.M. INSTITUTE OF SCIENCE & TECHNOLOGY SCHOOL OF ELECTRONICS & COMMUNICATION ENGINEERING S.R.M. INSTITUTE OF SCIENCE & TECHNOLOGY SCHOOL OF ELECTRONICS & COMMUNICATION ENGINEERING QUESTION BANK Subject Code : EC307 Subject Name : Microprocessor and Interfacing Year & Sem : III Year, V Sem

More information

LCDD Application Note

LCDD Application Note 1 Feature: LCDD Application Note SM79108 incorporates an on-chip LCD driver which generates and common signals output according to the display data saved in registers (0E1H~0E7H) and incorporates and common

More information

HT48F50E. I/O Type 8-Bit Flash MCU With EEPROM. Technical Document. Features. General Description. Tools Information FAQs Application Note

HT48F50E. I/O Type 8-Bit Flash MCU With EEPROM. Technical Document. Features. General Description. Tools Information FAQs Application Note I/O Type 8-Bit Flash MCU With EEPROM Technical Document Tools Information FAQs Application Note Features Operating voltage: f SYS =4MHz: 2.2V~5.5V f SYS =8MHz: 3.3V~5.5V Low voltage reset function 33 bidirectional

More information

C51 Family. Architectural Overview of the C51 Family. Summary

C51 Family. Architectural Overview of the C51 Family. Summary Architectural Overview of the C51 Family C51 Family Summary 1. Introduction............................................................ I.1. 1.1. TSC80C51/80C51/80C31.................................................................

More information

Today s Menu. >Use the Internal Register(s) >Use the Program Memory Space >Use the Stack >Use global memory

Today s Menu. >Use the Internal Register(s) >Use the Program Memory Space >Use the Stack >Use global memory Today s Menu Methods >Use the Internal Register(s) >Use the Program Memory Space >Use the Stack >Use global memory Look into my See examples on web-site: ParamPassing*asm and see Methods in Software and

More information

ELEC VIDEO BIOS ROUTINES

ELEC VIDEO BIOS ROUTINES It is less confusing to the user if we remove unnecessary messages from the display before giving information or instructions. At the command prompt, we do this with the DOS command CLS. However, this

More information

UNIT-IV. The semiconductor memories are organized as two-dimensional arrays of memory locations.

UNIT-IV. The semiconductor memories are organized as two-dimensional arrays of memory locations. UNIT-IV MEMORY INTERFACING WITH 8086: The semi conductor memories are of two types: Static RAM Dynamic RAM The semiconductor memories are organized as two-dimensional arrays of memory locations. For Ex:

More information

Dodatak. Skup instrukcija

Dodatak. Skup instrukcija Dodatak Skup instrukcija Arithmetic Operations [@Ri] implies contents of memory location pointed to by R0 or R1 Rn refers to registers R0-R7 of the currently selected register bank 2 ADD A,

More information

HT46R46-H Cost-Effective A/D Type 8-Bit OTP MCU

HT46R46-H Cost-Effective A/D Type 8-Bit OTP MCU Cost-Effective A/D Type 8-Bit OTP MCU Technical Document Tools Information FAQs Application Note HA0003E Communicating between the HT48 & HT46 Series MCUs and the HT93LC46 EEPROM HA0009E HT48 & HT46 MCU

More information

UNIT 2 THE 8051 INSTRUCTION SET AND PROGRAMMING

UNIT 2 THE 8051 INSTRUCTION SET AND PROGRAMMING UNIT 2 THE 8051 INSTRUCTION SET AND PROGRAMMING Instructions Alphabetical List of Instructions ACALL: Absolute Call ADD, ADDC: Add Accumulator (With Carry) AJMP: Absolute Jump ANL: Bitwise AND CJNE: Compare

More information

EECE.3170: Microprocessor Systems Design I Summer 2017

EECE.3170: Microprocessor Systems Design I Summer 2017 EECE.3170: Microprocessor Systems Design I Summer 2017 Lecture 8: Key Questions June 5, 2017 1. (Review) Describe the structure of a typical x86 stack frame. EECE.3170: Microprocessor Systems Design I

More information

SN8F5000 Family Instruction Set

SN8F5000 Family Instruction Set SONiX Technology Co., Ltd. 8051-based Microcontroller 1 Overview SN8F5000 is 8051 Flash Type microcontroller supports comprehensive assembly instructions and which are fully compatible with standard 8051.

More information

TUTORIAL Assembly Language programming (2)

TUTORIAL Assembly Language programming (2) 8051 Assembly Language programming (2) TUTORIAL 4 EEE3410 Microcontroller Applications 1. Write the instructions to move value 34h into register A and value 3Fh into register B, then add them together.

More information

Subject Code: Model Answer Page No: /25

Subject Code: Model Answer Page No: /25 Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2) The model answer and the answer written by candidate

More information

Application Note. Interfacing the X9241 XDCPs to 8051 Microcontrollers AN20. by Applications Staff, June 2000

Application Note. Interfacing the X9241 XDCPs to 8051 Microcontrollers AN20. by Applications Staff, June 2000 Interfacing the X9241 XDCPs to 8051 Microcontrollers by Applications Staff, June 2000 The X9241 has a variety of different instructions that provide flexibility to the designer. Additionally, the nonvolatile

More information

HT48R30A-1/HT48C30-1 I/O Type 8-Bit MCU

HT48R30A-1/HT48C30-1 I/O Type 8-Bit MCU I/O Type 8-Bit MCU Features Operating voltage: f SYS =4MHz: 2.2V~5.5V f SYS =8MHz: 3.3V~5.5V Low voltage reset function 25 bidirectional I/O lines (max.) interrupt input shared with an I/O line 8-bit programmable

More information

Chapter 6 Interrupts. (I. Scott Mackenzie) By: Masud-ul-Hasan

Chapter 6 Interrupts. (I. Scott Mackenzie) By: Masud-ul-Hasan Chapter 6 Interrupts (I. Scott Mackenzie) 1 Interrupts An interrupt is the occurrence of an event that causes a temporary suspension of a program while the condition is serviced by another program. It

More information

HALT function and wake-up feature reduce power consumption Six-level subroutine nesting Bit manipulation instructions Crystal or RC oscillator

HALT function and wake-up feature reduce power consumption Six-level subroutine nesting Bit manipulation instructions Crystal or RC oscillator 8-Bit Multimedia Keyboard Encoder OTP MCU Features Operating voltage: 2.4V~5.5V 32/34 bidirectional I/O lines One 8-bit programmable timer counter with overflow interrupts HALT function and wake-up feature

More information

Multi-channel RGB LED Flash MCU HT45F0062

Multi-channel RGB LED Flash MCU HT45F0062 Revision: V1.00 Date: August 27, 2018 Table of Contents Features... 5 CPU Features...5 Peripheral Features...5 General Description... 6 Block Diagram... 6 Pin Assignment... 7 Pin Description... 7 Absolute

More information

MASSEY UNIVERSITY PALMERSTON NORTH CAMPUS

MASSEY UNIVERSITY PALMERSTON NORTH CAMPUS MASSEY UNIVERSITY PALMERSTON NORTH CAMPUS EXAMINATION FOR 159.233 COMPUTER SYSTEMS Semester One June 2008 Time allowed: THREE (3) hours This exam contains THREE (3) questions ANSWER ALL THREE (3) QUESTIONS

More information

Contents 8051 Instruction Set BY D. BALAKRISHNA, Research Assistant, IIIT-H Chapter I : Control Transfer Instructions Lesson (a): Loop Lesson (b): Jump (i) Conditional Lesson (c): Lesson (d): Lesson (e):

More information

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATION ENGINEERING QUESTION BANK

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATION ENGINEERING QUESTION BANK Course Name Course Code Class Branch INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad - 500 04 ELECTRONICS AND COMMUNICATION ENGINEERING QUESTION BANK : Microprocessors and Microcontrollers :

More information

HT49R50A-1 Using a thermistor to implement a thermometer

HT49R50A-1 Using a thermistor to implement a thermometer HT49R50A-1 Using a thermistor to implement a thermometer D/:HA0098E Introduction This application note uses the HT49R50A-1 microcontroller. The pins PC.0, PC.1 and PC.2 are used to read the value on a

More information

Assembly Language Programming of 8085

Assembly Language Programming of 8085 Assembly Language Programming of 8085 Topics 1. Introduction 2. Programming model of 8085 3. Instruction set of 8085 4. Example Programs 5. Addressing modes of 8085 6. Instruction & Data Formats of 8085

More information

HT48R05A-1/HT48C05/ HT48R06A-1/HT48C06/HT48R08A-1 Cost-Effective I/O Type 8-Bit MCU

HT48R05A-1/HT48C05/ HT48R06A-1/HT48C06/HT48R08A-1 Cost-Effective I/O Type 8-Bit MCU HT48R5A-/HT48C5/ HT48R6A-/HT48C6/HT48R8A- Cost-Effective I/O Type 8-Bit MCU Technical Document Tools Information FAQs Application Note HA3E Communicating between the HT48 & HT46 Series MCUs and the HT93LC46

More information

Microcomputer Architecture..Second Year (Sem.2).Lecture(2) مدرس المادة : م. سندس العزاوي... قسم / الحاسبات

Microcomputer Architecture..Second Year (Sem.2).Lecture(2) مدرس المادة : م. سندس العزاوي... قسم / الحاسبات 1) Input/output In computing, input/output or I/O, is the communication between an information processing system (such as a computer) and the outside world, possibly a human or another information processing

More information

Using the HT45R38 to Measure Current and Voltage and Power Adjustment for Electric Hotplates

Using the HT45R38 to Measure Current and Voltage and Power Adjustment for Electric Hotplates Using the HT45R38 to Measure Current and Voltage and Power Adjustment for Electric Hotplates D/N: HA0146E Introduction In past years Electric Hotplates have become a common household electrical appliance

More information

Module I. Microcontroller can be classified on the basis of their bits processed like 8bit MC, 16bit MC.

Module I. Microcontroller can be classified on the basis of their bits processed like 8bit MC, 16bit MC. MICROCONTROLLERS AND APPLICATIONS 1 Module 1 Module I Introduction to Microcontrollers: Comparison with Microprocessors Harvard and Von Neumann Architectures - 80C51 microcontroller features - internal

More information