Software Overview
Start
1
Initialize DSP
Wait States, AR Pointer, IRQ Table, Data Memory, Serial Port
No
H/L Transition on INTO ?
Yes
INTO (External Interrupt)
Save Modified Register of
The IRQ Routine, if Not
Automatically Saved by The
DSP
(Not Required)
1
Initialize SPI
Active Transmitter, Use Frame Sync,
Generate External Clock
SAVE_INTO_MEMORY = 1
SAVE_INTO_MEMORY = 0
Initialize DSP Memory For Sample Store AR7 Points to The First Store Location AR0 Points to The Table End
ADCOUNT = Table Size (Number of Samples)
Initialize (Id) The Two ADC Registers
CR0 = CR0_SEND
CR1 = CR1_SEND
Start First Conversion
INTO_DRINEN = 1 | POLLING_DRIVEN = 1 | NO_INTO_SIGNAL = 1 |
|
Main Program | Wait Until End of Conversion | Wait Until End of Conversion |
|
Stay in Idle Mode | Poll INTO Pin Until h/0 Transition Occurs | Wait For a Certain Time |
|
1 |
|
|
|
INTO |
|
|
|
| 2 |
|
|
|
| SAVE_INTO_MEMORY = 0 |
|
| Read Sample |
|
|
SEND_OUT_PARALLEL = 1 | Store Sample Into Memory |
| |
|
| Save Sample to AR7 – Pointed Location | |
Copy Last Sample to Parallel DAC | SEND_OUT_PARALLEL = 1 |
|
|
| Start New Conversion | Table End Reached? | No |
| (AR& = AR0 ?) |
| |
|
|
| |
SEND_OUT_SERIAL = 1 |
| Yes |
|
|
|
| |
Copy Last Sample to Serial DAC | SEND_OUT_SERIAL = 0 | Reset Actual Memory Pointer |
|
if Send Register is Empty |
| ||
| AR& = First Memory Store Location |
| |
|
|
| |
| SAVE_INTO_MEMORY = 0 |
|
|
Figure 6. Software Flow of the Mono Interrupt Driven Solution
Interfacing the TLV1562 Parallel ADC to the TMS320C54x DSP | 29 |