Free Trials

Download a free trial to find out which Altium software best suits your needs

How to Buy

Contact your local sales office to get started on improving your design environment

Downloads

Download the latest in PCB design and EDA software

  • PCB DESIGN SOFTWARE
  • Altium Designer

    Complete Environment for Schematic + Layout

  • CircuitStudio

    Entry Level, Professional PCB Design Tool

  • CircuitMaker

    Community Based PCB Design Tool

  • NEXUS

    Agile PCB Design For Teams

  • CLOUD PLATFORM
  • Altium 365

    Connecting PCB Design to the Manufacturing Floor

  • COMPONENT MANAGEMENT
  • Altium Concord Pro

    Complete Solution for Library Management

  • Octopart

    Extensive, Easy-to-Use Component Database

  • PRODUCT EXTENSIONS
  • PDN Analyzer

    Natural and Effortless Power Distribution Network Analysis

  • See All Extensions
  • EMBEDDED
  • TASKING

    World-Renowned Technology for Embedded Systems Development

  • TRAININGS
  • Live Courses

    Learn best practices with instructional training available worldwide

  • On-Demand Courses

    Gain comprehensive knowledge without leaving your home or office

  • ONLINE VIEWER
  • Altium 365 Viewer

    View & Share electronic designs in your browser

  • Altium Designer 20

    The most powerful, modern and easy-to-use PCB design tool for professional use

    ALTIUMLIVE

    Annual PCB Design Summit

    • Forum

      Where Altium users and enthusiasts can interact with each other

    • Blog

      Our blog about things that interest us and hopefully you too

    • Ideas

      Submit ideas and vote for new features you want in Altium tools

    • Bug Crunch

      Help make the software better by submitting bugs and voting on what's important

    • Wall

      A stream of events on AltiumLive you follow by participating in or subscribing to

    • Beta Program

      Information about participating in our Beta program and getting early access to Altium tools

    All Resources

    Explore the latest content from blog posts to social media and technical white papers gathered together for your convenience

    Downloads

    Take a look at what download options are available to best suit your needs

    How to Buy

    Contact your local sales office to get started improving your design environment

    • Documentation

      The documentation area is where you can find extensive, versioned information about our software online, for free.

    • Training & Events

      View the schedule and register for training events all around the world and online

    • Design Content

      Browse our vast library of free design content including components, templates and reference designs

    • Webinars

      Attend a live webinar online or get instant access to our on demand series of webinars

    • Support

      Get your questions answered with our variety of direct support and self-service options

    • Technical Papers

      Stay up to date with the latest technology and industry trends with our complete collection of technical white papers.

    • Video Library

      Quick and to-the-point video tutorials to get you started with Altium Designer

    How to Guarantee Signal Integrity in Your PCB Design for Serial Communication Protocols

    September 29, 2017

    Man trying to listen to someone

    During my school days, I was addicted to the popular FIFA PC games series. I could spend hours scoring against the best virtual soccer teams. I was so engrossed in playing the game that I become oblivious to my mom’s  voice when she called me to run an errand. It goes without saying that I received a healthy dose of scolding from my mom and was slapped with a 3 months ban on PC gaming. This is a good example of external sources can cause us to miss or misread important communication sent to us. In the world of embedded systems, miscommunication is also a big issue. This is particularly the case when the signal integrity of your microcontroller (MCU) is compromised. Missed data packets, or incorrectly delivered packets can land you with a punishment far worse than 3 months without FIFA. Let’s explore how to ensure that information is transmitted and received properly between embedded systems on a serial communication interface.

    The Usage Of Serial Communication Protocol In Embedded Systems

    Communication is important in the embedded systems. As you may well know, serial communication is one of the most popular means for data transfer in embedded systems. It involves transmitting packets bit by bit in a sequential manner between MCUs. Let’s look at the two different types of serial communication.

    Serial communication can be divided into synchronous and asynchronous. Synchronous serial communication, like Serial Peripheral Interface (SPI) and the Inter-Integrated Circuit (I2C) protocol, use a clocking signal to synchronize the data transmission. Memory chips like Static Random Access Memory (SRAM), Flash and Electrically Erasable Programmable Read-only Memory (EEPROM) are common components that use synchronous communication.

    On the other hand, asynchronous serial communication, like RS232 and RS485, do not have a clocking signal. Instead they rely on unique Start and Stop bits to separate bytes of data. These are commonly used to communicate between different embedded systems or between embedded system and a data collecting computer. Standards like RS232 and RS485 do not have a defined upper layer of protocol, error handling and recovery. These are normally specified by the system developers. 

    Asynchronous serial communication is quite common in applications like parking payment machines, data monitoring systems, and security systems that rely on conventional wired communication technology. Vital information such as payment transactions, periodic parameter variables, alarms and fault events are transferred to a data collecting PC for audit purposes and backup.

    Why Signal Integrity In Communication Is Important And How It Can Be Compromised

    It is important that data packets are transferred from embedded systems to data collecting terminals accurately. When this fails to occur, there can be financial repercussions. For example, in a payment systems, if valid payment transactions are occasionally lost in transmission then there is no record of them. This can cause serious issues when the money collected does not tally with the logged transactions.

    Besides data packets that went missing in transmission, signal integrity can also affect the content of a data packet. Although serial communication is a digital process, the nature of the voltage level that makes every byte is still analog. Theoretically, digital communications involve logics of 1 and 0, and are represented by different voltage levels. In real life, these voltages are not smooth and straight lines, since they occasionally suffer distortion from electrical interference.This is especially so in communication cables that are thousands of feet long. Compared to packet losses, it is harder to locate data that has been miscaptured. For example, a transaction with corrupted date information may still appear somewhere in the database.

    Besides the inevitable electrical interference from external factors in locations where the embedded systems are installed, corruption in the transacted data packet may be caused by PCB designs that do not adhere to best design practices. Proper error checking handling and recovery systems may also be missing from embedded systems that encountered issues from corrupted or lost packets. This can be a result of inexperienced programmers or simply because the programmer failed to consider the importance of a proper error checking system.

    Person panicking at their computer
    When your data packets are lost and recovery is not possible.

    How To Design With Signal Integrity For Proprietary Serial Communication Protocol In Mind

    A well-designed embedded system will be able to mitigate issues that can affect your SPI signal integrity by preventing them in the first place and/or by having backup recovery measures. Here are some approaches that I have personally used in my embedded system designs.

    1. Implementing Checksum In The Data Packet

    Having a Cyclic Redundancy Check (CRC) checksum, instead of simplistic performing bitwise operations (ADD or XOR), on all the bytes in the packet enables the receiver to accurately detect if a packet has been corrupted. The receiver can compare between the checksum in the transmitted packet and the manual calculation. Then it can discard the data packet if both of the checksums do not match.

    2. Handshaking And Acknowledgement

    Unless it is a broadcast message, each transmission data packet must be replied by the receiver with a (positive) acknowledgement (ACK) or negative acknowledgment (NACK). This allows the sender to know if the transmission has been successful or if they need to retransmit the same packet.

    3. Decreasing The Speed Of Transmission

    In serial protocol like RS485, the speed of transmission is often expressed in baud rate, which is the number of bits transmitted per second. Theoretically, RS485 supports a transmission rate of 100 kbps at a maximum length of 4000 feet but in actual applications, these values can be greatly reduced due to the quality of cables, electrical noises and the ability of the MCU to process the messages while managing other tasks. In applications where devices are separated from each other by thousands of feet, data packets can become corrupted at a higher baud rate. In that case, it’s wise to switch to a lower transmission speed.

    Car driving along highway next to speed sign
    Sometimes, lowering your speed in serial communication is the best option.

    4. Incorporate Best Design Practice In Your PCB

    Your firmware’s ability to deal with data corruption may be limited to the fundamental design of your PCB. Always adhere to the best design practices, like maintaining reasonable clearance between communication signals and using proper grounding to ensure digital signal stability. The best electronic design software, like Altium Designer and Altium’s CircuitStudio, have the right tools to support your best PCB design practices. 

    Need more advice in ensuring signal integrity involving signal communication? Talk to our experts at Altium now.

    most recent articles

    Back to Home