CAN SDK

From ElectroDragon
Revision as of 06:17, 19 November 2019 by Chao (talk | contribs) (Created page with " == Tutorial == * [https://www.youtube.com/watch?v=4SgW64d_fbE CAN control by arduino video] == Linux == * Python - first install library sudo pip install python-can * Bitr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Tutorial


Linux

  • Python - first install library sudo pip install python-can
  • Bitrate - 100000 (100K S3), 1000 000(1M S8)
msg = bus.recv(10.0) #timeout 10 seconds

CAN USB

CAN UCCB Commands

UCCB firmware

000005: C  (send close command) 
000006: v  (ask for firmware version)
000007: v0102 (get version number from device)
000008: V   (ask for hardware version)
000009: V0101
000010: N   
000011: N16000000
000012: W2D00
000013:
000014: S8  (set speed to 1000000 b/s)
000015: 
000016: O   (open CAN for frame transmission and reception)
000017: 
000018: t00181122334455667788 (transmit frame type standard id = 1 length 8 bytes)
000019: z
000020: t0890
000021: M00007000000010000000010    (set id filter for ID=1 and ID=1)

data command: t00181122334455667788 = t / 001 / 8 / 11 22 33 44 55 66 77 88

  • 001 is identifier, length = 8bytes

Documents