mborgerson
Well-known member
In a different thread I asked about sending a DMA transfer > 32K bytes---which doesn't seem to be supported by the DMAChannel object.
I postponed investigation of large transfers and switched to sending my video frame line-by line using an intervaltimer to send a new line each 64 microseconds. To get a clean display on my video monitor, I need to send the video with consistent timing at about 6MHz.
I solved the timing problem by using the PDB to trigger the DMA transfers. There are some other examples out there, but they mainly concern the use of the PDB for transfer to a DAC or from an ADC. Setting those things up adds a lot of complexity to the PDB setup.
I wrote a simple sketch that uses the PDB to transfer a buffer of bytes to the low byte of GPIOD using a dmachannel.
View attachment PDB_Test_clean.ino
I postponed investigation of large transfers and switched to sending my video frame line-by line using an intervaltimer to send a new line each 64 microseconds. To get a clean display on my video monitor, I need to send the video with consistent timing at about 6MHz.
I solved the timing problem by using the PDB to trigger the DMA transfers. There are some other examples out there, but they mainly concern the use of the PDB for transfer to a DAC or from an ADC. Setting those things up adds a lot of complexity to the PDB setup.
I wrote a simple sketch that uses the PDB to transfer a buffer of bytes to the low byte of GPIOD using a dmachannel.
View attachment PDB_Test_clean.ino