CAN_DW with cerberus

Perhaps this has been answered but i haven’t found it yet. Is there a way to get the CAN_DW module with cerberus? I obviously cant use the premium libraries with the cerberus but the code on the codeplex site uses the premium libraries.

Any thoughts?

Just added this to the tutorial GHI Electronics – Where Hardware Meets Software

Welcome to the community.

Thanks Gus, I did see that code before. I am trying to use 4.2 with VB and there are some issues resolving the libraries when i deploy to the device. It appears as though the HIElectronics.NETMF.Hardware library is not compatible? I can write in c# but i already have a ton of CAN data processing code done in VB from another life. Am i just missing something basic?

Also, when you pass the bit rate to the can_dw.initializecan function, do you put 125 for 125kbits or do you put 125000?

For 4.2 you should use the GHI.oshw libraries

I was able to get the TX working at a variety of baud rates, I checked this with my kvaser usb can tool. I was able to get about a tx rate of 1.5ms per 8 byte message.

I am still having some issues with the RX of data though. The getmessage function always returns true, regardless of data being transmitted on the bus, but does not have any data with it. I am generating random data with message id of 125 at 10ms intervals. Also I believe i found one issue with the declaration of the function as the message data was not declared as a byref (public bool GetMessage(out UInt32 ArbID, out bool EID, out bool RTR, out byte[] EightByteDataMessage))

I have started to debug the original code but i am not sure what else to do at this point.

Here is my code calling the function:

Private sub rx()
Dim data() As Byte = {0, 0, 0, 0, 0, 0, 0, 0}

     Dim id As UInt32 = 0
    Dim rtr As Boolean = False
    Dim eid As Boolean = False


    Dim rx As Boolean = can.GetMessage(id, eid, rtr, data)

  Debug.Print(data(0) & "_" & data(7) & "_" & rx)

   ' If rx = True Then
       '    Debug.Print(data(0).ToString)
    'End If

    data = Nothing

end sub