Mercurial > ~darius > hgwebdir.cgi > modulator
comparison dac.pio @ 10:98880b18bcc1
Reset DAC PIO and use force trigger to do manual trigger.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Mon, 24 Feb 2025 12:12:09 +1030 |
parents | 3acdebd7eec7 |
children | f1e44afb41a3 |
comparison
equal
deleted
inserted
replaced
9:3acdebd7eec7 | 10:98880b18bcc1 |
---|---|
4 | 4 |
5 .program dac | 5 .program dac |
6 .define TRIGGER_IRQ 0 | 6 .define TRIGGER_IRQ 0 |
7 ; Need 1 side set pin, the clock | 7 ; Need 1 side set pin, the clock |
8 .side_set 1 | 8 .side_set 1 |
9 ; Force load at address 0 so DMA handler can force a jump | |
10 ; presumably we could calculate the address but this is easier. | |
11 .origin 0 | |
12 | 9 |
13 ; Clock in a 0 byte | 10 ; Clock in a 0 byte |
14 ; mov pins, null side 0 | 11 mov pins, null side 0 |
15 ; nop side 1 | 12 nop side 1 |
16 ; Wait for start trigger | 13 ; Wait for start trigger and clear IRQ |
17 ; wait 1 irq TRIGGER_IRQ side 0 | 14 wait 1 irq TRIGGER_IRQ side 0 |
18 ; Clock DAC and write data from the FIFO | 15 ; Clock DAC and write data from the FIFO |
19 ; DAC clocks data in on the rising clock edge | 16 ; DAC clocks data in on the rising clock edge |
20 ; Autopull is enabled so no need to pull | 17 ; Autopull is enabled so no need to pull |
21 .wrap_target | 18 .wrap_target |
22 out pins 8 side 0 | 19 out pins 8 side 0 |