Texas Instruments TLV1562 инструкция обслуживания

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99

Идти на страницу of

Хорошее руководство по эксплуатации

Законодательство обязывает продавца передать покупателю, вместе с товаром, руководство по эксплуатации Texas Instruments TLV1562. Отсутствие инструкции либо неправильная информация, переданная потребителю, составляют основание для рекламации в связи с несоответствием устройства с договором. В законодательстве допускается предоставлении руководства в другой, чем бумажная форме, что, в последнее время, часто используется, предоставляя графическую или электронную форму инструкции Texas Instruments TLV1562 или обучающее видео для пользователей. Условием остается четкая и понятная форма.

Что такое руководство?

Слово происходит от латинского "instructio", тоесть привести в порядок. Следовательно в инструкции Texas Instruments TLV1562 можно найти описание этапов поведения. Цель инструкции заключается в облегчении запуска, использования оборудования либо выполнения определенной деятельности. Инструкция является набором информации о предмете/услуге, подсказкой.

К сожалению немного пользователей находит время для чтения инструкций Texas Instruments TLV1562, и хорошая инструкция позволяет не только узнать ряд дополнительных функций приобретенного устройства, но и позволяет избежать возникновения большинства поломок.

Из чего должно состоять идеальное руководство по эксплуатации?

Прежде всего в инструкции Texas Instruments TLV1562 должна находится:
- информация относительно технических данных устройства Texas Instruments TLV1562
- название производителя и год производства оборудования Texas Instruments TLV1562
- правила обслуживания, настройки и ухода за оборудованием Texas Instruments TLV1562
- знаки безопасности и сертификаты, подтверждающие соответствие стандартам

Почему мы не читаем инструкций?

Как правило из-за нехватки времени и уверенности в отдельных функциональностях приобретенных устройств. К сожалению само подсоединение и запуск Texas Instruments TLV1562 это слишком мало. Инструкция заключает ряд отдельных указаний, касающихся функциональности, принципов безопасности, способов ухода (даже то, какие средства стоит использовать), возможных поломок Texas Instruments TLV1562 и способов решения проблем, возникающих во время использования. И наконец то, в инструкции можно найти адресные данные сайта Texas Instruments, в случае отсутствия эффективности предлагаемых решений. Сейчас очень большой популярностью пользуются инструкции в форме интересных анимаций или видео материалов, которое лучше, чем брошюра воспринимаются пользователем. Такой вид инструкции позволяет пользователю просмотреть весь фильм, не пропуская спецификацию и сложные технические описания Texas Instruments TLV1562, как это часто бывает в случае бумажной версии.

Почему стоит читать инструкции?

Прежде всего здесь мы найдем ответы касательно конструкции, возможностей устройства Texas Instruments TLV1562, использования отдельных аксессуаров и ряд информации, позволяющей вполне использовать все функции и упрощения.

После удачной покупки оборудования/устройства стоит посвятить несколько минут для ознакомления с каждой частью инструкции Texas Instruments TLV1562. Сейчас их старательно готовят или переводят, чтобы они были не только понятными для пользователя, но и чтобы выполняли свою основную информационно-поддерживающую функцию.

