| Electronic Components Datasheet Search |
|
AD420 Datasheet(PDF) 12 Page - Analog Devices |
|
|
|||||||||||||||||||||||||||||
AD420 Datasheet(HTML) 12 Page - Analog Devices |
|
12 / 16 page ![]() AD420 Rev. H | Page 12 of 16 MICROPROCESSOR INTERFACE AD420-TO-MC68HC11 (SPI BUS) INTERFACE The AD420 interface to the Motorola serial peripheral interface (SPI) is shown in Figure 11. The MOSI, SCK, and SS pins of the HC11 are respectively connected to the DATA IN, CLOCK, and LATCH pins of the AD420. The majority of the interfacing issues are done in the software initialization. A typical routine, such as the one shown below, begins by initializing the state of the various SPI data and control registers. INIT LDAA #$2F ; SS = 1; SCK = 0; MOSI = 1 STAA PORTD ;SEND TO SPI OUTPUTS LDAA #$38 ; SS, SCK, MOSI = OUTPUTS STAA DDRD ;SEND DATA DIRECTION INFO LDAA #$50 ;DABL INTRPTS, SPI IS MASTER & ON STAA SPCR ;CPOL = 0, CPHA = 0, 1MHZ BAUDRATE NEXTPT LDAA MSBY ;LOAD ACCUM W/UPPER 8 BITS BSR SENDAT ;JUMP TO DAC OUTPUT ROUTINE JMP NEXTPT ;INFINITE LOOP SENDAT LDY #$1000 ;POINT AT ON-CHIP REGISTERS BCLR $08,Y,$20 ;DRIVE SS (LATCH) LOW STAA SPDR ;SEND MS-BYTE TO SPI DATA REG WAIT1 LDAA SPSR ;CHECK STATUS OF SPIE BPL WAIT1 ;POLL FOR END OF X- MISSION LDAA LSBY ;GET LOW 8 BITS FROM MEMORY STAA SPDR ;SEND LS-BYTE TO SPI DATA REG WAIT2 LDAA SPSR ;CHECK STATUS OF SPIE BPL WAIT2; ;POLL FOR END OF X- MISSION BSET $08,Y,$20 ;DRIVE SS HIGH TO LATCH DATA RTS The SPI data port is configured to process data in 8-bit bytes. The most significant data byte (MSBY) is retrieved from memory and processed by the SENDAT routine. The SS pin is driven low by indexing into the PORTD data register and clear Bit 5. The MSBY is then sent to the SPI data register where it is automatically transferred to the AD420 internal shift resister. The HC11 generates the requisite eight clock pulses with data valid on the rising edges. After the MSBY is transmitted, the least significant byte (LSBY) is loaded from memory and transmitted in a similar fashion. To complete the transfer, the LATCH pin is driven high when loading the complete 16-bit word into the AD420. DATA IN CLOCK LATCH MOSI SCK SS 68HC11 AD420 Figure 11. AD420-to-68HC11 (SPI) Interface AD420 TO MICROWIRE INTERFACE The flexible serial interface of the AD420 is also compatible with the National Semiconductor MICROWIRE interface. The MICROWIRE interface is used in microcontrollers such as the COP400 and COP800 series of processors. A generic interface to use the MICROWIRE interface is shown in Figure 12. The G1, SK, and SO pins of the MICROWIRE interface are respectively connected to the LATCH, CLOCK, and DATA IN pins of the AD420. DATA IN CLOCK LATCH SO SK G1 MICROWIRE AD420 Figure 12. AD420-to-MICROWIRE Interface |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |