Who is using / wants to use the CANbus on the Duinomite MEGA or eMEGA?

Started by KeesZagers, July 15, 2013, 09:02:00 PM

Previous topic - Next topic

KeesZagers

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,

olimex

no problem to put it on GitHub to people try it and test/report bugs

KeesZagers

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

Chepalle

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

KeesZagers

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


john_m0ers

Hi Kees,
If this is still active, I would like to have a look at can on the mega/emega.
Thank you,
regards john

KeesZagers

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