Содержание руководства

  • Страница 1

    July 1999 Advanced Analog Products SLAA040 Application Report[...]

  • Страница 2

    IMPORT ANT NOTICE T exas Instruments and its subsidiaries (TI) reserve the right to make changes to their products or to discontinue any product or service without notice, and advise customers to obtain the latest version of relevant information to verify , before placing orders, that information being relied on is current and complete. All product[...]

  • Страница 3

    iii Interfacing the TL V1562 Parallel AD-Converter to the TMS320C54x DSP Contents 1 Introduction 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 The Board 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Страница 4

    Contents iv SLAA040 8.5.5 Dual Continuous Mode 38 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.5.6 C-Callable With Mono Interrupt Driven Mode Using CST ART to Start Conversion 40 . . . . . . . . . 8.6 Source Code 41 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .[...]

  • Страница 5

    Figures v Interfacing the TL V1562 Parallel AD-Converter to the TMS320C54x DSP List of Figures 1 TL V1562 – DSP Interface of the EVM, Using RD or the CST ART Signal to Start Conversion 2 . . . . . . . . . . . . . . . 2 TL V1562 – DSP Interface of the EVM, Using RD or the CST ART Signal to Start Conversion 3 . . . . . . . . . . . . . . . 3 TLC56[...]

  • Страница 6

    vi SLAA040[...]

  • Страница 7

    1 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP Falk Alicke and Perry Miller ABSTRACT In this application report we discuss the hardware and software interface of the TL V1562, 10-bit parallel-output analog-to-digital converter (ADC) to the TMS320C54x digital signal processor (DSP). The hardware interface board, or evaluation module ([...]

  • Страница 8

    The Board 2 SLAA040 2.2 TL V1562EVM The TL V1562EVM gives customers an easy start with employing many of the features of this converter . A serial DAC (TLC5618A), a parallel DAC (THS5651), and the ADC (TL V1562) make this EVM flexible enough to test the features of the TL V1562. It also helps show how this ADC can be implemented. 2.3 ADC TL V1562 O[...]

  • Страница 9

    The Board 3 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP 2.3.1.2 Simplification of Software Requirements Through Modified Interface Of all the TL V1562 modes of operation, only the mono interrupt driven mode uses the RD signal to start the conversion. This requires a very flexible handling of the read signal and therefore has to be p[...]

  • Страница 10

    The Board 4 SLAA040 This feature fits well into monitoring application. For example, the ADC may have to trigger on one event out of some channels inside an extremely small time window and then sample the correct channel with a higher resolution, but lower throughput to analyze this process. This feature also fits well into home security applicatio[...]

  • Страница 11

    The Board 5 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP Serial DAC TLC5618A SCLK CS DIN DSP TMS320C542 BCLKX BCLKR BFSX BFSR BDX BDR TL V1562 EVM Pin Connector Figure 3. TLC5618A to ’ C542 DSP Interface 2.4.2 THS5651 – Parallel Output CommsDAC This 10-bit data converter has a parallel interface and is able to update its output w[...]

  • Страница 12

    Operational Overview 6 SLAA040 3 Operational Overview This chapter discusses the software and hardware interface for the TL V1562. Plus the overall operational sequence of the A/D interface is described. 3.1 Reference V oltage Inputs The voltage difference between the VREFP and VREFM terminals determines the analog input range, i.e., the upper and [...]

  • Страница 13

    Operational Overview 7 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP 3.3 Connections Between the DSP and the EVM The following connections provide the interface between the DSP and the EVM: T able 1. Signal Connections DSP Signal Connector/Pin on the DSKplus cir- cuit board Connector/Pin on the TL V1562EVM ADC Signal General GND Conne[...]

  • Страница 14

    Operational Overview 8 SLAA040 3.3.1 Jumpers Used on the TL V1562EVM T able 2. 3-Position Jumpers JUMPER GENERAL DESCRIPTION PIN 1-2 PIN 2-3 W1 Connects BP/CH3 (ADC) to R45 or GND; Input not in use, grounded to reduce noise Use as single input channel3 or differential input positive channel B W2 Connects BM/CH4 (ADC) to R44 or GND; Input not in use[...]

  • Страница 15

    The Serial DAC/DSP System 9 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP 4 The Serial DAC/DSP System The software configures the buffered DSP serial port to the 16-bit master mode so that the DSP generates the frame sync signal at BFSX and the data clock at BCLKX serial port terminals. T able 4 shows the connections between the DSP a[...]

  • Страница 16

    The DSP Serial Port 10 SLAA040 5 The DSP Serial Port The buffered serial port provides direct communication with serial I/O devices and consists of six basic signals and five registers. The DSP internal serial port operation section discusses the registers. The six signals are: • BCLKX - The serial transmit clock. This signal clocks the transmitt[...]

  • Страница 17

    Other DSP/TL V1562 Signals 11 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP 6 Other DSP/TL V1562 Signals These paragraphs describe other DSP and TL V1562 signals. 6.1 DSP Internal Serial Port Operation Three signals are necessary to connect the transmit pins of the transmitting device with the receive pins of the receiving device for [...]

  • Страница 18

    Conversation Between the TL V1562 and the DSP 12 SLAA040 7 Conversation Between the TL V1562 and the DSP The complexity of the TL V1562 ADC may be confusing because of the number of possible modes to drive the protocol between DSP and ADC. The following paragraphs explain more about the data sheet descriptions for interfacing the ’ C54x to the AD[...]

  • Страница 19

    Conversation Between the TL V1562 and the DSP 13 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP T able 7. D SP Algorithm for Mono Interrupt Driven Mode Using RD W ait cycles for the DSP internally (40 MHz DSPCLK): STEPS TIMING, NOTES APD=0 ADCSYCLK = 7.5 MHz APD=0 ADCSYCLK = 10 MHz APD=1 ADCSYCLK = 10 MHz APD=1 ADCSYCLK = 10 MHz 0. Ini[...]

  • Страница 20

    Conversation Between the TL V1562 and the DSP 14 SLAA040 7.3 Mono Interrupt Driven Mode Using CST ART Use the CST ART signal when two or more ADCs must sample/convert signals at the same time. Instead of the RD signal, the timing for sampling and converting is started with the edges of the CST ART signal. The RD signal is still required to get the [...]

  • Страница 21

    Conversation Between the TL V1562 and the DSP 15 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP 7.4 Dual Interrupt Driven Mode Using techniques similar to those described in the first two modes for sampling/converting/sending tasks, the dual mode samples two channels at the same time and sends out the results in series to the data port[...]

  • Страница 22

    Conversation Between the TL V1562 and the DSP 16 SLAA040 7.5 Mono Continuous Mode This mode simplifies data acquisition, since there is no need to generate a signal to sample or convert data. Instead, initializing this mode once, the ADC sends out the data continuously and will be read by the DSP with the RD signal. CAUTION: In this mode, the sampl[...]

  • Страница 23

    Conversation Between the TL V1562 and the DSP 17 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP 7.6 Dual Continuous Mode The dual continuous mode provides a data stream of two input signals. The characteristic of the data protocol is similar to the mono continuous mode but with the use of two RD cycles for one sample/hold cycle. CAUTIO[...]

  • Страница 24

    Software Overview 18 SLAA040 8 Software Overview The software in this report shows how to use all modes of the TL V1562 and useful variations for each mode. It also includes a C program to start data acquisition from a C level. T o limit the number of programs, the report supplies five files for running the ADC in five modes; a sixth program shows [...]

  • Страница 25

    Software Overview 19 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP Original Interrupts DSKplus Starter Kit (OVL Y = 1) Communication Kernel Starter Kit RAM BSP RAM Block or Program RAM Kernel Buffer (10 Words) HPI RAM Block or Porgram RAM Program External On-Chip ROM ROM (Bootloader) ROM Interrupts Unused Software Interrupt T able Unu[...]

  • Страница 26

    Software Overview 20 SLAA040 8.3 Programming Strategies for the ’ C54x, Explanations Before listing the program code, this chapter introduces some basic instructions (strategies) to provide the ’ C54x user with some ideas for dealing with the DSP architecture. 8.3.1 Optimizing CPU Resources for Maximum Data Rates The ’ C54x processor on the D[...]

  • Страница 27

    Software Overview 21 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP The timer output pin TOUT can be used to generate an output function with a prescale from half the CLK frequency down to 1FFFF . The problem: the high-time is always one clock cycle and only the low time of the TOUT signal changes with the timer . 8.3.4 Data Page Point[...]

  • Страница 28

    Software Overview 22 SLAA040 8.3.7 Interrupt Latency The time required to execute an interrupt depends on the handling of the IRQ at the four-word vector address or jumping further with a GOTO instruction. Using the fast return from IRQ instruction, and branching from the IRQ vector to a separate routine memory location, produces an IRQ overhead of[...]

  • Страница 29

    Software Overview 23 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP 8.3.9 Enabling Software Modules (.if/.elseif/.endif) T o test different software solutions while keeping the number of files small requires integrating all the modules in the same file. Furthermore, a switch is needed to enable any of the software modules. Setting the [...]

  • Страница 30

    Software Overview 24 SLAA040 8.4.1.1 Software Polling The status of the input pin is tested in a loop until the valid transition occurs. After this transition, the program branches to the next instruction (reads data sample). Advantage: • Relatively fast program response after high-to-low transition of INT • The software compensates for variati[...]

  • Страница 31

    Software Overview 25 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP 8.4.1.3 Interrupt Driven Solution Usually , the most elegant solution is to use an interrupt procedure to control external signals. The problem for this application is the high speed. First, if more than a few words of code have to be executed between two samples, the [...]

  • Страница 32

    Software Overview 26 SLAA040 T able 12. Switch Settings SWITCH DESCRIBTION SAVE_INTO_MEMORY Store the samples into DSP memory (location defined in constants.asm ) SEND_OUT_SERIAL Send the samples always to the serial DAC TLC5618A SEND_OUT_PARALLEL Update always the parallel DAC with the last sample (DAC1) THS5651 Note: the 3 switches are independen[...]

  • Страница 33

    Software Overview 27 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP T ask 1.2: Use channel B in differential input mode and an external clock source. Following changes have to be done with the set-up of T ask 1.1: T able 14. Instruction in the Program Header (Step 1) R10BIT_RESOLUT .set 00001h ; enable 10-bit resolution R8BIT_RESOLUT .[...]

  • Страница 34

    Software Overview 28 SLAA040 Program Files: MONOIDM1.ASM includes the complete software algorithm to control the monomode CONSTANT.ASM common file of all modes (constants definition) VECTORS.ASM common file of all modes (IRQ vector table) Other Files: linker.cmd organization of the DSP memory (data and program memory) auto.bat batch file to start t[...]

  • Страница 35

    Software Overview 29 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP T able End Reached? (AR& = AR0 ?) Start Initialize DSP W ait States, AR Pointer , IRQ T able, Data Memory , Serial Port Initialize SPI Active T ransmitter , Use Frame Sync, Generate External Clock SA VE_INTO_MEMOR Y = 1 SA VE_INTO_MEMOR Y = 0 Initialize DSP Memory [...]

  • Страница 36

    Software Overview 30 SLAA040 8.5.2 Mono Interrupt Driven Mode Using CST AR T to Start Conversion The following descriptions explain the software for the data acquisition in monomode using the CST AR T signal. The required interface connections are shown in Figure 1. Program Files: MONOCST1.ASM Includes the complete software algorithm to control the[...]

  • Страница 37

    Software Overview 31 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP Start Initialize DSP Wait States, AR Pointer , IRQ T able, Data Memory , Serial Port Initialize SPI Active Transmitter , Use Frame Sync, Generate External Clock SA VE_INTO_MEMOR Y = 1 SA VE_INTO_MEMOR Y = 0 Initialize DSP Memory For Sample Store AR7 Points to The First[...]

  • Страница 38

    Software Overview 32 SLAA040 8.5.2.1 Throughput Optimization † According to the data sheet, the mono interrupt driven mode with CST ART starting the conversion can be described as follows: After the conversion is done (INT set low), the DSP • selects the converter , • brings down the RD signal, • waits until the data are valid, • reads th[...]

  • Страница 39

    Software Overview 33 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP 825 ns = 1.2 MPS Throughput CST ART RD CS INT Figure 8. Time Optimization (monocst1) Maximum Performance at 1.2 MSPS with Internal Clock 8.5.3 Dual Interrupt Driven Mode The following descriptions explain the software for the data acquisition in Dual Interrupt Driven M[...]

  • Страница 40

    Software Overview 34 SLAA040 IMPORT ANT NOTE: The code has been optimized to maximize the data throughput. It was found that CST ART can be pulled low earlier than the data read instruction is performed by the DSP . This saves the 100-ns wait time in STEP 3 because the data read requires at least 100 ns. Therefore, CST AR T gets pulled high directl[...]

  • Страница 41

    Software Overview 35 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP Start Initialize DSP Wait States, AR Pointer , IRQ T able, Data Memory , Serial Port Initialize SPI Active Transmitter , Use Frame Sync, Generate External Clock SA VE_INTO_MEMOR Y = 1 SA VE_INTO_MEMOR Y = 0 Initialize DSP Memory For Sample Store AR7 Points to The First[...]

  • Страница 42

    Software Overview 36 SLAA040 8.5.4 Mono Continuous Mode The following descriptions explain the software for the data acquisition in Mono Continuous Mode. The required interface connections are shown in Figure 2 Program Files: MONOCON1.ASM Includes the complete software algorithm to control the Mono Continuous Mode CALIBRAT.ASM Calibration procedure[...]

  • Страница 43

    Software Overview 37 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP Start Initialize DSP Wait States, AR Pointer , IRQ T able, Data Memory , Serial Port Initialize SPI Active Transmitter , Use Frame Sync, Generate External Clock SA VE_INTO_MEMORY = 1 SA VE_INTO_MEMORY = 0 Initialize DSP Memory For Sample Store AR7 Points to The First S[...]

  • Страница 44

    Software Overview 38 SLAA040 8.5.5 Dual Continuous Mode The following descriptions explain the software for data acquisition in dual continuous mode. The required interface connections are shown in Figure 2. Program Files: DUALCON1.ASM Includes the complete software algorithm to control the Dual Continuous Mode CALIBRAT.ASM Calibration procedure of[...]

  • Страница 45

    Software Overview 39 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP Start Initialize DSP Wait States, AR Pointer , IRQ T able, Data Memory , Serial Port Initialize SPI Active Transmitter , Use Frame Sync, Generate External Clock SA VE_INTO_MEMOR Y = 1 SA VE_INTO_MEMOR Y = 0 Initialize DSP Memory For Storing Samples AR7 Points to The Fi[...]

  • Страница 46

    Software Overview 40 SLAA040 8.5.6 C-Callable with Mono Interrupt Driven Mode Using CST AR T to Start Conversion The following descriptions explain the software for the data acquisition with a user friendly C program interface in monomode using the CST ART signal. The required interface connections are shown in Figure 2. Program Files: C1562.ASM In[...]

  • Страница 47

    Software Overview 41 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP 8.6 Source Code The following paragraphs contain the source code. 8.6.1 Common Software for all Modes (except C-Callable) The files shown below contained the actual ’ C54x program listings and program examples. 8.6.1.1 Constants.asm **********************************[...]

  • Страница 48

    Software Overview 42 SLAA040 NO_CALIB_OP .set 000C0h ; Operate without calibrated inputs (no offset) * INDEX MODE 1: NO_SW_PWDN .set 00100h ; Software power down mode disabled SW_PWDN .set 00101h ; instruction for software power down NO_AUTO_PWDN .set 00100h ; Automatic internal power – down Disabled AUTO_PWDN .set 00102h ; Automatic internal pow[...]

  • Страница 49

    Software Overview 43 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP 8.6.1.2 Interrupt V ectors ************************************************************************** * TITLE : TLV1562 ADC Interface routine * * FILE : VECTORS.ASM * * FUNCTION : N/A * * PROTOTYPE : N/A * * CALLS : N/A * * PRECONDITION : N/A * * POSTCONDITION : N/A * [...]

  • Страница 50

    Software Overview 44 SLAA040 nop nop nop tint return_enable ;4C; internal timer interrupt nop nop nop brint return_enable ;50; BSP receive interrupt nop nop nop bxint goto BXINT0 ;54; BSP transmit interrupt nop nop trint goto trint ;58; TDM receive interrupt nop nop txint return_enable ;5C; TDM transmit interrupt nop nop nop int3 return_enable ;60;[...]

  • Страница 51

    Software Overview 45 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP 8.6.1.3 linker ,cmd The linker file for each mode is specified with called file names, but in general looks like the following, made for the Mono Continuous Mode: /******************************************************************/ / * File: Linker.lnk COMMAND FILE */ [...]

  • Страница 52

    Software Overview 46 SLAA040 8.6.2 Mono Mode Interrupt Driven Software Using RD to Start Conversion Mainprogram (Monomode.asm) ************************************************************************** * TITLE : TLV1562 ADC Interface routine * * FILE : MONOIDM1.ASM * * FUNCTION : MAIN * * PROTOTYPE : void MAIN () * * CALLS : SERIAL_DAC_INI() initia[...]

  • Страница 53

    Software Overview 47 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP CR0_SEND .usect ” .variabl ” , 1 ; sent value to register CR0 of the ADC CR1_SEND .usect ” .variabl ” , 1 ; sent value to register CR1 of the ADC ZERO .usect ” .variabl ” , 1 ; the value zero to send a ” Zero Dummy ” ADSAMPLE .usect ” .variabl ” , 1[...]

  • Страница 54

    Software Overview 48 SLAA040 * initialize waitstates: DP = #00000h ; point to page zero @SWWSR = #01000h ; one I/O wait states * copy interrupt routine, which are not critical for the EVM to the IRQ table location: * this is required for the DSKplus kit but has to be changed on other platforms DP = #1 ; point to page 1 (IRQ vector table) AR7 = #002[...]

  • Страница 55

    Software Overview 49 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP * reset pending IRQs IFR = #1 ; reset any old interrupt on pin INT0 .endif .if INT0_DRIVEN * enable Interrupt INT0 @IMR |= #01 ; allow INT0 .endif * enable global interrupt (this is required even if no IRQ routine is used * by this program because the GoDSP debugger ne[...]

  • Страница 56

    Software Overview 50 SLAA040 .if (AUTO_PWDN_ENABLE) @CR1_SEND ^= #NO_AUTO_PWDN ; clear NO_AUTO_PWDN bit if one @CR1_SEND |= #AUTO_PWDN ; set AUTO_PWDN mode .endif .if (DIFF_INPUT_MODE) @CR0_SEND ^= #SINGLE_END ; clear single ended input bit if one @CR0_SEND |= #DIFFERENTIAL ; set differential input mode .endif **************************** * ADC_INI[...]

  • Страница 57

    Software Overview 51 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP .elseif NO_INT0_SIG * instead of using the INT signal, the processor waits * for 6ADCSYSCLK+49ns and reads then the sample repeat(#32) nop ; wait for 34 processor cycles .endif * read sample STEP7: @ADSAMPLE = port(ADC) ; read the new sample into the DSP XF = 1 ; set R[...]

  • Страница 58

    Software Overview 52 SLAA040 DP = #00000h ; point to page zero TC = bitf(@SPC,#01000h) ; test, is the XRDY Bit in SPC=1? if (TC) goto SEND_SERIAL_END ; don ’ t send something until XDR is empty ; this has been included because the serial DAC TLC5618A is not able to understand ; endless data-streem (the CS should not become high before end of send[...]

  • Страница 59

    Software Overview 53 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP 8.6.3 Calibration of the ADC CALIBRA T .ASM ************************************************************************** * TITLE : TLV1562 ADC Interface routine * * FILE : CALIBRAT.ASM * * FUNCTION : CALIBRAT_INTERNAL_MID_SCALE * * CALIBRAT_SYSTEM_MID_SCALE * * CALLS : N[...]

  • Страница 60

    Software Overview 54 SLAA040 * clear mode related bits in CR0 and set MONO_INT: @CR0_SEND &= #(MONO_INT^0FFFFh) ; clear bit for no calibration use @CR0_SEND &= #(DUAL_INT^0FFFFh) ; clear bit for no calibration use @CR0_SEND &= #(MONO_CONTINUOUS^0FFFFh) ; clear bit for no calibration use @CR0_SEND &= #(DUAL_CONTINUOUS^0FFFFh) ; clear[...]

  • Страница 61

    Software Overview 55 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP nop ; wait for 34 cycles until conversion has been finished @TEMP = port(ADC) ; read the sample but don ’ t care about the content IFR = #1 ; reset any old interrupt on pin INT0 ********************************* * set back ADC register CR0/CR1 ***********************[...]

  • Страница 62

    Software Overview 56 SLAA040 * use calibrated mode in the following for conversion @CR0_SEND |= #CALIB_OP ; set calibration for further use * clear mode related bits in CR_CALIBRA and set MONO_INT: @CR_CALIBRA &= #(MONO_INT^0FFFFh) ; clear bit for no calibration use @CR_CALIBRA &= #(DUAL_INT^0FFFFh) ; clear bit for no calibration use @CR_CA[...]

  • Страница 63

    Software Overview 57 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP nop ; wait for some sampling time XF = 1 ; reset CSTART repeat(#34) nop ; wait for 34 cycles until conversion has been finished @TEMP = port(ADC) ; read the sample but don ’ t care about the content IFR = #1 ; reset any old interrupt on pin INT0 *********************[...]

  • Страница 64

    Software Overview 58 SLAA040 8.6.4 Mono Mode Interrupt Driven Software Using CST AR T to Start Conversion Mainprogram (Monomode.asm) ************************************************************************** * TITLE : TLV1562 ADC Interface routine * * FILE : MONOCST1.ASM * * FUNCTION : MAIN * * PROTOTYPE : void MAIN () * * CALLS : N/A * * PRECONDIT[...]

  • Страница 65

    Software Overview 59 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP ADCOUNT .usect ” .variabl ” , 1 ; counter for one channel ADMEM .usect ” .variabl ” , 1 ; points to act. memory save location CR0_SEND .usect ” .variabl ” , 1 ; sent value to register CR0 of the ADC CR1_SEND .usect ” .variabl ” , 1 ; sent value to regis[...]

  • Страница 66

    Software Overview 60 SLAA040 _MAIN: START: INITIALIZATION: * disable IRQ, sign extension mode, ini Stack INTM = 1 ; disable IRQ SXM = 0 ; no sign extension mode ; SP = #0280h ; initialize Stack pointer * initialize waitstates: DP = #00000h ; point to page zero @SWWSR = #01000h ; one I/O wait states * copy interrupt routine, which are not critical f[...]

  • Страница 67

    Software Overview 61 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP SERIAL_DAC_INI: BSPI_INI: DP = #0 @BSPC = #00038h ; reset SPI @BSPCE = #00101h ; set clock speed, no Autobuffer Mode @BSPC = #0C078h ; start serial port .endif .if (INT0_DRIVEN|POLLING_DRV) * reset pending IRQs IFR = #1 ; reset any old interrupt on pin INT0 .endif .if [...]

  • Страница 68

    Software Overview 62 SLAA040 .elseif (R4BIT_RESOLUT) @CR1_SEND ^= #RES_10_BIT ; clear bit for 10 – Bit Resolution @CR1_SEND |= #RES_4_BIT ; set 8 – Bit conversion mode .endif .if (EXTERNAL_CLOCK) @CR0_SEND ^= #CLK_INTERNAL ; clear CLK_INTERNAL bit if one @CR0_SEND |= #CLK_EXTERNAL ; set CLK_EXTERNAL mode .endif .if (AUTO_PWDN_ENABLE) @CR1_SEND [...]

  • Страница 69

    Software Overview 63 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP * write CR0 port(ADC) = @CR0_SEND ; send CR0 value to the ADC port(DEACTIVE) = @ZERO ; deselect ADC (CS high) NOP ; wait for tW(CSH)=50ns ******************************************* * ADC_mono_IRQ_Start: * read samples and store them into memory ***********************[...]

  • Страница 70

    Software Overview 64 SLAA040 STEP4: XF = 1 ; wait for TW(CSTARTL) and set CSTART call STORE ; store the last sample into the table .if INT0_DRIVEN return ; return from routine back to IRQ_INT0 .else goto STEP5 ; go back to receive next sample .endif ********************************** * STORE: * saving the samples into memory ***********************[...]

  • Страница 71

    Software Overview 65 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP AR7 = #(data_loc_A) ; point to first date location of the storage table .endif STORE_END: RETURN ; jump back into data aquisition routine ************************************************************** * IRQ_INT0: * Interrupt routine of the external interrupt input pin [...]

  • Страница 72

    Software Overview 66 SLAA040 Constants definition – see 8.6.1.1 Constants.asm Interrupt Routine handler – see 8.6.1.2 Interrupt V ectors 8.6.5 Dual Interrupt Driven Mode Mainprogram (DUALIRQ1.asm) ************************************************************************** * TITLE : TLV1562 ADC Interface routine * * FILE : DUALIRQ1.ASM * * FUNCTI[...]

  • Страница 73

    Software Overview 67 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP CR0_SEND .usect ” .variabl ” , 1 ; the last value, sent to register CR0 CR1_SEND .usect ” .variabl ” , 1 ; the last value, sent to register CR1 CR_PROBLEM .usect ” .variabl ” , 1 ; problem with initialization of this mode when repeated (reset) ZERO .usect ?[...]

  • Страница 74

    Software Overview 68 SLAA040 INTM = 1 ; disable IRQ SXM = 0 ; no sign extension mode ; SP = #0280h ; initialize Stack pointer * initialize waitstates: DP = #00000h ; point to page zero @SWWSR = #01000h ; one I/O wait states * copy interrupt routine, which are uncritical by the EVM to the IRQ table location: * this is required for the DSKplus kit bu[...]

  • Страница 75

    Software Overview 69 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP @BSPCE = #00101h ; set clock speed, no Autobuffer Mode @BSPC = #0C078h ; start serial port .endif .if (INT0_DRIVEN|POLLING_DRV) * reset pending IRQs IFR = #1 ; reset any old interrupt on pin INT0 .endif .if INT0_DRIVEN * enable Interrupt INT0 DP = #0 @IMR |= #01 ; allo[...]

  • Страница 76

    Software Overview 70 SLAA040 .if (EXTERNAL_CLOCK) @CR0_SEND ^= #CLK_INTERNAL ; clear CLK_INTERNAL bit if one @CR0_SEND |= #CLK_EXTERNAL ; set CLK_EXTERNAL mode .endif .if (AUTO_PWDN_ENABLE) @CR1_SEND ^= #NO_AUTO_PWDN ; clear NO_AUTO_PWDN bit if one @CR1_SEND |= #AUTO_PWDN ; set AUTO_PWDN mode .endif .if (DIFF_INPUT_MODE) @CR0_SEND ^= #SINGLE_END ; [...]

  • Страница 77

    Software Overview 71 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP port(DEACTIVE) = @ZERO ; deselect ADC (CS high) NOP ; wait for tW(CSH)=50ns * write CR0 port(ADC) = @CR0_SEND ; send CR0 value to the ADC STEP1: port(DEACTIVE) = @ZERO ; deselect ADC (CS high) NOP ; ******************************************* * ADC_dual_IRQ_Start: * re[...]

  • Страница 78

    Software Overview 72 SLAA040 * read sample STEP2: XF = 0 ; clear CSTART STEP10: @CH1_ADSAMPLE = port(ADC) ; read the new sample into the DSP STEP14: @CH2_ADSAMPLE = port(ADC) ; read the new sample into the DSP STEP3: ; wait for TW(CSTARTL) .if (AUTO_PWDN_ENABLE) * wait 800ns before finishing the sampling (requirment in Auto power down mode) repeat([...]

  • Страница 79

    Software Overview 73 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP @ADSAMPLE |= #(TLC5618_LATCH_A|TLC5618_FAST_MODE|TLC5618_POWER_UP) ; set the mode of the DAC data(BDXR) = @ADSAMPLE ; send out the sample to the serial DAC SEND_SERIAL_END: .endif * test for table end, set pointer back if true .if SAVE_INTO_MEMORY TC = (AR0 == AR7) ; i[...]

  • Страница 80

    Software Overview 74 SLAA040 Constants definition – see 8.6.1.1 Constants.asm Interrupt Routine handler – see 8.6.1.2 Interrupt V ectors 8.6.6 Mono Continuous Mode Mainprogram (MONOCON1.asm) ************************************************************************** * TITLE : TLV1562 ADC Interface routine * * FILE : MONOCON1.ASM * * FUNCTION : M[...]

  • Страница 81

    Software Overview 75 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP isr_save .usect ” .variabl ” , 1 ; memory location to save AR7 during ; interrupts ADSAMPLE .usect ” .variabl ” , 1 ; last read sample from the ADC * Address Decoder constants: ADC .set 00002h ; activate A0 when TLV1562 is choosen RD_CALIBRATION .set 00001h ; a[...]

  • Страница 82

    Software Overview 76 SLAA040 data(data_loc_A) = @TEMP ; fill memory table 1 repeat(#num_data_B – 1) data(data_loc_B) = @TEMP ; fill memory table 2 repeat(#num_data_C – 1) data(data_loc_C) = @TEMP ; fill memory table 3 repeat(#num_data_D – 1) data(data_loc_D) = @TEMP ; fill memory table 4 .if SEND_OUT_SERIAL ***********************************[...]

  • Страница 83

    Software Overview 77 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP @CR1_SEND |= #RES_4_BIT ; set 8 – Bit conversion mode .endif .if (EXTERNAL_CLOCK) @CR0_SEND ^= #CLK_INTERNAL ; clear CLK_INTERNAL bit if one @CR0_SEND |= #CLK_EXTERNAL ; set CLK_EXTERNAL mode .endif .if (DIFF_INPUT_MODE) @CR0_SEND ^= #SINGLE_END ; clear single ended [...]

  • Страница 84

    Software Overview 78 SLAA040 DP = #AD_DP ; ******************************************* * ADC_mono_con_Start: * read samples and store them into memory ******************************************* ADC_mono_con_Start: repeat(#12) NOP ; wait for t(SAMPLES) (450ns) STEP6: @ADSAMPLE = port(ADC) ; read the new sample into the DSP * IMPORTANT: fine – tun[...]

  • Страница 85

    Software Overview 79 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP .endif .if SAVE_INTO_MEMORY * test for table end, set pointer back if true TC = (AR0 ==AR7) ; is AR0 = AR7? (table end reached?) if (NTC) goto STORE_END ; * set pointer back to table start AR7 = #(data_loc_A) ; point to first date location of the storage table .endif S[...]

  • Страница 86

    Software Overview 80 SLAA040 Constants definition – see 8.6.1.1 Constants.asm Interrupt Routine handler – see 8.6.1.2 Interrupt V ectors 8.6.7 Dual Continuous Mode Mainprogram (DUALCON1.asm) ************************************************************************** * TITLE : TLV1562 ADC Interface routine * * FILE : DUALCON1.ASM * * FUNCTION : M[...]

  • Страница 87

    Software Overview 81 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP isr_save .usect ” .variabl ” , 1 ; memory location to save AR7 during ; interrupts CH1_ADSAMPLE .usect ” .variabl ” , 1 ; last readed sample of channel 1 CH2_ADSAMPLE .usect ” .variabl ” , 1 ; last readed sample of channel 2 * Address Decoder constants: ADC[...]

  • Страница 88

    Software Overview 82 SLAA040 repeat(#num_data_A – 1) data(data_loc_A) = @TEMP ; fill memory table 1 repeat(#num_data_B – 1) data(data_loc_B) = @TEMP ; fill memory table 2 repeat(#num_data_C – 1) data(data_loc_C) = @TEMP ; fill memory table 3 repeat(#num_data_D – 1) data(data_loc_D) = @TEMP ; fill memory table 4 .if SEND_OUT_SERIAL *********[...]

  • Страница 89

    Software Overview 83 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP @CR1_SEND ^= #RES_10_BIT ; clear bit for 10 – Bit Resolution @CR1_SEND |= #RES_4_BIT ; set 8 – Bit conversion mode .endif .if (EXTERNAL_CLOCK) @CR0_SEND ^= #CLK_INTERNAL ; clear CLK_INTERNAL bit if one @CR0_SEND |= #CLK_EXTERNAL ; set CLK_EXTERNAL mode .endif .if ([...]

  • Страница 90

    Software Overview 84 SLAA040 @SWWSR = #07000h ; one I/O wait states DP = #AD_DP ; ******************************************* * ADC_dual_con_Start: * read samples and store them into memory ******************************************* ADC_dual_con_Start: repeat(#12) NOP ; wait for t(SAMPLES) (450ns) STEP6: @CH1_ADSAMPLE = port(ADC) ; read the new sa[...]

  • Страница 91

    Software Overview 85 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP @ADSAMPLE = A ; @ADSAMPLE |= #(TLC5618_LATCH_A|TLC5618_FAST_MODE|TLC5618_POWER_UP) ; set the mode of the DAC data(BDXR) = @ADSAMPLE ; send out the sample to the serial DAC SEND_SERIAL_END: .endif * test for table end, set pointer back if true .if SAVE_INTO_MEMORY TC = [...]

  • Страница 92

    Software Overview 86 SLAA040 Constants definition – see 8.6.1.1 Constants.asm Interrupt Routine handler – see 8.6.1.2 Interrupt V ectors 8.6.8 C-Callable Mainprogram (C1562.c) /* File: C1562.C */ / * This file will select the parameters to allow a C – call of the ADC sampling */ extern void TLV1562(int, int, int) ; main() { / * TLV1562(Channe[...]

  • Страница 93

    Software Overview 87 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP ; .setsect ” .vectors ” , 0x00180,0 ; sections of code ; .setsect ” .text ” , 0x00200,0 ; these assembler directives specify ; .setsect ” .data ” , 0x01800,1 ; the absolute addresses of different ; .setsect ” .variabl ” , 0x01800,1 ; sections of code .s[...]

  • Страница 94

    Software Overview 88 SLAA040 * initialize storage table for the ADC samples DP = #AD_DP ; A += # – 1 ; decrement A @CH_NO = A ; read number of sampling channel A = @ADMEM AR7 = A ; point to first date location of the storage table A = @ADCOUNT ; AR0 points to table end B = @ADMEM A += B AR0 = A ; AR0 is loaded with last save location AR5 = #(IFR)[...]

  • Страница 95

    Software Overview 89 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP ADC_mono_IRQ_Start: ISTEP2: XF = 0 ; clear CSTART ISTEP3: NOP NOP NOP ; wait for TW(CSTARTL) ISTEP4: XF = 1 ; set CSTART STEP5: * wait until INT – goes low in polling the INT0 pin: M1: TC = bit( *AR5,15 – 0) ; test, is the INT0 Bit in IFR=1? if (NTC) goto M1 ; wait[...]

  • Страница 96

    Software Overview 90 SLAA040 BXINT0: return_enable ; interrupt is not in use .end V ectors.asm ************************************************************************** * TITLE : TLV1562 ADC Interface routine * * FILE : VECTORS.ASM * * FUNCTION : N/A * * PROTOTYPE : N/A * * CALLS : N/A * * PRECONDITION : N/A * * POSTCONDITION : N/A * * SPECIAL CON[...]

  • Страница 97

    Software Overview 91 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP nop nop nop int2 return_enable ;48; external interrupt int2 nop nop nop tint return_enable ;4C; internal timer interrupt nop nop nop brint return_enable ;50; BSP receive interrupt nop nop nop bxint goto BXINT0 ;54; BSP transmit interrupt nop nop trint goto trint ;58; T[...]

  • Страница 98

    Software Overview 92 SLAA040 Constants definition – see 8.6.1.1 Constants.asm and for Interrupt Routine handler – see 8.6.1.2 Interrupt V ectors Auto.bat @ECHO ON del *.map del *.obj del *.out del *.lst del *.cnv cl500.exe – k – n c1562.c pause mnem2alg.exe c1562.asm pause asm500 asm1562.asm – l – mg – q – s pause asm500 c1562.cnv ?[...]

  • Страница 99

    Summary 93 Interfacing the TL V1562 Parallel ADC to the TMS320C54x DSP .text : {} > PROG PAGE = 0 .vectors : {} > VECT PAGE = 0 .data : {} > RAMB0 PAGE = 1 .variabl : {} > RAMB0 PAGE = 1 .stack : {} > STAC PAGE = 1 } 9 Summary This application report provides several software application examples and recommendations for simplifying t[...]