8.3.4Data Page Pointer

Software Overview

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.4Data Page Pointer

DP = #0

; load DP with 0

DP = #variable

; point with DP to the page, where variable is stored

DP #register

; error, this won’t work, the DP gets not loaded with

 

; register page, instead load DP with zero

If a register has to be written (example: IFR), the DP has to be loaded with zero since DP=#register will not work.

8.3.5Generating the Chip Select Signal and the CSTART Signal

port(CSTART) = @ZERO

; clear CSTART- (CSTARTlow)

port(ADC) = @CR0_SEND

; clear CS- (CSlow)

 

 

 

 

port(DEACTIVE) = @ZERO

; set CS or CSTART back (CS high or CSTARThigh)

The chip select signal and the CSTART signal can be accessed using the address bus (decoder on A0/A1). The basic idea of having CSTART was to allow ADC triggering for sampling/conversion purposes without having to use CS (which always blocks the address bus). Since the ’C542 DSP does not have enough general purpose outputs, this application still uses the address bus to activate

CSTART.

8.3.6Interfacing the Serial DAC 5618A to the DSP

A buffered serial port on the ’C542 board interfaces the TLC5618A DAC. The advantage of using a buffered serial port compared to the standard port is the auto buffer mode. This allows the programmer to save CPU power. A background process takes the data from a defined memory location (table) and moves it out to the serial port. (An interrupt can be generated after sending out half or the full table content. However, disabling this interrupt and writing the new ADC samples into the same memory location where the SPI takes the send value from, allows continuous transmission of the data stream to the DAC. When debugging the EVM it is preferable to compare the analog output signal of the DAC with the analog input signal applied to the ADC.

The TLC5618A is very easy to use. The sample size is limited to 10 bits and the first six MSBs are set so that the converter outputs the value on the right pin in the right mode.

The next lines of code show the initialization. The only requirement is to initialize the buffered serial port, since the DAC does not need an initialization procedure.

@BSPC

= #00000h

; reset SPI

@IFR

= #00020h

; clear any pending SPI IRQ

@IMR

= #00020h

; allow BXINT0

@BSPCE = #00521h

; set Auto buffer mode

@AXR

= #(BSPC_BUFFER_START); set the starting address of the auto buffer

@BKX

= #(BSPC_BUFFER_SIZE) ; buffer size

@BSPC

= #0C07Ch

; start serial port, FSX in Burst (every word)

Interfacing the TLV1562 Parallel ADC to the TMS320C54x DSP

21

Page 27
Image 27
Texas Instruments TLV1562 manual Data Page Pointer, Generating the Chip Select Signal and the CSTART Signal