Microchip's 16-bit dsPIC® Digital Signal Controllers
Questions tagged [dspic]
75 questions
1
vote
2 answers
UART communication dsPIC33EP256MU810
I'm very much new to Microcontroller programming.
I'm using
MplabX v3.26 as IDE
XC16 compiler
PICKit 3
p33EP256MU810 (dspic)
for programing
I have written very simple program to blink LED and send few characters over UART, please refer to…

amg
- 127
- 1
- 3
- 12
1
vote
1 answer
MikroC, UART. Requesting multiple bytes
Microcontroller: dsPIC33EP512MU810
Compiler: MikroC
I'm trying to request multiple bytes from a remote device via UART.
To get the needed info, you send a single request byte in order to receive a single data byte.
I'm having difficulties…

Felix
- 89
- 1
- 12
1
vote
1 answer
dspic33f lcd 4 bit mode
i'm using a dspic33fj128mc802 with mplab xc16. I want to use an LCD in 4 bit mode but cant seem to initialise it and dont know what I'm doing wrong. Any help would be appreciated in debugging. I have looked at other examples and my code looks…

JBH
- 11
- 2
1
vote
0 answers
dspic33ev256gm002 UART
I'm developing a project with dsPIC33EV256GM002 and I want to use its UART.
So I decided to use PIN18 as RX and PIN17 as TX so I programed PPS as follow:
// UART1 RX1 18 RP41 RPINR18 010 1001 (41)
// UART1 TX1 17 RP40 RPOR3.RP40R 000 0001…

Ferrari
- 75
- 1
- 11
0
votes
1 answer
is it possible to get a 24 hour timer interrupt using timer5 in dspic30f4011?
I am trying to trigger an alarm after 24 hours using timer5 of dspic30f4011 using 1:256 as prescale.
using maximum value of timer (0xFFFF) i tried iterating for counter of 125 and 250, for this values it works but if i enter any value after 250 my…

hrishikesh
- 11
- 2
0
votes
2 answers
dsPIC33EP256MC506 Uart TRMT not empty on interrupt
So I'm using the dsPIC33EP256MC506 and one of its UART for communication (9600,8,N,2). I need to get an interrupt when the Tx shift register is empty (TRMT = 1). By setting the UTXSEL bits to:
USTAbits.UTXISEL0 = 1;
USTAbits.UTXISEL1 = 0;
According…

Max Kielland
- 5,627
- 9
- 60
- 95
0
votes
0 answers
PWM triggering ADC incorrectly
I am using a PWM signal with 200us period(5kHz). The duty cycle is updated using the timer1 interrupt to generate a sine wave when connected to an H-bridge and an LC-Filter. I do 100 Updates (100 sine values). Also I am using ADC to read the voltage…

Mouhamed Attya
- 1
- 1
0
votes
1 answer
dsPIC: Reading timer registers and get wrong value
On a dsPIC33CK512MP608 I set up SCCP1 Timer so it increments every 1 us.
My goal is to mimic the millis() function of Arduino. I'm aware it's not a super-precise way to measure time, but it's accurate enough for non-critical delays. I'm using XC16…

Mark
- 4,338
- 7
- 58
- 120
0
votes
0 answers
Checksum result destination overlaps with checksum range
I'm trying to configure a project with Microchip 16-bit Bootloader. The target MCU is dsPIC33CK512MP608. Ubuntu 22.10, MPLAB X IDE v6.05, latest versions of MCC and all the libraries.
Here the memory configuration:
I added the macro to be executed…

Mark
- 4,338
- 7
- 58
- 120
0
votes
0 answers
PWM only works when I do a reset on dsPIC33EV256GM102
PWM Modul works discontinuously on the DSPIC
Hello everyone,
I am facing a small problem with PWM in my dsPIC33EV256GM102.
I started with a very simple configuration to generate three different duty cycles. Yet the PWM sometimes works sometimes not…

Mouhamed Attya
- 1
- 1
0
votes
0 answers
UART1 not working on dspic33EV256GM102, only worked once with TeraTerm then not anymore
Chip : dspic33ev256gm102
Compiler : XC16
IDE : MPLAB X v6.05
I am having a small problem with my uart to be honest and do not know where it is exactly. I configured my uart1 in a very simple way and tried a serial port with TeraTerm.
The things is…

Mouhamed Attya
- 1
- 1
0
votes
1 answer
dsPIC33 Flash Erase broken
I am having a lot of trouble when it comes to flash erasing on the dsPIC33EP64GP503 and I am hoping someone on here will be able help.
I am wanting to store a data struct in the flash program memory of the device. I am having trouble when it comes…

A Mir
- 1
0
votes
0 answers
FFT with dsPIC33E returns no frequency
I'm working with a dsPIC33EP128GP502 and try to run a FFT to measure the dominant frequency on the input. The compiler shows no errors and the ADC itself seems to work... (for single values)
I expect as result some frequency value between 0 Hz and…

Henrik-Wo
- 1
- 2
0
votes
0 answers
Int value not incrementing during button click
I try to increment a integer value from 0 to 2 and again roll back to zero again every time when button is clicked. when i click the button the value is incremented up to 1 and stops there itself. i am using dsPIC33 microcontroller with a switch and…

V_J viji
- 39
- 1
- 7
0
votes
1 answer
I want transmit and receive data through a single UART using two different times
I want to transmit and receive data through a single UART using timers for 10ms and 1ms. IF 1ms timer flag is set then 10ms transmission should halt and other should start because 1ms transmission is urgent. After completing this the first should…