Jump to content
  • 0

CAN interface with analog discovery 2


Lakshmi Tejas M A

Question

Hi all

i am using Analog discovery 2 for communication purpose.(CAN)

I tried using the sample code given same as attached.

I am using PCAN to send/receive frames to analog discovery 2 , I am sending only one frame with Standard ID : 0x011 and Data: 0xaa 0xbb 0xcc 0xdd 0xee 0xff

but i am receiving lot of Frames with the same ID sent, lot of extended remote frames with CRC errors ,etc. I have attached the console output for reference. Can I know why i am facing the issue?

I tried same experiment with waveforms still having similar issue. I have attached the screen shot of it.
 

 

Digital_Can.py

CAN_Console.txt

Can.PNG

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

18 hours ago, attila said:

Hi @Lakshmi Tejas M A

It looks like your signal has high polarity. Set the Polarity to High in Logic Analyzer CAN interpreter options.
image.png.5597e10f812131f09f9417c6ae8e7d42.png

To use the high option in the Protocol tool and SDK please update to WF v3.8.6:
https://forum.digilentinc.com/topic/8908-waveforms-beta-download/

 

i tried that option of High and Low. I put CAN to High and CAN2 to LOW. still i get the similar erro. Attached screenshot

Capture.JPG

Link to comment
Share on other sites

Hi @Lakshmi Tejas M A

The CAN bus signals are differential.
To decode these with the AD2 logic analyzer you either need a transceiver to 3.3V logic or you may try using adaptor resistor/voltage divider. In this case it is suffice to connect one of signals low or high and of course the ground signal.

The AD2 inputs are 3.3V or 1.8V compatible, with logic threshold at ~1.4V and ~0.5V
To see the received voltage levels by the digital IOs use the oscilloscope inputs.

See the following posts and the references in it:

 

Link to comment
Share on other sites

Hi @attila

Thank you for the suggestion to use the transceiver(using python). 

  1. transmission from AD2 to PCAN is happening (ID: 0x3fd DLC: 4 Data: 0x00 0x01 0x02 0x03)
  2. receiving in AD2 from PCAN(only one frame sent ID=0x135,DLC=3,Data=0xCC 0x01 0x01) I am still getting lot of frames(repeated correct frames, CRC error frames etc), I have attached the console of the same. Can you help me with this?
  3. Is there any option to not receive signals that are transmitted from ad2 itself? (self transmitted) 
  4. also wanted to know why i am reading the same signal again and again?
  5. I am using the sample code given.

image.png

Console.txt

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...