Search found 44 matches

by lexicon
Wed Aug 28, 2019 9:54 am
Forum: 16-Bit PIC
Topic: dsPIC33EP512GM710 CAN bus stopped working
Replies: 15
Views: 718

Re: dsPIC33EP512GM710 CAN bus stopped working

Hi Leigh, That gave the same results (CAN output but corrupted). It also generated these warning messages during compile: C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_CAN.c: In function 'FC_CAL_Internal_CAN_Init_1': C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_CAN.c:3...
by lexicon
Fri Aug 23, 2019 1:22 pm
Forum: 16-Bit PIC
Topic: dsPIC33EP512GM710 CAN bus stopped working
Replies: 15
Views: 718

Re: dsPIC33EP512GM710 CAN bus stopped working

Hi Leigh,

I'd put the CAL in the wrong place - Program Files(x86)/Flowcode v8/DefaultData.
Putting it in the ProgramData path makes the CAN work, but gives the same corrupted data as FC7.

Regards,
Martin.
by lexicon
Fri Aug 23, 2019 12:04 pm
Forum: 16-Bit PIC
Topic: dsPIC33EP512GM710 CAN bus stopped working
Replies: 15
Views: 718

Re: dsPIC33EP512GM710 CAN bus stopped working

Hi Leigh,
On FC8 we're back to the device apparently resetting on a buffer send.
I tried the new CAN CAL file posted earlier, but that made no difference (are these files compatible between 7 & 8?)

Regards,
Martin.
by lexicon
Fri Aug 23, 2019 9:25 am
Forum: 16-Bit PIC
Topic: dsPIC33EP512GM710 CAN bus stopped working
Replies: 15
Views: 718

Re: dsPIC33EP512GM710 CAN bus stopped working

No, not tried that - I can give it a go though...
by lexicon
Fri Aug 16, 2019 3:21 pm
Forum: 16-Bit PIC
Topic: dsPIC33EP512GM710 CAN bus stopped working
Replies: 15
Views: 718

Re: dsPIC33EP512GM710 CAN bus stopped working

Following on from the above, the attached CAN test program (DSPIC33_CAN_work) produces the expected cycling output in all 8 bytes of the CAN message. However, 'DSPIC33_CAN_fail' always outputs the first 2 bytes as 08 00 while the other six are correct. The only difference between the two is the UINT...
by lexicon
Thu Aug 15, 2019 2:17 pm
Forum: 16-Bit PIC
Topic: dsPIC33EP512GM710 CAN bus stopped working
Replies: 15
Views: 718

Re: dsPIC33EP512GM710 CAN bus stopped working

So, here's an odd thing - depending on other code in the program, the transmitted CAN values may not be correct. I've not really got to grips with the details yet, but if I have a simple loop that outputs an incrementing counter in the 8 CAN message bytes it works fine. If I implement that same meth...
by lexicon
Wed Aug 14, 2019 11:06 am
Forum: 16-Bit PIC
Topic: dsPIC33EP512GM710 CAN bus stopped working
Replies: 15
Views: 718

Re: dsPIC33EP512GM710 CAN bus stopped working

Hi Leigh,

Yes, that works - thank you.

If I add my post-init config (attached) as before, the speed is correct too @ 500kbps instead of 420.
Could a fix for that also be included?

Regards,
Martin.
by lexicon
Tue Aug 13, 2019 4:51 pm
Forum: 16-Bit PIC
Topic: dsPIC33EP512GM710 CAN bus stopped working
Replies: 15
Views: 718

Re: dsPIC33EP512GM710 CAN bus stopped working

Hi Leigh, Thanks for the archive: @72 and @278 both work (albeit with the incorrect speed as per the thread referenced in my opening post). All the others, including the as-installed version, appear to reset the device (i.e the whole PIC) when performing a buffer send. Initially I couldn't understan...
by lexicon
Fri Aug 09, 2019 11:49 am
Forum: 16-Bit PIC
Topic: dsPIC33EP512GM710 CAN bus stopped working
Replies: 15
Views: 718

