| 数据搜索系统,热门电子元器件搜索 |
|
LTC1598 数据表(PDF) 8 Page - Linear Technology |
|
|
|||||||||||||||||||||||||||||
LTC1598 数据表(HTML) 8 Page - Linear Technology |
|
8 / 12 page ![]() 8 LTC1598 Microprocessor Interfaces The LTC1598 can interface directly (without external hard- ware) to most popular microprocessors’ (MPU) synchro- nous serial formats including MICROWIRE TM, SPI and QSPI. If an MPU without a dedicated serial port is used, then three of the MPU’s parallel port lines can be pro- grammed to form the serial link to the LTC1598. Included here is one serial interface example. Motorola SPI (MC68HC05) The MC68HC05 has been chosen as an example of an MPU with a dedicated serial port. This MPU transfers data MSB- first and in 8-bit increments. The DIN word sent to the data register starts the SPI process. With three 8-bit transfers the A/D result is read into the MPU. The second 8-bit transfer clocks B11 through B7 of the A/D conversion result into the processor. The third 8-bit transfer clocks the remaining bits B6 through B0 into the MPU. ANDing the second byte with 1FHEX clears the three most signifi- cant bits and ANDing the third byte with FEHEX clears the least significant bit. Shifting the data to the right by one bit results in a right justified word. TYPICAL APPLICATIONS MC68HC05 CODE LDA #$52 Configuration data for serial peripheral control register (Interrupts disabled, output enabled, master, Norm = 0, Ph = 0, Clk/16) STA $0A Load configuration data into location $0A (SPCR) LDA #$FF Configuration data for I/O ports (all bits are set as outputs) STA $04 Load configuration data into Port A DDR ($04) STA $05 Load configuration data into Port B DDR ($05) STA $06 Load configuration data into Port C DDR ($06) LDA #$08 Put DIN word for LTC1598 into Accumulator (CH0 with respect to GND) STA $50 Load DIN word into memory location $50 START BSET 0,$02 Bit 0 Port C ($02) goes high (CS goes high) LDA $50 Load DIN word at $50 into Accumulator STA $0C Load DIN word into SPI data register ($0C) and start clocking data LOOP1 TST $0B Test status of SPIF bit in SPI status register ($0B) BPL LOOP1 Loop if not done with transfer to previous instruction BCLR 0,$02 Bit 0 Port C ($02) goes low (CS goes low) LDA $0C Load contents of SPI data register into Accumulator STA $0C Start next SPI cycle LOOP2 TST $0B Test status of SPIF BPL LOOP2 Loop if not done LDA $0C Load contents of SPI data register into Accumulator STA $0C Start next SPI cycle AND #$IF Clear 3 MSBs of first DOUT word STA $00 Load Port A ($00) with MSBs LOOP3 TST $0B Test status of SPIF BPL LOOP3 Loop if not done LDA $0C Load contents of SPI data register into Accumulator AND #$FE Clear LSB of second DOUT word STA $01 Load Port B ($01) with LSBs JMP START Go back to start and repeat program MICROWIRE is a trademark of National Semiconductor Corp. |
|
|
链接网址 |
| 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 |