{
  "generatedAt": "2026-11-14T16:35:49.608Z",
  "meta": {
    "slug": "1-can",
    "type": "library",
    "status": "published",
    "publishAt": "2026-10-20T12:05:00+09:00",
    "updatedAt": "2026-10-19T15:15:30.074Z",
    "category": "embedded",
    "tags": [
      "can-bus",
      "communication-protocol"
    ],
    "authors": [
      "kwon-minjae"
    ],
    "series": "fundamentals-of-communications",
    "seriesOrder": 1,
    "project": "",
    "thumbnail": "/data/img/cover.ffd2a3f3f0.1200.webp",
    "ogImage": "/data/og/1-can.jpg?v=110ca99c42",
    "noindex": false,
    "hasCover": true,
    "thumbnailSrcset": "/data/img/cover.ffd2a3f3f0.480.webp 480w, /data/img/cover.ffd2a3f3f0.1200.webp 1200w"
  },
  "locales": {
    "ko": {
      "language": "ko",
      "filename": "ko.html",
      "format": "html",
      "title": "통신 1 - CAN",
      "summary": "CAN 통신이 무엇인지와 데이터 프레임의 구조를 정리합니다.",
      "description": "CAN 통신이란 무엇일까요? 자동차의 복잡한 ECU 통신 문제를 해결하는 CAN의 원리와 구조, 데이터 프레임의 각 요소를 상세히 설명합니다. CAN 통신의 핵심 원리를 이해하고 싶다면 지금 확인하세요.",
      "content": "<h2><span style=\"font-size: 20px;\"><strong>CAN 통신이란</strong></span></h2><p>CAN통신은 Controller Area Network의 약자로 제어기 통신망을 의미합니다.<br>기존의 1:1 방식으로 통신하는 UART와 같은 방식과 달리 1:다수를 통신하기 위해 BUS를 사용합니다.<br><br>버스에 승객들이 오르내리는, 한 노선을 공유하는 것을 본떠 여러 장치들이 하나의 통신노선을 공유하는 방식으로 이해하시면 됩니다. <span style=\"font-size: 18px;\"><strong>왜 이런게 필요한가?</strong></span> 현대의 자동차를 생각해보면 좋습니다. 자동차는 창문, 라이트, 브레이크, 전자식기어, 스티어링 휠 등 다양한 ECU(Electronic Control Unit)를 제어해야하는 환경입니다. 그런데 중앙 제어기와 1:1로 모든 ECU를 연결하면 전선의 개수, 무게를 감당할 수 없는 문제가 발생합니다. 이를 해결하기 위한 방법으로 CAN방식이 만들어졌습니다.</p><figure data-type=\"image-block\" class=\"image-block image-block--center\" style=\"max-width: min(100%, 72%);\"><img src=\"/data/img/1-can-1792416608355-3a21b6.d61192992b.1440.webp\" alt=\"CAN 통신의 구조\" title=\"\" data-width=\"72\" data-align=\"center\" data-caption=\"CAN 통신의 구조\" class=\"editor-image image-align-center\" loading=\"lazy\" style=\"width: 100%; height: auto;\" srcset=\"/data/img/1-can-1792416608355-3a21b6.d61192992b.640.webp 640w, /data/img/1-can-1792416608355-3a21b6.d61192992b.960.webp 960w, /data/img/1-can-1792416608355-3a21b6.d61192992b.1440.webp 1440w\" sizes=\"(max-width: 767px) calc((100vw - 32px) * 0.72), 518px\" width=\"1920\" height=\"920\" data-img-tone=\"light\" decoding=\"async\"><figcaption>CAN 통신의 구조</figcaption></figure><h2><span style=\"font-size: 20px;\"><strong>CAN 데이터 프레임</strong></span></h2><figure data-type=\"image-block\" class=\"image-block image-block--center\" style=\"max-width: min(100%, 72%);\"><img src=\"/data/img/1-can-1792417431654-3ebed6.e1ea296e2f.1440.webp\" alt=\"CAN 데이터 프레임의 필드: SOF, 식별자(11비트), RTR, IDE, r0, DLC(4비트), 데이터(0–64비트), CRC(15비트), 구분자, ACK, EOF(7비트)\" title=\"\" data-width=\"72\" data-align=\"center\" class=\"editor-image image-align-center\" loading=\"lazy\" style=\"width: 100%; height: auto;\" srcset=\"/data/img/1-can-1792417431654-3ebed6.e1ea296e2f.640.webp 640w, /data/img/1-can-1792417431654-3ebed6.e1ea296e2f.960.webp 960w, /data/img/1-can-1792417431654-3ebed6.e1ea296e2f.1440.webp 1440w\" sizes=\"(max-width: 767px) calc((100vw - 32px) * 0.72), 518px\" width=\"2400\" height=\"500\" data-img-tone=\"light\" decoding=\"async\"></figure><p><strong>Arbitration</strong><br><span style=\"font-size: 16px;\"><strong>SOF</strong>: Start o</span>f Frame의 약자로 프레임의 시작을 알리는 1비트(dominant, 0)를 통해 알립니다. CAN Controller가 시작부분을 읽을 수 있도록 도와줍니다. <br><span style=\"font-size: 16px;\"><strong>Identifier</strong>:</span> 식별자라는 뜻으로 엔진 회전수, 브레이크 상태등을 표기하는 값입니다. 보통 16진수 <code>0x000</code> ~ <code>0x7FF</code> 로 작성하며 값이 작을수록 우선권을 가지게 되고 동시에 보내면 우선순위에 따라 처리됩니다.<br><strong>RTR</strong>: Remote Transmission Request의 약자로 요청인지, 응답인지를 구별하는 방법입니다. 0인 경우 응답하는 메시지로서 \"온도가 25다\"와 같은 실제 데이터를 가지고 있습니다. 1인 경우에는 해당하는 값을 알려달라는 요청신호, 질문입니다. 하지만 최근에는 센서값들이 항상 주기적으로 값들을 뿌려서 잘 사용되지 않습니다.</p><p><strong>Control</strong><br><strong>IDE: </strong>Identifier Extension의 약어로 앞전에 설명한 식별자의 길이가 짧은 이름표인지(EX: 1반), 긴 이름표인지(서울시 강남구 ○○초 3학년 1반)를 구별해주는 역할입니다. 0인 경우 짧은 이름표, 1인 경우 긴 이름표로 사용되며 장치가 복잡해지면 이름이 길어지는데, 이를 해결하기 위한 부분입니다. 여기서 저는 \"<span style=\"font-size: 16px;\"><strong>Identifier</strong>를 읽고 넘어올텐데 </span>왜 길이를 뒤에서 알려주지?\" 라는 생각을 했었는데 비트 위치가 IDE의 경우 고정되어 있어서 짧은 이름의 부분까지 읽은 뒤, 더 있는지 확인하기위해 IDE 값을 확인하는 구조라고 하여 이해되었습니다. <br><strong>r0: </strong>Reserved, 예약 비트로 추후 기능이 추가되면 사용하기 위해 비워두는 비트입니다. 실제로 CAN-FD 방식에서는 해당 칸을 다른 기능으로 사용합니다. <br><strong>DLC: </strong>Data Length Code의 약자로 이후에 이어질 데이터가 몇 Byte인지 설명해주는 부분입니다. 4비트의 공간으로 0~15까지 기입할 수 있고, Classic CAN방식은 8바이트까지만 지원하기 때문에 실제로는 0~8, 총 9가지로 동작하며 이 이상의 숫자는 8로 인식됩니다.</p><p><strong>Data</strong><br>실제 데이터, 내용이 들어가는 부분으로 8바이트 안에서 엔진 회전수, 냉각수 온도 등을 구간을 나눠 기입한 뒤 전송하게 됩니다. 데이터의 순서또한 DBC(CAN Database)로 정리하여 보내는 쪽과 받는쪽에서 알아들을 수 있도록 합니다.</p><p><strong>CRC</strong><br>Cyclic Redundancy Check의 약자로 메시지가 전송 중에 누락, 손상된 부분이 있는지 검토하는 구간입니다.<br>SOF, ID, Control, Data의 값들을 정해진 수식으로 계산하여 15bit의 검사 값을 만들고 이를 기입하여 수신부에서 확인할 수 있도록 돕습니다. 이후 Del(Delimiter)를 통해 CRC가 종료됨을 1로 알려줍니다.<br>저는 왜 15bit로 항상 길이가 같은데 Del이 필요한가에 대해 의문이 들었는데, 연산에 필요한 시간확보, 이후에 이어질 ACK신호를 구분할 수 있도록 돕는다는 역할이 있다는 것을 이해하였습니다.</p><p><strong>ACK</strong><br>Acknowledge의 약자로 수신을 잘 받았는지 확인하는 구간입니다.<br>송신부는 1을 보내고, 수신부에서 확인 후 0으로 덮어씁니다. 이 과정이 1비트 안에서 일어나기 때문에 도중에 0으로 덮어 써진다면 누군가 신호를 받았구나로 인식할 수 있습니다. (CAN에서는 Default State가 1입니다.)</p><p><strong>End</strong><br><strong>EOF: </strong>End of Frame의 약자로 1의 상태가 7번 연속으로 출력됩니다. 이를 프레임이 끝나는 부분으로 인식하고 종료하며 도중에 하나라도 0이 뜬다면 에러로 확인합니다. 왜 7번인것인가?!에 대해 궁금하여 찾아본 결과 데이터를 보냄에 있어 같은 값이 5번 이상 연속되면 반대 비트를 끼워 넣는 규칙(Bit stuffing)이 들어가게 되는데 따라서 같은 값이 6번 이상 연속될 수 없습니다. 따라서 7번 연속되면 데이터가 종료됨을 인지할 수 있습니다.</p><p></p><p>끝!</p>",
      "rendered": true
    },
    "en": {
      "language": "en",
      "filename": "en.html",
      "format": "html",
      "title": "Communications 1 - CAN",
      "summary": "Uncovering Everything About CAN, the Core of Automotive Communications",
      "description": "What is CAN communication? This article provides a detailed explanation of CAN’s principles and structure—as well as each element of its data frames—to help solve the complex ECU communication challenges in automobiles. If you want to understand the core principles of CAN communication, check it out now.",
      "content": "<h2><span style=\"font-size: 20px;\"><strong>What is CAN Communication?</strong></span></h2><p>CAN communication stands for Controller Area Network.<br>Unlike traditional 1-to-1 communication methods such as UART, it uses a bus to enable 1-to-many communication.<br><br>You can think of it as multiple devices sharing a single communication line, much like passengers getting on and off a bus that shares a single route. <span style=\"font-size: 18px;\"><strong>Why is this necessary?</strong></span> Consider a modern automobile. A car operates in an environment where it must control various ECUs (Electronic Control Units), such as windows, lights, brakes, electronic gearshift, and the steering wheel. However, connecting every ECU to a central controller on a one-to-one basis would result in an unmanageable number of wires and excessive weight. The CAN protocol was developed as a solution to this problem.</p><figure data-type=\"image-block\" class=\"image-block image-block--center\" style=\"max-width: min(100%, 72%);\"><img src=\"/data/img/1-can-1792416608355-3a21b6.d61192992b.1440.webp\" alt=\"Structure of CAN communication\" title=\"\" data-width=\"72\" data-align=\"center\" data-caption=\"Structure of CAN Communication\" class=\"editor-image image-align-center\" loading=\"lazy\" style=\"width: 100%; height: auto;\" srcset=\"/data/img/1-can-1792416608355-3a21b6.d61192992b.640.webp 640w, /data/img/1-can-1792416608355-3a21b6.d61192992b.960.webp 960w, /data/img/1-can-1792416608355-3a21b6.d61192992b.1440.webp 1440w\" sizes=\"(max-width: 767px) calc((100vw - 32px) * 0.72), 518px\" width=\"1920\" height=\"920\" data-img-tone=\"light\" decoding=\"async\"><figcaption>Structure of CAN Communication</figcaption></figure><h2><span style=\"font-size: 20px;\"><strong>CAN Data Frame</strong></span></h2><figure data-type=\"image-block\" class=\"image-block image-block--center\" style=\"max-width: min(100%, 72%);\"><img src=\"/data/img/1-can-1792417431654-3ebed6.e1ea296e2f.1440.webp\" alt=\"Fields of a CAN data frame: SOF, identifier (11 bits), RTR, IDE, r0, DLC (4 bits), data (0–64 bits), CRC (15 bits), delimiters, ACK and EOF (7 bits)\" title=\"\" data-width=\"72\" data-align=\"center\" class=\"editor-image image-align-center\" loading=\"lazy\" style=\"width: 100%; height: auto;\" srcset=\"/data/img/1-can-1792417431654-3ebed6.e1ea296e2f.640.webp 640w, /data/img/1-can-1792417431654-3ebed6.e1ea296e2f.960.webp 960w, /data/img/1-can-1792417431654-3ebed6.e1ea296e2f.1440.webp 1440w\" sizes=\"(max-width: 767px) calc((100vw - 32px) * 0.72), 518px\" width=\"2400\" height=\"500\" data-img-tone=\"light\" decoding=\"async\"></figure><p><strong>Arbitration</strong><br><span style=\"font-size: 16px;\"><strong>SOF</strong>:</span> Stands for <span style=\"font-size: 16px;\">“Start o</span>f Frame” and is indicated by a single bit (dominant, 0) that signals the start of the frame. This helps the CAN controller read the beginning of the frame. <br><span style=\"font-size: 16px;\"><strong>Identifier</strong>:</span> This value, which indicates engine RPM, brake status, and other parameters, is typically written in hexadecimal <code>0x000</code> ~ <code>0x7FF</code> ; the smaller the value, the higher the priority. If multiple messages are sent simultaneously, they are processed according to priority.<br><strong>RTR</strong>: Stands for “Remote Transmission Request” and is used to distinguish between requests and responses. A value of 0 indicates a response message containing actual data, such as “The temperature is 25.” If the value is 1, it is a request signal—a question—asking for the corresponding value. However, this is rarely used nowadays because sensor values are constantly transmitted periodically.</p><p><strong>Control</strong><br><strong>IDE:</strong> An abbreviation for “Identifier Extension,” it serves to distinguish whether the identifier described earlier is a short label (e.g., Class 1) or a long label (e.g., 3rd Grade, Class 1, ○○ Elementary School, Gangnam-gu, Seoul). A value of 0 indicates a short label, while 1 indicates a long label. As devices become more complex, their names tend to get longer, and this feature addresses that issue. At first, I wondered, <span style=\"font-size: 16px;\">“If it’s going to read <strong>the Identifier</strong> anyway</span>, why specify the length afterward?” However, I came to understand that since the bit positions for the IDE are fixed, the system first reads the portion corresponding to the short name and then checks the IDE value to determine if there is more data. <br><strong>r0: </strong>Reserved—this bit is left empty for future functionality. In fact, in the CAN-FD protocol, this bit is used for other functions. <br><strong>DLC:</strong> Short for Data Length Code, this specifies how many bits of data will follow. It consists of 4 bits and can be set to values from 0 to 15. Since the Classic CAN protocol only supports up to 8 bytes, it actually operates with 9 possible values (0–8), and any value higher than that is interpreted as 8.</p><p><strong>Data</strong><br>: This is the section containing the actual data. Within 8 bytes, information such as engine RPM and coolant temperature is divided into segments and transmitted. The data order is also organized according to the DBC (CAN Database) so that both the sender and receiver can interpret it.</p><p><strong>CRC</strong><br>stands for Cyclic Redundancy Check; this section verifies whether any parts of the message were lost or corrupted during transmission.<br>It calculates a 15-bit checksum using a predetermined formula based on the values of SOF, ID, Control, and Data, and includes this checksum so the receiving end can verify the message. Subsequently, a “Del” (Delimiter) signals the end of the CRC by setting the bit to 1.<br>I used to wonder why a Del was necessary if the length was always 15 bits, but I came to understand that it serves the purpose of allowing sufficient time for the calculation and helping to distinguish the subsequent ACK signal.</p><p><strong>ACK</strong><br>stands for Acknowledge and is the segment that confirms whether the transmission was received correctly.<br>The transmitter sends a 1, and after the receiver verifies it, it overwrites it with a 0. Since this process occurs within a single bit, if it is overwritten with a 0 along the way, it can be recognized as a sign that someone received the signal. (In CAN, the default state is 1.)</p><p><strong>End</strong><br><strong>(EOF):</strong> Short for “End of Frame,” this is a sequence of seven consecutive 1s. This is recognized as the end of the frame, and if even a single 0 appears in the sequence, it is treated as an error. I was curious about why it’s seven times, so I looked it up. It turns out that when sending data, there’s a rule called “bit stuffing” that inserts a complementary bit if the same value appears five or more times in a row; therefore, the same value cannot appear six or more times in a row. Consequently, if the same value appears seven times in a row, we can recognize that the data has ended.</p><p></p><p>The end!</p>",
      "rendered": true
    }
  }
}