Re: dsPIC33EP512GM710 CAN bus stopped working

As per opening post, I can no longer produce working code from this CAN test program (dsPIC33_uart2can). The original hex file (dsPIC33_uart2can.org.hex) works fine. If I compile it now I get a smaller hex file (dsPIC33_uart2can.hex) that outputs nothing on the CAN bus (as observed on an oscilloscop...
by lexicon
Thu Apr 18, 2019 10:37 am
Forum: 16-Bit PIC
Topic: dsPIC33EP512GM710 CAN bus stopped working
Replies: 15
Views: 718

dsPIC33EP512GM710 CAN bus stopped working

More than a year ago I did a bit of work with CAN on the dsPIC33EP512GM710 and I had some issues with the speed configuration (see https://www.matrixtsl.com/mmforums/viewtopic.php?f=69&t=19843). However I did get everything to work eventually. Recently I began a new project using the same device...
by lexicon
Wed Mar 27, 2019 12:14 pm
Forum: 16-Bit PIC
Topic: ADC oddness on dsPIC33EP512GM710
Replies: 18
Views: 2592

Re: ADC oddness on dsPIC33EP512GM710

It's been a while since I had the ADC issue, but I recently started a new project based on the same device and it appears that AN46 and AN47 do not work - I always seem to get a zero output. I've had a look at the config file but they appear to be mapped to the correct pins (A14 & 15). I'm using...
by lexicon
Tue Jan 08, 2019 11:21 am
Forum: 16-Bit PIC
Topic: dsPIC33EP512GM710 missing PWM channels
Replies: 2
Views: 579

Re: dsPIC33EP512GM710 missing PWM channels

OK, thanks Ben. You have actually told me that before - memory's getting carp these days! The thing that threw me about this is that the datasheet only mentions the 12 high speed PWM channels. It doesn't say the OC modules also have a PWM mode. Only when you read the OC control register info does it...
by lexicon
Mon Jan 07, 2019 3:21 pm
Forum: 16-Bit PIC
Topic: dsPIC33EP512GM710 missing PWM channels
Replies: 2
Views: 579

dsPIC33EP512GM710 missing PWM channels

Hi,

In the PWM properties channel selector only 8 channels are listed, but there are 12 available on this device.

Regards,
Martin.
by lexicon
Wed Nov 14, 2018 5:05 pm
Forum: Flowcode V5 Issues
Topic: PIC18F66K80 - Confused by UART config
Replies: 3
Views: 807

Re: PIC18F66K80 - Confused by UART config

I changed the config file to this: Define22=#define MX_UART_1 Define23=#define MX_UART_1_TX_PORT portg Define24=#define MX_UART_1_TX_TRIS trisg Define25=#define MX_UART_1_TX_PIN 3 Define26=#define MX_UART_1_RX_PORT portg Define27=#define MX_UART_1_RX_TRIS trisg Define28=#define MX_UART_1_RX_PIN 0 De...
by lexicon
Wed Nov 14, 2018 12:26 pm
Forum: Flowcode V5 Issues
Topic: PIC18F66K80 - Confused by UART config
Replies: 3
Views: 807

Re: PIC18F66K80 - Confused by UART config

Hi Ben,

No, not yet, although that is the obvious thing to do - I will try it and see.
The thing that got me was that 3 out of 4 pins seem to work, regardless of the config file seemingly being wrong for all of them....

Cheers,
Martin.
by lexicon
Wed Nov 14, 2018 10:12 am
Forum: Flowcode V5 Issues
Topic: PIC18F66K80 - Confused by UART config
Replies: 3
Views: 807

PIC18F66K80 - Confused by UART config

I'm updating an old project written on FC5 and I needed to add a 2nd serial port to receive data from an RF device on UART2. I'm already using UART1 with no issues. Although I can transmit data out of TX2, I cannot receive anything on RX2 - the receive line seems to be held permanently high. So, I h...
by lexicon
Wed Jun 20, 2018 5:28 pm
Forum: 16-Bit PIC
Topic: CAN bus speed on dsPIC33EP512GM710
Replies: 6
Views: 1679

Re: CAN bus speed on dsPIC33EP512GM710

I've had time to have another look at this, so I wrote my own bit of config code which I call after the FC CAN init macro. The speed is now correct at 500kbps using 16MHz clock (although the first time it was half speed and I had to change the CANCKS bit, so maybe this device does have that issue af...
by lexicon
Wed Jun 20, 2018 4:54 pm
Forum: Flowcode V5 Issues
Topic: PIC18F66K80 - RA5 not selectable
Replies: 2
Views: 751

Re: PIC18F66K80 - RA5 not selectable

Yep, that appears to have done the trick - thanks.
by lexicon
Wed Jun 20, 2018 4:22 pm
Forum: Flowcode V5 Issues
Topic: PIC18F66K80 - RA5 not selectable
Replies: 2
Views: 751

PIC18F66K80 - RA5 not selectable

I know it's an old product now, but I'm working on updates to a project that was originally developed on FC5 and I decided to stick with it rather than move it to FC7. Anyway, using a PIC 18F66K80, I'm not able to select RA5 as an input (connecting to a switch) as it is missing from the select list....
by lexicon
Tue May 01, 2018 8:54 am
Forum: 16-Bit PIC
Topic: ADC oddness on dsPIC33EP512GM710
Replies: 18
Views: 2592

Re: ADC oddness on dsPIC33EP512GM710

Hi Ben, To be honest, no, I don't think it would be beneficial to me - I don't need the faster sample time or anything like that. I was just curious as to whether it should be selectable. Having looked at the help page it does say it will be the maximum the device supports, but I hadn't read that be...
by lexicon
Mon Apr 30, 2018 12:24 pm
Forum: 16-Bit PIC
Topic: dsPIC33EP512GM710 UART Interrupt warning
Replies: 1
Views: 631

dsPIC33EP512GM710 UART Interrupt warning

When using the UART RX interrupt I see the following message during compilation: In function '_U1RXInterrupt': coff-cc1.exe: warning: _U1RXInterrupt PSV model not specified for '_U1RXInterrupt'; assuming 'auto_psv' this may affect latency Not sure if this is significant or not as the interrupt works...
by lexicon
Mon Apr 30, 2018 12:15 pm
Forum: 16-Bit PIC
Topic: ADC oddness on dsPIC33EP512GM710
Replies: 18
Views: 2592

Re: ADC oddness on dsPIC33EP512GM710

One thing I've noticed is that, although the ADC supports 10 or 12 bit conversion, the bit depth is fixed at 12 in the Properties selector.
by lexicon
Mon Apr 23, 2018 9:16 am
Forum: 16-Bit PIC
Topic: CAN bus speed on dsPIC33EP512GM710
Replies: 6
Views: 1679

Re: CAN bus speed on dsPIC33EP512GM710

Hi J,
Yes I had seen that but, according to the errata sheet, this device doesn't have that issue.
by lexicon
Wed Apr 18, 2018 3:51 pm
Forum: 16-Bit PIC
Topic: ADC oddness on dsPIC33EP512GM710
Replies: 18
Views: 2592

Re: ADC oddness on dsPIC33EP512GM710

At least two other ADC channels are also working, so that looks good - thanks Ben.
by lexicon
Wed Apr 18, 2018 2:12 pm
Forum: 16-Bit PIC
Topic: ADC oddness on dsPIC33EP512GM710
Replies: 18
Views: 2592

Re: ADC oddness on dsPIC33EP512GM710

Thanks Ben, first impressions are good, it certainly works with the test code.
I'll try it out on my actual project as soon as I can.

Regards,
Martin.