Altair Embed Quickstart - UG
Altair Embed Quickstart - UG
Copyrights, Trademarks, Trade Secrets, Patents & Third Party Software Licenses
Altair Embed® 2020 Copyright 1986-2020.
The Platform for Innovation™
Altair Engineering Inc. Copyright © 1986-2020. All Rights Reserved.
Special Notice: Pre-release versions of Altair software are provided ‘as is’, without warranty of any
kind. Usage of pre-release versions is strictly limited to non-production purposes.
Note:
Compute Manager™ ©2012-2017 is now part of Altair Access
Display Manager™ ©2013-2017 is now part of Altair Access
PBS Application Services™ ©2008-2017 is now part of Altair Access
PBS Analytics™ ©2008-2017 is now part of Altair Control
PBS Desktop™ ©2008-2012 is now part of Altair Access, specifically Altair Access desktop, which also has Altair Access web and
Altair Access mobile
e-Compute™ ©2000-2010 was replaced by “Compute Manager” which is now Altair Access
Altair SmartWorks™ - Innovation Intelligence®
Altair intellectual property rights are protected under U.S. and international laws and treaties. Additionally, Altair software is
protected under patent #6,859,792 and other patents pending. All other marks are the property of their respective owners.
ALTAIR ENGINEERING INC. Proprietary and Confidential. Contains Trade Secret Information.
Not for use or disclosure outside of Altair and its licensed clients. Information contained in Altair software shall not be decompiled,
disassembled, “unlocked”, reverse translated, reverse engineered, or publicly displayed or publicly performed in any manner. Usage
of the software is only as explicitly permitted in the end user software license agreement. Copyright notice does not imply
publication.
Third party software licenses
AcuConsole contains material licensed from Intelligent Light (www.ilight.com) and used by permission.
Software Security Measures:
Altair Engineering Inc. and its subsidiaries and affiliates reserve the right to embed software security mechanisms in the Software
for the purpose of detecting the installation and/or use of illegal copies of the Software. The Software may collect and transmit
non-proprietary data about those illegal copies. Data collected will not include any customer data created by or used in connection
with the Software and will not be provided to any third party, except as may be required by law or legal process or to enforce our
rights with respect to the use of any illegal copies of the Software. By using the Software, each user consents to such detection and
collection of data, as well as its transmission and use if an illegal copy of the Software is detected. No steps may be taken to avoid
or detect the purpose of any such security mechanisms.
Supported hardware
Embed supports the following microcontrollers:
• Arduino Leonardo, Mega2560, and Uno
• ARM-Linux Raspberry Pi Zero, Zero W, 1A+, 2B+, 2B, 3A+, 3B, 3B+, and 4B series
• STMicroelectronics STM32 F0x, F3x, F4x, G0x, G4x, and L4x series
• Texas Instruments C2407, Delfino™, F280x, F28xx, F282xx, MSP430™, Piccolo™, and ARM Cortex™
M3 series
A: The Title bar includes the name of the currently open diagram. As you develop diagrams with hierarchy
and drill down into the hierarchy, you can look at the title bar to see where you are in the diagram.
B: The Menu bar contains drop down menus for all commands and blocks. You can customize the menu bar
with your own menu items, commands, and blocks using the Edit > Preferences > Menu Directories
command.
Getting Started with Embed 7
Commands and blocks can also be accessed from the block browser, toolbar, pop-up menus, and short-cut
keyboard commands. For example, to open a new diagram, you select File > New from the menu, or you
can click the toolbar button.
C: Customizable Toolbar buttons are shortcuts for commonly used editing, simulation, and debugging
functions.
D: The Block browser mirrors the menu bar and provides a convenient way to insert blocks into a diagram,
manage diagrams, and execute commands.
E: The Status bar keeps track of the number of blocks in your diagram, along with key simulation
information including the simulation range, step size, elapsed simulation time, and currently selected
integration algorithm.
F: The Work area is where you build your models.
Block libraries
In Embed, blocks are your basic design component. You can choose from over 200 mathematical,
engineering, and scientific blocks, allowing you to realize system models of any degree of complexity.
Embed also includes the following blocks specifically for designing embedded controllers.
• Fixed-Point block library
• Arduino Leonardo, Mega 2560, and Uno peripheral block libraries
• Raspberry Pi peripheral block libraries
• STMicroelectronics STM32 peripheral block libraries
• Texas Instruments C2407, Delfino, F280x, F28xx, F282xx, MSP430, Piccolo, and ARM Cortex M3
peripheral block libraries
• Texas Instruments digital motor control (DMC) block libraries
• Blocks for communicating with the target and performing analog and digital I/O operations with the
analog and digital ports on the target device
If your requirements extend beyond the standard block and toolbox libraries, you can create custom blocks
in C, C++, Fortran, and Pascal and add them to the Blocks menu for use in other models.
The above diagram reads ADC channel 5 and applies an offset and gain to convert the reading to
degrees centigrade. It also executes the code contained in Turn on Ch 5 Temp Conversion, which
switches ADC 5 from an external pin to the internal temperature sensor. Note that Turn on Ch 5 Temp
Conversion is triggered by the built-in variable $firstPass. This means that the block and its contents are
Getting Started with Embed 9
executed once at boot time.
4. Right-click Turn on Ch 5 Temp Conversion to move down one level of hierarchy.
The above diagram enables the internal temperature sensor on ADC A5. The Extern Read
(*(int*)0x3D7E82L) and Extern Write (*(int*)0x3D7E85L) blocks write directly to the hardware registers.
To enforce the order of execution, Embed executes parallel flows in top-down order. The ePWM block
sends Start of Conversion pulses to the ADC A5.
3. Activate Use selected compound edge pins for data exchange. This lets you debug the target
executable.
4. Click Compile to generate C code and compile it with Code Composer.
The following DOS window appears.
2. The above dialog box is for the Chip Temp on F28069-d debug diagram. Notice the options used in the
debug diagram:
• Start: 0; End: 10 provides a 10 second interval on plots.
• Time Step: 0.005 provides a 200 Hz update rate to data and plots.
• Run in Real Time causes the diagram to execute in real time, so that Embed runs in sync with the
target.
• Auto Restart causes Embed to run continuously until you stop it.
• Retain State causes Embed to refrain from initializing blocks on restart and prevents reload of the
OUT file.
Videos
The online Learning Center includes a series of short videos that introduce key concepts that are useful
when programming your hardware.
Sample diagrams
Your Embed software includes dozens of fully documented sample diagrams. These diagrams illustrate both
simple and complex models spanning a broad range of engineering disciplines.
To access the diagrams, click on Examples > Embedded. The two main subcategories are Digital Motor
Control and Digital Power Systems. If you know the chip you're targeting, you can see target-specific
examples in the target subcategory.