Questions tagged [dspic]

Microchip's 16-bit dsPIC® Digital Signal Controllers

75 questions
0
votes
1 answer

How to plot a float number in Microchip Data Visualizer

I am having a problem between sending a float trough the UART to be plotted in a graph on the Data Visualizer of Microchip. I could plot int numbers without problem, but float ones are driving me crazy. I made a sine wave with Laplace trnasform.…
Lazcol
  • 11
  • 3
0
votes
0 answers

Reading 32-bit SPI data using 16-bit processor (dsPIC)

I am interfacing a M90E32AS energy meter IC with dsPIC33F series processor. I successfully read voltage and current values. I try to read power values also, as per the datasheet the power registers are 32-bits wide. I tried the following code to…
V_J viji
  • 39
  • 1
  • 7
0
votes
0 answers

How to properly set up DMA on a dsPIC33F

I have code written by someone else (for a dsPIC33FJ128MC706A) - which initializes UART1 & PWMs and uses a busy wait in the U1Rx interrupt to get 14 bytes, and timer1 interrupts to update PWM registers if new data arrives (debugged - it enters the…
user1999728
  • 913
  • 1
  • 8
  • 25
0
votes
1 answer

Detect peak value from real time data in an array

I have connected a sine wave of amplitude 3V with 1.5V shifted above the zero to 12-bit ADC channel by using dsPIC33FJ32MC204 controller and stored in an array. I want to detect the peak for each interval, so please give me any suggestion on it. I…
Mohan Khedkar
  • 33
  • 1
  • 6
0
votes
0 answers

XC16 Disassembly for (uint32) & (uint32) operation

I am in the process of trying to figure out how many cycles some uint32 operations will take on a 16bit dsPIC. I started with bitwise AND and wrote the following program: int main(void) { unsigned long var1, var2, var3; var1 =…
ChateauDu
  • 23
  • 4
0
votes
0 answers

How to fix Undefined Reference using Simulink Embedded Coder - dsPIC XC16

I am wondering if anyone could help me with my 'Undefined Reference' error using XC16 please? I am including my dsPIC.h file into my main .h file to be brought in to define my chips registers. However when I try and build my code I get the…
0
votes
0 answers

How to manage right the "__attribute__((__interrupt__, no_auto_psv)) "?

I am programming a DSPIC33EP512GM710-I_PT TQFP using MPLABX The problem is that I generate 2 similar interrupts the MPlabX it writes the same function name in several .c files so the compiler generate an error because 2 or more functions with same…
mathengineer
  • 140
  • 6
0
votes
0 answers

IIR-filter implementation on a DSPIC

I am implementing a digital filter on a dsPIC using the dsplib library, dsPIC30F DSP Library. I have designed my filter using MATLAB. clc; clear all; filter=designfilt('lowpassiir', 'FilterOrder', 4, 'PassbandFrequency', 3900, 'PassbandRipple', 1,…
Mads
  • 1
0
votes
1 answer

In MircoC Pro for dsPIC How can I setup the watchdog timer?

I need to set the FWDT to have the WDT be on, the prescaler be 1 and the postscaler be 12. I can't find any documentation on how to do this programmatically, or any way at all. I can see from the data sheet that I need to set FWDT, but I can't see…
Matt Ellen
  • 11,268
  • 4
  • 68
  • 90
0
votes
0 answers

Have you ever interfaced a MAX44009 sensor with a uC?

I recently tried to program, using the free download version of MikroC for dsPIC IDE, a MAX44009 sensor to interface with PIC24FJ64GB002 microcontroller. The lux result of the sensor should be displayed on an LCD. The code compiles without failure,…
0
votes
1 answer

Argument to __builtin_dmaoffset() is not the address of an object in a dma section;

I have a dsPIC33 and programming it using MPLAB X. I have three files: main.c ADC.c ADC.h In ADC.h I do a bunch of variable initialisation as follows: typedef struct pinPair{ unsigned CH0:5,CH123:1,STAT:8,:2; unsigned I:16; unsigned…
Mercury
  • 594
  • 1
  • 12
  • 28
0
votes
0 answers

Printf / show values on MPLAB X IDE - dsPIC33F

I'm a real PIC beginner and I'm trying to use a development board with a dsPIC33F, using the MPLAB X IDE and CANalyzer. I send CAN frames with the dsPIC but the data read by CANalyzer is not the one I tried to send. Is ther any way I can check my…
0
votes
1 answer

Trying to read from a file that I know exists and is good but will not open

When I try to open a file "canbus.txt.txt" it is coming back with an error message that reads out "error: No error" repeatedly. I cannot find where this issue would be coming from. My file is in the main project directory and the name and extensions…
dfetz
  • 27
  • 1
0
votes
2 answers

UART does not transmit/print more than one character

I am trying to setup basic serial communication between dsPIC33FJ64GP802 and a terminal and PC using UART module. However, UART does not transmit more than once character. I am using MPLAB-X (V 5.05). I also use snap debugger to program the dsPic. I…
0
votes
2 answers

How to upload a hex file to dsPIC33 from linux command line?

I want to write a script to upload the hex file from host computer to dsPIC33 and hence need a command line utility or API to do the same. Till now I have been programming the chip with the MPLAB IPE with ICD4. I tried to search for the same and…
RishabhHardas
  • 495
  • 1
  • 5
  • 25