Software Overview
1 |
|
|
|
|
|
|
|
|
|
|
| Start |
|
|
|
|
|
|
|
| ||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
No |
|
|
|
|
|
| Initialize DSP |
|
|
|
|
|
|
|
| |||||||||||||||||
Wait States, AR Pointer, IRQ Table, Data Memory, Serial Port |
|
|
|
|
| |||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||||||||||
|
| H/L Transition on INTO ? |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Initialize SPI |
|
|
|
|
|
|
|
| |||||||
|
|
|
| Yes |
|
|
|
| Active Transmitter, Use Frame Sync, |
|
|
|
|
|
|
|
| |||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Generate External Clock |
|
|
|
|
|
|
|
| ||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| SAVE_ | INTO | _MEMORY = 1 |
|
|
| |||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||
|
| INTO (External Interrupt) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||
|
| Save Modified Register of |
|
|
|
|
| SAVE_INTO_MEMORY = 0 |
| Initialize DSP Memory For Sample Store | ||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| AR7 Points to The First Store Location | |||||||||||||||
|
|
| The IRQ Routine, if Not |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| AR0 Points to The Table End | |||||||||||||
|
| Automatically Saved by The |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ADCOUNT = Table Size (Number of Samples) | |||||||||||||||
|
|
|
| DSP |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||
|
|
|
| (Not Required) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| IME CALABRATION = 1 |
|
|
| ||||||||
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||
|
|
|
|
| IME CALABRATION = 0 |
|
|
|
|
| Calibrate Internal Midscale Error |
| ||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| SME CALABRATION = 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||
|
| Calibrate System Midscale Error |
|
|
|
|
| IME CALABRATION = 0 |
|
|
|
|
|
|
|
|
|
| ||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Initialize (Id) The Two ADC Registers
CR0 = CR0_SEND
CR1 = CR1_SEND
Start Sampling
Pull Down CSTART
Wait 100 ns
Stop Sampling and Start Conversion
Reset CSTART (Set Back High)
INTO_DRINEN = 1 | POLLING_DRIVEN = | NO_INTO_SIGNAL = |
|
| 1 | 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 |
|
|
| Start New Sampling |
|
|
| Pull Down CSTART |
|
|
| Read Sample |
|
|
| Stop Sampling and Start Conversion |
|
|
| Reset CSTART (Set Back High) | SAVE_INTO_MEMORY = 0 |
|
SEND_OUT_PARALLEL = 1 |
| Store Sample Into Memory |
|
|
|
| |
Copy Last Sample to Parallel DAC | SEND_OUT_PARALLEL = 1 | Save Sample to AR7 – Pointed Location | |
|
| ||
| Start New Conversion | Table End Reached? | No |
|
| ||
|
| (AR7 = AR0 ?) |
|
SEND_OUT_SERIAL = 1 |
|
|
|
Copy Last Sample to Serial DAC |
| Yes |
|
SEND_OUT_SERIAL = 0 | Reset Actual Memory Pointer |
| |
if Send Register is Empty |
| ||
|
| ||
|
| AR& = First Memory Store Location |
|
| SAVE_INTO_MEMORY = 0 |
|
|
Figure 7. Flow Chart Mono Interrupt Driven Mode Using CSTART to Start Conversion
Interfacing the TLV1562 Parallel ADC to the TMS320C54x DSP | 31 |