Here is a simple demo, playing a short sample of a cow mooing.
The data to be sent can ofcourse be any sequential pattern.
The sound playback is through a DMA background process, that stops it self at the end of the sample.
All the do-loop does is to start the DMA off, with the instruction to stop when reaching the end of the block.
No interrupt routine is needed.
This code is based on the demo by Evan Venn: 18F27Q43_TMR0_ARRAY_DMA_DAC.gcb
I did the DMA autostop modification and changed the sound sample (table).
This can be useful for all kind of sequential stuff that just needs to be sent off in the background. No need for supervision or intervention during transfer. Max block size that DMA can handle on the 18FxxQ84 used, is 4096 bytes.
A version playing a much larger sound sample of 36kB. -The Mooing cow at 31.25kHz sample rate.
The audio sample is started by the do-loop and the 4096 byte blocks are then handled by the interrupt routine, that also stops playback at the end of the sample.
This is a modified version of 18f27q43_send_bigtable_dma_to_serial.gcb
Here is a simple demo, playing a short sample of a cow mooing.
The data to be sent can ofcourse be any sequential pattern.
The sound playback is through a DMA background process, that stops it self at the end of the sample.
All the do-loop does is to start the DMA off, with the instruction to stop when reaching the end of the block.
No interrupt routine is needed.
This code is based on the demo by Evan Venn: 18F27Q43_TMR0_ARRAY_DMA_DAC.gcb
I did the DMA autostop modification and changed the sound sample (table).
This can be useful for all kind of sequential stuff that just needs to be sent off in the background. No need for supervision or intervention during transfer. Max block size that DMA can handle on the 18FxxQ84 used, is 4096 bytes.
A version playing a much larger sound sample of 36kB. -The Mooing cow at 31.25kHz sample rate.
The audio sample is started by the do-loop and the 4096 byte blocks are then handled by the interrupt routine, that also stops playback at the end of the sample.
This is a modified version of 18f27q43_send_bigtable_dma_to_serial.gcb