support for dsPIC EV series?
Moderator: Benj
- Michael Burger
- Posts: 19
- Joined: Tue Jul 02, 2019 1:42 pm
- Location: South Africa
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
support for dsPIC EV series?
Hello,
Does Flow8 have a boult-on for dsPIC33EV64M004, this is a 5V dsPIC and I cannot find it in the device list?
Michael
Does Flow8 have a boult-on for dsPIC33EV64M004, this is a 5V dsPIC and I cannot find it in the device list?
Michael
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: support for dsPIC EV series?
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Michael Burger
- Posts: 19
- Joined: Tue Jul 02, 2019 1:42 pm
- Location: South Africa
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Re: support for dsPIC EV series?
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
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
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: support for dsPIC EV series?
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Michael Burger
- Posts: 19
- Joined: Tue Jul 02, 2019 1:42 pm
- Location: South Africa
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Re: support for dsPIC EV series?
Ben,
Thank you very much!
I got the update, it works, I will start using it today
Kind Regards
Michael Burger
Thank you very much!
I got the update, it works, I will start using it today
![Very Happy :D](./images/smilies/icon_biggrin.gif)
Kind Regards
Michael Burger
- Michael Burger
- Posts: 19
- Joined: Tue Jul 02, 2019 1:42 pm
- Location: South Africa
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Re: support for dsPIC EV series? AN2...56 not working
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
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
- Michael Burger
- Posts: 19
- Joined: Tue Jul 02, 2019 1:42 pm
- Location: South Africa
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Re: support for dsPIC EV series?
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
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
- Michael Burger
- Posts: 19
- Joined: Tue Jul 02, 2019 1:42 pm
- Location: South Africa
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Re: support for dsPIC EV series?
Ben,
My apologies for the PWM Pin assignment table, herewith a understandable one
Kind Regards
Michael
My apologies for the PWM Pin assignment table, herewith a understandable one
Kind Regards
Michael
- Attachments
-
- dsPic33EV256GM106 PWM assignment.pdf
- (386.82 KiB) Downloaded 229 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: support for dsPIC EV series?
Thanks Michael,
Investigating for you now.
Investigating for you now.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: support for dsPIC EV series?
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Michael Burger
- Posts: 19
- Joined: Tue Jul 02, 2019 1:42 pm
- Location: South Africa
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Re: support for dsPIC EV series?
Ben,
Thank you, it has been a long day, I will test it in the morning and let you know
Kind Regards
Michael Burger
Thank you, it has been a long day, I will test it in the morning and let you know
![Very Happy :D](./images/smilies/icon_biggrin.gif)
Kind Regards
Michael Burger
- Michael Burger
- Posts: 19
- Joined: Tue Jul 02, 2019 1:42 pm
- Location: South Africa
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Re: support for dsPIC EV series?
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.....
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.....
- Attachments
-
- PWM firing diagram.pdf
- (99.75 KiB) Downloaded 229 times
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: support for dsPIC EV series?
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.
![Very Happy :D](./images/smilies/icon_biggrin.gif)
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.
![Very Happy :D](./images/smilies/icon_biggrin.gif)
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
- Michael Burger
- Posts: 19
- Joined: Tue Jul 02, 2019 1:42 pm
- Location: South Africa
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Re: support for dsPIC EV series?
Ben,
Thank you, the analogue channels all works very nicely now!
Kind Regards
Michael Burger
Thank you, the analogue channels all works very nicely now!
![Very Happy :D](./images/smilies/icon_biggrin.gif)
Kind Regards
Michael Burger
- Attachments
-
- IMG-20191205-WA0007.jpeg (91.65 KiB) Viewed 9616 times
- Michael Burger
- Posts: 19
- Joined: Tue Jul 02, 2019 1:42 pm
- Location: South Africa
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Re: support for dsPIC EV series?
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. ![Very Happy :D](./images/smilies/icon_biggrin.gif)
![Very Happy :D](./images/smilies/icon_biggrin.gif)
- Attachments
-
- Set PWM Module dsPIC33EV.JPG (38.2 KiB) Viewed 9249 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: support for dsPIC EV series?
Hi Michael,
Thanks for sharing and really glad it's working well for you.![Very Happy :D](./images/smilies/icon_biggrin.gif)
Thanks for sharing and really glad it's working well for you.
![Very Happy :D](./images/smilies/icon_biggrin.gif)
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Michael Burger
- Posts: 19
- Joined: Tue Jul 02, 2019 1:42 pm
- Location: South Africa
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Re: support for dsPIC EV series?
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
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
- Attachments
-
- IMG-20200227-WA0008.jpg (43.43 KiB) Viewed 8909 times
-
- IMG-20200227-WA0002.jpg (76.45 KiB) Viewed 8909 times
-
- IMG-20200226-WA0009.jpg (19.9 KiB) Viewed 8909 times
- Michael Burger
- Posts: 19
- Joined: Tue Jul 02, 2019 1:42 pm
- Location: South Africa
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Re: support for dsPIC EV series?
Ben,
Herewith the trace of the Clock (purple) vs Reset at RC8 (Yellow) vs 5V PSU at micro (Blue)
Kind Rgards
Michael
Herewith the trace of the Clock (purple) vs Reset at RC8 (Yellow) vs 5V PSU at micro (Blue)
Kind Rgards
Michael
- Attachments
-
- IMG-20200227-WA0010.jpg (56.72 KiB) Viewed 8909 times
- Michael Burger
- Posts: 19
- Joined: Tue Jul 02, 2019 1:42 pm
- Location: South Africa
- Has thanked: 4 times
- Been thanked: 10 times
- Contact:
Re: support for dsPIC EV series?
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
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