Search found 35 matches

by lexicon
Thu Apr 18, 2019 10:37 am
Forum: 16-Bit PIC
Topic: dsPIC33EP512GM710 CAN bus stopped working
Replies: 0
Views: 135

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: 2232

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: 461

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: 461

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: 672

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: 672

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: 672

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: 1463

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: 659

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: 659

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: 2232

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: 531

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: 2232

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: 1463

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: 2232

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: 2232

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.
by lexicon
Wed Apr 18, 2018 12:37 pm
Forum: 16-Bit PIC
Topic: CAN bus speed on dsPIC33EP512GM710
Replies: 6
Views: 1463

Re: CAN bus speed on dsPIC33EP512GM710

I'm still struggling with the CAN bus speed. You'll have to bear with me here on what seems like a complicated test, but I have to use the hardware project I've got - I've cut out the extraneous stuff as much as possible. I have an RF transceiver chip that reads a keyfob and sends the received key i...
by lexicon
Wed Apr 18, 2018 8:39 am
Forum: 16-Bit PIC
Topic: ADC oddness on dsPIC33EP512GM710
Replies: 18
Views: 2232

Re: ADC oddness on dsPIC33EP512GM710

Hi Leigh,

Have you any thoughts on why I can't get the ADC to work directly in Flowcode?
Ultimately I need to have quite a few ADC channels working and I'd much rather not have to code it in C.
by lexicon
Thu Apr 05, 2018 4:47 pm
Forum: 16-Bit PIC
Topic: ADC oddness on dsPIC33EP512GM710
Replies: 18
Views: 2232

Re: ADC oddness on dsPIC33EP512GM710

So I finally got around to looking a bit deeper into my ADC issue. I couldn't seem to get anywhere playing with timings etc within Flowcode, so I cobbled together some C code in MPLAB and I was able to flash a LED at a variable rate set by a pot - at least I know the hardware works. I've imported th...
by lexicon
Mon Mar 05, 2018 11:18 am
Forum: 16-Bit PIC
Topic: ADC oddness on dsPIC33EP512GM710
Replies: 18
Views: 2232

Re: ADC oddness on dsPIC33EP512GM710

OK Leigh, thanks.
I've tried some different timings but didn't make any difference - I'll have to look into it more closely, that will probably be in a few days.

What was the bug that the newest FCD fixed?
by lexicon
Thu Mar 01, 2018 5:02 pm
Forum: 16-Bit PIC
Topic: ADC oddness on dsPIC33EP512GM710
Replies: 18
Views: 2232

Re: ADC oddness on dsPIC33EP512GM710

Thanks Leigh & Ben - yes, that seems to have fixed the port E initialisation. Can you offer any suggestions regarding my ADC read seemingly always returning 0 as per my opening post? I've tried a couple of different channels (namely, AN2,3 & 8 as I can easily attach a pot to those on the boa...
by lexicon
Thu Mar 01, 2018 2:52 pm
Forum: 16-Bit PIC
Topic: ADC oddness on dsPIC33EP512GM710
Replies: 18
Views: 2232

Re: ADC oddness on dsPIC33EP512GM710

Hi Ben, I now get the following error: C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_CAN.c:43:3: error: #error "Internal CAN not supported on this device" I think you might have started with an old version as per this thread? https://www.matrixtsl.com/mmforums/viewtopic.php?...
by lexicon
Wed Feb 21, 2018 6:19 pm
Forum: 16-Bit PIC
Topic: ADC oddness on dsPIC33EP512GM710
Replies: 18
Views: 2232

Re: ADC oddness on dsPIC33EP512GM710

I've been doing a bit more investigation on the incorrect B8 output. It seems it's not the output to port B8 but reading from E13, this always presents a low state until I do an ADC read, then it works correctly. The attached program works fine in sim - operating the input switch E13 selects the out...
by lexicon
Wed Feb 21, 2018 3:47 pm
Forum: 16-Bit PIC
Topic: CAN bus speed on dsPIC33EP512GM710
Replies: 6
Views: 1463

Re: CAN bus speed on dsPIC33EP512GM710

Hi QMESAR and thanks for your input. I agree oscillator config would be the first candidate and that was the reason I included a timed heartbeat. My heartbeat pulse scopes at the expected 10ms which implies to me that the clock speed is correct. Are you sure you have to manually code the oscillator ...
by lexicon
Fri Feb 16, 2018 5:11 pm
Forum: 16-Bit PIC
Topic: CAN bus speed on dsPIC33EP512GM710
Replies: 6
Views: 1463

CAN bus speed on dsPIC33EP512GM710

Having configured the CAN interface at 500kbs on the dsPIC33EP512GM710, I'm finding that the actual transmission speed is more like 400kbs and I'm not sure why. This is part of the same project as referred to in this thread https://www.matrixtsl.com/mmforums/viewtopic.php?f=69&t=19842 regarding ...