Page 1 of 1

support for dsPIC EV series?

Posted: Tue Jul 02, 2019 1:53 pm
by Michael Burger
Hello,

Does Flow8 have a boult-on for dsPIC33EV64M004, this is a 5V dsPIC and I cannot find it in the device list?


Michael

Re: support for dsPIC EV series?

Posted: Thu Jul 04, 2019 11:48 am
by Benj
Hello Michael,

The compiler seems to support the device so it should be possible. I'll have a quick go at adding it for you and see how I get on.

Also moved from general programming to a more suitable place.

Re: support for dsPIC EV series?

Posted: Thu Jul 04, 2019 12:26 pm
by Michael Burger
Ben,

Thank you! Having the EV device would make the design much easier as I don't have to level translate everything this takes up so much space on the board.


Thank again

Michael

Re: support for dsPIC EV series?

Posted: Fri Jul 05, 2019 10:51 am
by Benj
Hi Michael,

Right I've now added 24 new devices in the dsPIC33EVxxGMx0x range.

These are now all available in the v8 update system and can be downloaded by clicking Help -> Check for updates and switching "Files in use" to "Full Database".

Let us know how you get on.

Re: support for dsPIC EV series?

Posted: Mon Jul 08, 2019 8:43 am
by Michael Burger
Ben,

Thank you very much!

I got the update, it works, I will start using it today :D





Kind Regards

Michael Burger

Re: support for dsPIC EV series? AN2...56 not working

Posted: Mon Dec 02, 2019 4:22 pm
by Michael Burger
Please help

Flowcode 8.2.1.13 / dsPIC33EV256GM106-I

In software Flowcode simulates reading AN0-19, AN25-31, AN41-56. The hardware chip only reads AN0,1 none of the others are read.

We suspect PIC16bit_Cal_ADC.C has not been upgraded correctly to accommodate the EV series but is set for the another series dsPIC



Kind Regards

Michael

Re: support for dsPIC EV series?

Posted: Tue Dec 03, 2019 8:56 am
by Michael Burger
Hello Ben,

Further to the Analog issue, I decided to commission the digital side of the system while we are talking about the analog read issue but I am having problems with the PWM configuration with dsPIC33EV256GM106 and Flowcode 8.2.1.13. Is it structured as option 1 or 2 below?
Why does the pin selection in Flowcode not tie up with the datasheet chip?


(Option1) (Option2)

CHIP Default Port Default PIN Flow 8.1 Default port Flow 8.1 Default port

PWM1H1 RB14 2 Channel1 $PORTG.6 Channel1 $PORTG.6
PWM1L1 RB15 3 Channel2 $PORTG.6

PWM1H2 RB12 62 Channel3 $PORTG.6 Channel2 $PORTG.6
PWM1L2 RB13 63 Channel4 $PORTG.6

PWM1H3 RB10 60 Channel3 $PORTG.6
PWM1L3 RB11 61

?? ?? ?? Channel4 $PORTG.6
?? ?? ??


According to the datasheet the PWM module resides in port B

Of the pins selection in channel 1,2,3,(4) only RB10 & RB11 corresponds to PWM1H3 and PWM1L3

Pin selection: C0,C1,B4,B5,B6,B7,B8,B2,C6,C7,C8,D5,D6,C9,F1,B10,B11


Kind Regards

Michael

Re: support for dsPIC EV series?

Posted: Tue Dec 03, 2019 9:10 am
by Michael Burger
Ben,

My apologies for the PWM Pin assignment table, herewith a understandable one


Kind Regards

Michael

Re: support for dsPIC EV series?

Posted: Wed Dec 04, 2019 12:45 pm
by Benj
Thanks Michael,

Investigating for you now.

Re: support for dsPIC EV series?

Posted: Wed Dec 04, 2019 1:37 pm
by Benj
Hello,

Right I beleive I have now solved the ADC issue for you. As for the PWM we are using the capture compare (CCP) based PWM and not the advanced PWM peripherals. I may be also to add support for this to add more channels but currently it is CCP only.

Let me know how you get on re the ADC.

Re: support for dsPIC EV series?

Posted: Wed Dec 04, 2019 4:56 pm
by Michael Burger
Ben,


Thank you, it has been a long day, I will test it in the morning and let you know :D


Kind Regards

Michael Burger

Re: support for dsPIC EV series?

Posted: Thu Dec 05, 2019 8:10 am
by Michael Burger
Ben,


If we only have the basic CCP available how does one go about firing two pwm pulses one on the rising edge and one falling edge interlocked with a 20kHz clock, please see attached diagram.

I have spent hours and hours on this with no success.....

Re: support for dsPIC EV series?

Posted: Thu Dec 05, 2019 8:42 am
by QMESAR
Hi.

The dsPIC has an advanced PWM module which is capable of doing very smart things what you need is to setup the PWM module in Complementary mode
see the datasheet PWM section with that said you then need to do the configuration in a C-icon as well as writeing to the Duty cycle registers from a C-icon when needed.
:D

Re: support for dsPIC EV series?

Posted: Thu Dec 05, 2019 10:16 am
by Michael Burger
Ben,

Thank you, the analogue channels all works very nicely now! :D


Kind Regards


Michael Burger

Re: support for dsPIC EV series?

Posted: Tue Jan 14, 2020 9:41 am
by Michael Burger
This is how I initialized and used the advanced high-speed PWM module with FlowCode8, thanks to QMESAR for pointing me in the direction, the various configurations and setup of IOCON, PWMCON, PTCON and FLTCON is available in the EV family datasheet. :D

Re: support for dsPIC EV series?

Posted: Tue Jan 14, 2020 10:50 am
by Benj
Hi Michael,

Thanks for sharing and really glad it's working well for you. :D

Re: support for dsPIC EV series?

Posted: Thu Feb 27, 2020 2:55 pm
by Michael Burger
Ben,

I have a problem with the dsPIC33EV256GM106 resetting, I have tried to fix this by inserting the "MX_CLEAR_WATCHDOG", switching it off in config, Auto WDT [ON] and also setting the WDT window to [None]

It happens at 5min intervals with 48MHz crystal and 12min with 20MHz crystal - this is why I think it is the WDT, but I have also checked the 5V PSU and the main OSC both clear

I attach the simple FC I use to capture the Reset on RC8, some scope traces and the project build setup page

Scope trace:
Yellow = RC8 Trip
Blue = 5V PSU (very clean at trip)
Purple = 48MHz clock (very Clean at trip)


What am I doing wrong or missing? - please help


Kind Regards

Michael

Re: support for dsPIC EV series?

Posted: Thu Feb 27, 2020 2:58 pm
by Michael Burger
Ben,

Herewith the trace of the Clock (purple) vs Reset at RC8 (Yellow) vs 5V PSU at micro (Blue)


Kind Rgards

Michael

Re: support for dsPIC EV series?

Posted: Mon Mar 23, 2020 2:04 pm
by Michael Burger
Hello Ben,

I apologize for the long wait, I have been traveling / working on site.

The reset problem was caused by the "Dead Man Timer" ( _FDMT ) it is set as default Enable in FC8 -> Project Options -> Configure, if one is not looking for it specifically it is easy to miss.



Kind Regards
Michael