Olimex Support Forum

DUINO => DUINOMITE => Topic started by: KeesZagers on July 15, 2013, 09:02:00 PM

Title: Who is using / wants to use the CANbus on the Duinomite MEGA or eMEGA?
Post by: KeesZagers on July 15, 2013, 09:02:00 PM
Reason for asking is: I have made a new firmware, which includes support for all functionality of the PIC32 CAN controller. This controller is very powerfull and a lot of resources of processor and memory are used for it. So I don't think it is a good idea to see this firmware as an upgrade for the DMBasic as it is now. It should be a dedicated CAN-version. That is why I like to know how many people on this forum are interested in it,
Title: Re: Who is using / wants to use the CANbus on the Duinomite MEGA or eMEGA?
Post by: olimex on July 17, 2013, 07:59:15 AM
no problem to put it on GitHub to people try it and test/report bugs
Title: Re: Who is using / wants to use the CANbus on the Duinomite MEGA or eMEGA?
Post by: KeesZagers on July 26, 2013, 03:36:42 PM
No other reactions and not many views. So it does not make sense to put the source on GitHub. The documentation of the CAN library, including the original commands of Frank Voorburg can be found on:

http://www.si-kwadraat.nl/si2-cbb/can-library/doc.pdf

Kees
Title: Re: Who is using / wants to use the CANbus on the Duinomite MEGA or eMEGA?
Post by: Chepalle on November 23, 2013, 06:35:39 PM
Hello! I'm trying to use CAN bus on Duinomite mega with MMbasic v.4.xxxxx.. but I had surprise...the ninimum speed MMbasic for Duino with Can run is 200000 bps!!! I need 125000! I wrote email to Geoff who gently answared to report questions to Frank...but now no answare,soI give up!
Regards, Carlo
Title: Re: Who is using / wants to use the CANbus on the Duinomite MEGA or eMEGA?
Post by: KeesZagers on November 27, 2013, 10:54:10 AM
Hello Chepalle,

As I wanted to create my own CAN blackboxes with own CAN firmware I stayed with the old DMBasic version 2.7 and with this version I can create every bitrate between 25 kb/sec up to 1000 kb/sec.

When I started with the Duinomite Mega no Basic support was available. So I PEEKED en POKED in the Microchip CAN controller to do the right settings.

Although you have CAN commands now, you can still do this. Please try the following:
1. Do a CANCLOSE to swith the CANport in Configuration Mode.
2. Give the following POKE commands
POKE &HBF88,&HB010,&H0F
POKE &HBF88,&HB011,&HAF
POKE &HBF88,&HB012,&H04
POKE &HBF88,&HB013,&H00
This will set the bitrate to 125 kb/sec
3. Give the following POKE command
POKE &HBF88,&HB003,&H00
This will do the CANOPEN based on 125 kb/sec

Now you can use the CANSEND and CANRECV commands to communicate with the CANbus. Hope this helps.

Kees

Title: Re: Who is using / wants to use the CANbus on the Duinomite MEGA or eMEGA?
Post by: john_m0ers on July 17, 2015, 02:17:29 AM
Hi Kees,
If this is still active, I would like to have a look at can on the mega/emega.
Thank you,
regards john
Title: Re: Who is using / wants to use the CANbus on the Duinomite MEGA or eMEGA?
Post by: KeesZagers on July 17, 2015, 05:40:58 PM
Hello John,

As you can see in my last entry on this forum I have done quite some projects already based on the Duinomite Mega with CAN. However due to the low interest on this forum I decided to change the philosophy and use the firmware in dedicated projects. This does not mean that it is not available for others anymore, but I have it in a protected area on our site.

I will send you a private mail with more details.

Kees