Thread: Transmit Data using Motorola and Intel Format

  1. #1
    Registered User
    Join Date
    Apr 2019
    Posts
    35

    Transmit Data using Motorola and Intel Format

    I am facing serious problem of understanding and confusion of Motorola and Intel formats. My requirement is I have to transmit 8 bytes of data using CAN communications it is serial communication. Could you please explain me if i have to transmit data say

    ex1: 234 (0xEA) -- Byte 0
    ex2: 1230(0x4CE) -- Byte 0 and Byte1

    How would i transmit? For Intel i think it is straight forward of Transmitting 0xEA. For Motorola how it will look like?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    You look at the specification for CAN.

    If CAN says little-endian, then you transmit CE 04 regardless of whether your machine is big-endian or little-endian.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Feb 2019
    Posts
    1,078
    It's not explicit in the specifications of Controller Area Network, but it suggests all data encodings are BIG ENDIAN (pretty standard for any network packets since the 60's). Groups of bits are arranged from msb to lsb order. (See DL3-DL0 and CRC SEQUENCE fields)...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to transmit Data
    By Satya in forum C Programming
    Replies: 1
    Last Post: 05-09-2017, 02:25 AM
  2. How to transmit a file from Linux to USB drive
    By s1rUK in forum C Programming
    Replies: 2
    Last Post: 06-01-2010, 08:16 AM
  3. data format
    By hockey97 in forum C++ Programming
    Replies: 4
    Last Post: 11-22-2007, 10:15 PM
  4. Help with data format
    By nizbit in forum C Programming
    Replies: 6
    Last Post: 02-13-2005, 11:40 AM
  5. Cellphone inquiry: Motorola
    By RoD in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 12-26-2002, 04:38 PM

Tags for this Thread