| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
HT46F49E bảng dữ liệu(PDF) 25 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT46F49E bảng dữ liệu(HTML) 25 Page - Holtek Semiconductor Inc |
|
25 / 88 page ![]() HT46F46E/HT46F47E/HT46F48E/HT46F49E Rev. 1.40 25 July 28, 2009 The following program example shows how to initialise the EEPROM after power-on: mov A,01h mov BP,A ; set to bank 1 mov A,40h mov MP1,A ; set MP1 to EECR address Call EWEN ; subroutine to run EWEN instructions mov A, 7Fh mov EEADDR, A mov A, 55h mov EEDATA, A call WRITE ; subroutine to run WRITE instruction ; write 55h data to address 7Fh call EWDS ; optional subroutine to run EWDS instruction EEPROM Program Examples The following short programs gives examples of how to send instructions, read and write to the EEPROM. These pro- grams can form a basis of understanding as to how the internal EEPROM memory is to be used to store and retrieve data. The programs are for use with the HT46F49E device, which has the same capacity internal EEPROM memory of 256 ´8 bits. For the other devices, which have a smaller 128´8 bit EEPROM memory capacity, the dummy bit which is inserted between the instruction code transmission and the address MSB, is not transmitted. Example 1 - Definitions and Sending Instructions to the EEPROM _CS EQU IAR1.4 ; EEPROM lines setup to have a corresponding _SK EQU IAR1.5 ; Bit in the Indirect Addressing Register IAR1 _DI EQU IAR1.6 ; EEPROM can only be indirectly addressed using MP1 _DO EQU IAR1.7 _EECR EQU 40H ; Setup address of the EEPROM control register C_Addr_Length EQU 8 ; Address length - 8-bits for this device C_Data_Length EQU 8 ; Data length - always 8-bits ; DATA .SECTION at 70h ¢DATA¢ EE_command DB ? ; Stores the read or write instruction information ADDR DB ? ; Store write data or read data address WR_Data DB ? ; Store read or write data COUNT DB ? ; Temporary counter ; WriteCommand: ; Write instruction code subroutine MOV A,3 ; Read, write and erase instructions are 3 bits long MOV COUNT,A WriteCommand_0: CLR _DI ; Prepare the transmitted bit SZ EE_command.7 ; Check value of highest instruction code bit SET _DI SET _SK CLR _SK CLR C RLC EE_command ; Get next bit of instruction code SDZ COUNT ; Check if last bit has been transmitted JMP WriteCommand_0 CLR _DI RET |
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |