• AVR Freaks

Hot!No CAN support for dsPIC33CK256MP508 in MCC? :(

Author
Asm_Matt
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2011/02/11 08:05:23
  • Location: 0
  • Status: offline
2019/06/25 04:06:46 (permalink)
0

No CAN support for dsPIC33CK256MP508 in MCC? :(

Hello, we are planning to use the dsPIC33CK256MP508 for a new project that requires CAN. MCC does not seem to support CAN for this device (it is listed, but has a "STOP" symbol for the single CAN available).
 
 I have tried to search for an answer for this google/forums etc, but can't seem to find any answer as to why this is disabled. Will this be added to MCC? Or am I simply doing something wrong?
 
 We are using...
MPLAB-X V5.15
MCC PLUGIN V3.75
XC16 V1.35
 
Thank you.
 
 
Regards
 
 
 
Matthew :)
#1

9 Replies Related Threads

    du00000001
    Just Some Member
    • Total Posts : 3235
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: online
    Re: No CAN support for dsPIC33CK256MP508 in MCC? :( 2019/06/25 04:25:00 (permalink)
    0
    You're basically doing "something wrong": take the FRM and the datasheet and start "real programming" :)
    MCC is a means for a somewhat easier startup - at its best. It's absolutely not necessary to use MCC...

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #2
    JPortici
    Super Member
    • Total Posts : 848
    • Reward points : 0
    • Joined: 2012/11/17 06:27:45
    • Location: Grappaland
    • Status: offline
    Re: No CAN support for dsPIC33CK256MP508 in MCC? :( 2019/06/25 04:25:32 (permalink)
    0
    It's using a brand new peripheral.
    There is all the code you can possibly need in the reference manual chapter.
    #3
    Asm_Matt
    New Member
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2011/02/11 08:05:23
    • Location: 0
    • Status: offline
    Re: No CAN support for dsPIC33CK256MP508 in MCC? :( 2019/06/25 04:35:54 (permalink)
    0
    du00000001
    You're basically doing "something wrong": take the FRM and the datasheet and start "real programming" :)
    MCC is a means for a somewhat easier startup - at its best. It's absolutely not necessary to use MCC...


     If I wanted to do "real programming" I would do it in ASM ;) ;) ;) Seriously though, MCC is very helpful. I am more than capable of programming this part from the datasheet (as I have on many projects since 1994)... but why would I want to when there is a perfectly good tool available that generates decent, reliable, portable and team friendly code (thanks Microchp btw!)?
     
     I hesitated posting this knowing I would get a few "program it like a man (or preferred Gender) responses" and not really answering the question...... sigh :( I guess I brought it on myself...... ;)
     
     Looking forward to something slightly more constructive/accurate/helpful..... :)
     
    Regards
     
     
     
    Matthew :)
    post edited by Asm_Matt - 2019/06/25 04:47:51
    #4
    Asm_Matt
    New Member
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2011/02/11 08:05:23
    • Location: 0
    • Status: offline
    Re: No CAN support for dsPIC33CK256MP508 in MCC? :( 2019/06/25 04:44:55 (permalink)
    0
    Jack_M
    It's using a brand new peripheral.
    There is all the code you can possibly need in the reference manual chapter.




     Maybe I have not explained the problem I am having (or don't understand it (more likely)) .
     
     If I substitute a dsPIC33EP128MC506 then the CAN is present and can be configured, can you please explain what you mean be "It's using a brand new peripheral." does this mean Microchip have no support for this FD-CAN in MCC for any part?
     
     As a team, we are new to CAN, and (as is so often the case) are pushed for time, MCC is a huge help as it generates usable code that can be understood, trimmed, and tweaked to suit our particular needs.
     
     I guess the real answer may be that MCC does not yet offer support for the FD-CAN peripheral for this (or any?) part.
     
     I suppose the frustration I am having is that I can't find a definitive way of searching for what peripherals MCC supports for each part...without going through each part in MPLAB-X. This is, again, probably a failing on my part to locate this information.....
     
     
    Regards
     
     
     
    Matthew :)
    post edited by Asm_Matt - 2019/06/25 04:47:09
    #5
    du00000001
    Just Some Member
    • Total Posts : 3235
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: online
    Re: No CAN support for dsPIC33CK256MP508 in MCC? :( 2019/06/25 05:05:04 (permalink)
    0
    @ Asm_Matt
    The CAN-FD ist obviously sizzling-hot - available only on CH and CK derivatives.
    Feel free to try out one of these on MCC, but don't expect too much  ;)
     
    BTW: I wouldn't even consider to program in assembly unless absolutely necessary. Not on devices beyond some 8-Bitter (and even these are well-supported by e.g. XC8).

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #6
    Antipodean
    Super Member
    • Total Posts : 1778
    • Reward points : 0
    • Joined: 2008/12/09 10:19:08
    • Location: Didcot, United Kingdom
    • Status: offline
    Re: No CAN support for dsPIC33CK256MP508 in MCC? :( 2019/06/25 05:24:52 (permalink)
    0
    du00000001
    @ Asm_Matt
    The CAN-FD ist obviously sizzling-hot - available only on CH and CK derivatives.
    Feel free to try out one of these on MCC, but don't expect too much  ;)
     



    Or the external CAN-FD chip (MCP25??) which may be in MCC?
     

    Do not use my alias in your message body when replying, your message will disappear ...

    Alan
    #7
    Asm_Matt
    New Member
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2011/02/11 08:05:23
    • Location: 0
    • Status: offline
    Re: No CAN support for dsPIC33CK256MP508 in MCC? :( 2019/06/25 05:36:03 (permalink)
    0
    du00000001
    @ Asm_Matt
    The CAN-FD ist obviously sizzling-hot - available only on CH and CK derivatives.
    Feel free to try out one of these on MCC, but don't expect too much  ;)
     
    BTW: I wouldn't even consider to program in assembly unless absolutely necessary. Not on devices beyond some 8-Bitter (and even these are well-supported by e.g. XC8).




    Thanks du00000001, I guess I will have to wait (or use another chip), we really don't need the CAN-FD, CAN will be just fine.
     
     BTW, many of the projects I have been involved in, assembly was absolutely necessary (including some inline asm in C). However, times move on, other tools become available to make code creation easier, more reliable and more portable.... for example C-compilers such as X16 etc. I doubt you would want to hand-compile your C code, constantly referring to the data-sheet, finding the op-codes and then having to debug all the errors you introduced (as I did with my 1st Sinclair/Timex ZX81 computer) and why would you, it's crazy right?...... Can you see where I am going with this ;) ;) ;) 
     
     I understand that MCC is not a "be all and end all" kind of deal, but it has useful features, that unless used on a regular basis may not be fully appreciated. To write it off because it's not "real programming" (as per a C compiler vs ASM) may be a little short sited.
     
    Thanks again for the response :)
     
    Regards
     
     
    Matthew :)
    #8
    du00000001
    Just Some Member
    • Total Posts : 3235
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: online
    Re: No CAN support for dsPIC33CK256MP508 in MCC? :( 2019/06/25 07:13:29 (permalink)
    0
    @ Asm_Matt
    20+ years ago, I've been programming my fair share in assembly - due to weak µC, weak compiler and hardest real-time requirements. Even at that time, I resorted to C programming where possible. 
    C costs half the nerve and is at least twice as productive as assembly programming.
     
    I did something not far from "hand-compiling my C-code":
    Generate an assembly listing from C code, optimize manually, "re-symbolize". At that time, I had a project that resultet in 300+ kBytes C source and 80 kBytes Assembly.
    Part of the assembly had been created the "via the listing" way, the rest directly. Fully symbolic (including symbolic stack variables), with some constructions that cannot even be described in C (sailing hard on the hardware).
    The project? real-time (synchronous) video processing  Smile
     

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #9
    JPortici
    Super Member
    • Total Posts : 848
    • Reward points : 0
    • Joined: 2012/11/17 06:27:45
    • Location: Grappaland
    • Status: offline
    Re: No CAN support for dsPIC33CK256MP508 in MCC? :( 2019/06/25 09:05:44 (permalink)
    0
    Asm_Matt
    Jack_M
    It's using a brand new peripheral.
    There is all the code you can possibly need in the reference manual chapter.




     Maybe I have not explained the problem I am having (or don't understand it (more likely)) .
     
     If I substitute a dsPIC33EP128MC506 then the CAN is present and can be configured, can you please explain what you mean be "It's using a brand new peripheral." does this mean Microchip have no support for this FD-CAN in MCC for any part?
     
     As a team, we are new to CAN, and (as is so often the case) are pushed for time, MCC is a huge help as it generates usable code that can be understood, trimmed, and tweaked to suit our particular needs.
     
     I guess the real answer may be that MCC does not yet offer support for the FD-CAN peripheral for this (or any?) part.
     
     I suppose the frustration I am having is that I can't find a definitive way of searching for what peripherals MCC supports for each part...without going through each part in MPLAB-X. This is, again, probably a failing on my part to locate this information.....
     
     
    Regards
     
     
     
    Matthew :)




    I understand your problems.
    It's a new peripheral because it's the first (Microchip) part with CAN FD.
    There are many differences (Actually some of them are covered in the migration documents you can find in the product page)
    - DMA is not required, altough i have no idea on how the memory transfer between ram and peripheral happens, if the processor is stalled or if there actually is a dedicated dma or a dedicated bus or what.
    - Altough some control operations (modes, configuration) are the same everything else is different
      The buffers are arranged differently
      The sequence of operations to read from/write to fifos is different
      The configuration itself for the clock and for the time quanta is different and much more complicated than with CAN 2.0
     
    I'll repeat myself and please note that i'm not being rude: Go read the manual.
    Because if you did instead of complaining and asking for "more meaningful help" you would have seen that they actually did a very good job in explaining the peripheral and how to configure it. The clock and time quanta are explained very well, with formulas and criterias and if even then it will be confusing (it will.) there are tables with settings values that should work without issues, because FD is so much more complex on timing requirements!
    Then there are code examples which show how to declare the FIFOs in ram, how to access them and how to perform reads and writes. Litterally the only thing that they didn't do is to provide a project with the example source code already copy pasted.
     
    This is why RTFM.
     
    It will be a very steep hill to climb if you have no CAN experience, but it would be in any case, with any CAN controller. You need to set up a network to test the communication, you need a decent and reliable can bus analyzer that comes with decent and reliable software, preferably compatible with BUSMASTER, none of that cheap rubbish like the microchip can analyzer. That is a horrible mess.
     
    Then i understand how it is, i also like to use code generators for the stuff i don't want to write, like USB or the console drivers but i HAVE to know how the peripheral work for when the code generator is wrong, because it will be, or when i can't understand what it does, because it doesn't help me with that. And being the sole developer here means that i have to know everything. I can't rely on things being already done.
    And reading the manual always helps, you're going to waste time waiting for answers anyway.
     
    If you need other references, the peripherals resembles the one in the PIC32MX (it may very well be the same, with added FD support)
    #10
    Jump to:
    © 2019 APG vNext Commercial Version 4.5