| поискавой системы для электроныых деталей |
|
HT48F06E датащи(PDF) 21 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT48F06E датащи(HTML) 21 Page - Holtek Semiconductor Inc |
|
21 / 69 page ![]() HT48F06E/HT48F10E/HT48F30E Rev. 1.00 21 September 10, 2007 Initialising the EEPROM After the MCU is powered on and if the EEPROM is to be used, it must be initialised in a specific way before any user instructions are transmitted. This is achieved by first transmitting an EWEN instruction, then by issu- ing a WRITE instruction to write random data to any sin- gle address in the EEPROM. The initialisation procedure can then be terminated by issuing an EWDS instruction, however at this point, if actual user data is to be imminently written to the EEPROM, this last step is optional. N o Y e s I s s u e i n s t r u c t i o n A d d r e s s , D a t a I n t e r n a l w r i t e c y c l e i n i t i a t e d I n t e r n a l w r i t e c y c l e f i n i s h e d D O = " 1 " D O w i l l g o l o w h e r e t o i n d i c a t e i n t e r n a l w r i t e c y c l e s t i l l i n p r o g r e s s t S V d e l a y t C D S d e l a y C S C S Internal Write Cycle Busy Polling The following is an example program of how this can be implemented: 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. 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 7 ; Address length - 7-bits 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 ; |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |