Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Please help with setting up UART TX with DMA on dsPIC33EP256GP506

Status
Not open for further replies.

electrodarkness

Member level 1
Joined
May 2, 2010
Messages
39
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Ganesti, Transylvania, Romania
Activity points
1,649
Hello everyone!

I want to create a DSC system on which I can test signal processing algorithms, but first, the data acquisition must be done. I have a Microchip Explorer board 16/32 with dsPIC33EP256GP506. The signals which I will be working with have a maximum frequency of 1700Hz, so I need an ADC sampling with at least 17ksps.
My idea is to create a system which samples the signal, stores the samples in the DMA RAM. When the DMA buffer is full an interrupt will start the signal processing algorithm (FIR, IIR and DWT based filters), in which the result will be stored in another DMA buffer. The data in the DMA buffer will be transferred to the PC (UART) to be visualized in Python.

So far I have achieved: ADC conversion in 10b mode without DMA, ADC conversion with a DMA buffer, Transferring data on UART without DMA, applying FIR filter to signal.

When I try to use the DMA with UART TX the data transfer doesn't occur. Since I have no experience with combining the UART module and the DMA RAM, I really need some advice.

I don't want to create a long entry, so I've attached the code created so far (the UART with and without DMA versions).

Any help would be greatly appreciated.

PS: What should I alter to achieve real time signal processing - at least without UART data transfer - since as I saw, the Microchip filter examples aren't exactly meant for real time problems.
 

Attachments

  • main_header_noDMA_h.txt
    4.2 KB · Views: 51
  • main_noDMA_c.txt
    6.8 KB · Views: 43
  • main_header_DMA_h.txt
    4.4 KB · Views: 44
  • main_DMA_c.txt
    8.1 KB · Views: 42

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top