| 전자부품 데이터시트 검색엔진 |
|
AD6635BB/PCB 데이터시트(PDF) 58 Page - Analog Devices |
|
|
|||||||||||||||||||||||||||||
AD6635BB/PCB 데이터시트(HTML) 58 Page - Analog Devices |
|
58 / 60 page ![]() REV. 0 –58– AD6635 INTERNAL WRITE ACCESS Up to 20 bits of data (as needed) can be written by the process described below. Any high order bytes that are needed are writ- ten to the corresponding data registers defined in the external 3-bit address space. The least significant byte is then written to DR0 at address (000). When a write to DR0 is detected, the internal microprocessor port state machine then moves the data in DR2–DR0 to the internal address pointed to by the address in the LAR and AMR. Write Pseudocode void write_micro(ext_address, int data); main(); { /* This code shows the programming of the NCO phase offset register using the write_micro function as defined above. The variable address is the External Address A[2:0] and data is the value to be placed in the external interface register. Internal Address = 0x87 */ // holding registers for NCO phase byte wide access data int d1, d0; // NCO phase word (16-bits wide) NCO_PHASE = 0xCBEF; // write ACR write_micro(7, 0x03 ); // write CAR write_micro(6, 0x87); // write DR1 with D[15:8] d1 = (NCO_PHASE & 0xFF00) >> 8; write_micro(1, d1); // write DR0 with D[7:0] // On this write all data is transferred to the internal address d0 = NCO_PHASE & 0xFF; write_micro(0, d0); } // end of main INTERNAL READ ACCESS A read is performed by first writing the CAR and AMR, as with a write. The data registers (DR2–DR0) are then read in the reverse order that they were written. First, the least significant byte of the data (D[7:0]) is read from DR0. On this transac- tion, the high bytes of the data are moved from the internal address pointed to by the CAR and AMR into the remaining data registers (DR2–DR1). This data can then be read from the data registers using the appropriate 3-bit addresses. The num- ber of data registers used depends solely on the amount of data to be read or written. Any unused bit in a data register should be masked out for a read. Read Pseudocode int read_micro(ext_address); main(); { /* This code shows the reading of the first RCF coefficient using the read_micro function as defined above. The variable address is the External Address A[2..0]. Internal Address = 0x000 */ // holding registers for the coefficient int d2, d1, d0; // coefficient (20-bits wide) long coefficient; // write AMR write_micro(7, 0x00 ); // write LAR write_micro(6, 0x00); /* read D[7:0] from DR0, All data is moved from the Internal Registers to the interface registers on this access */ d0 = read_micro(0) & 0xFF; // read D[15:8] from DR1 d1 = read_micro(1) & 0xFF; // read D[23:16] from DR2 d2 = read_micro(2) & 0x0F; coefficient = d0 + (d1 << 8) + (d2 << 16); } // end of main |
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 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 |