Book home page

 

Low-Level C-Programming

for Designers 2022

-     Learn by doing -

 

Book home page

Book information

 

The books ambition is to:

·       train both theoretical and practical use of the fundamental low-level C and tools

·       train basic real-time operating system

·       train use of analog sensors and digital Bluetooth (connect to PC/Android)

 

The training is done by walking systematically through entire designs together with adequate theory. The design tools used in the book are professional and free to download for education purpose. The training is done with the design tools and validated on a FPGA board (Field Programmable Gate Arrays).

 

The book can be order from Amazon, as an e-book or paper book.

The hardware board used in this book is DE10-Lite and produced by Terasic Inc, Taiwan. For more information visit https://www.terasic.com.tw/.

 

Moment

Description

Download the tools

Download the free tools (Lite Edition) from Intel

Download HW configuration files

HW_CASES

Download CASE GOLD (last part in the book)

CASE_GOLD
Version 2022.1

Download older version(s) of CASE GOLD

N/A

  

Links (in the order they appear in the book)

-      Preface

o   Swedish National Agency for Higher Vocational Education: myh.se

o   AGSTU Higher Vocational Education Diploma: yh.agstu.se

-      2 Overview

o   EEVBlog #496 – What is an FPGA? youtube.com/watch?v=gUsHwi4M4xE

o   How a compiler works: youtube.com/watch?v=Kd93n4_5UjM

o   What is an API? youtube.com/watch?v=iGkTCObcOqM

o   What is an SDK? youtube.com/watch?v=py5H8gKvw44

-      3 Hardware and software installation

o   Quartus Prime download: intel.com/content/www/us/en/programmable/downloads/download-center.html

o   Hardware design book “Advanced HW/SW Embedded System for Designers” available on amazon.com

o   DE10-Lite board by Terasic Inc: terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=234&No=1021

o   Terasic DE10 Lite Cost effective MAX10 FPGA Board: youtube.com/watch?v=RVC2TEo8uVI

o   Techwalla - What Is the Difference Between a CPU & a Processor? techwalla.com/articles/what-is-the-difference-between-a-cpu-a-processor

-      5 CASE 2 – Memory organization with linker

o   DRAM vs SRAM: youtube.com/watch?v=atWlAdVvTx8

o   SRAM and DRAM: youtube.com/watch?v=SO4i3rKkLIE

o   Introduction to Computers - Lesson 2 - Memory Basics: youtube.com/watch?v=yQqvL0Q51HE

-      8 CASE 5 – Polling and interrupt

o   COMS W6998 – Interrupts and Exceptions: cs.columbia.edu/~nahum/w6998/lectures/interrupts.ppt

o   Embedded - Use an MCU’s low-power modes in foreground/background systems: embedded.com/use-an-mcus-low-power-modes-in-foreground-background-systems/

o   Electrical Engineering Stack Exchange - What is the difference between context switching and interrupt handling? electronics.stackexchange.com/questions/137895/what-is-the-difference-between-context-switching-and-interrupt-handling

o   Nios® II Software Developer Handbook: intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/nios2/n2sw_nii5v2gen2.pdf

o   Custom Computer Services Inc - What are the restrictions on function calls from an interrupt function? ccsinfo.com/faq.php?page=functions_in_interrupts

o   Embedded Systems - Shape The World - Chapter 12 Interrupts: users.ece.utexas.edu/~valvano/Volume1/E-Book/C12_Interrupts.htm

o   Polling vs. Interrupts - An Introduction To Microcontrollers – PyroEDU: youtube.com/watch?v=yOMFFeCsmv8

o   Signalling: Interrupts and Polling: youtube.com/watch?v=XVELlNDuwfE

-      9 Presentation of HW and SW drivers for CASE GOLD

o   Arduino: arduino.cc

o   Fritzing: fritzing.org

-      11 Basic Real-Time Operating System

o   RTOS Tutorial (1/5) : Why is RTOS required? youtube.com/watch?v=ECEvUEkSSLg

o   Perceptio®: percepio.com/

o   Wikipedia - Rate-monotonic scheduling: en.wikipedia.org/wiki/Rate-monotonic_scheduling

o   RTOS Tutorial (3/5) : Semaphore and event flag: youtube.com/watch?v=firiu8_3DZA

o   Passing data between RTOS tasks: youtube.com/watch?v=OLucKgA4_qQ

-      12 CASE 6 – Handling analog signals with ADC

o   ADC: youtube.com/watch?v=7X53_QCXbjk

o   Electronics 201: Analog/Digital Conversion: youtube.com/watch?v=cjmcAE1L6OQ

o   Wikipedia – Breadboard: en.wikipedia.org/wiki/Breadboard

o   How to Use a Breadboard: youtube.com/watch?v=6WReFkfrUIk

o   Intel® MAX® 10 Analog to Digital Converter User Guide: intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/max-10/ug_m10_adc.pdf

-      13 Bluetooth Connection to Android and/or PC

o   Bluetooth®: bluetooth.com

o   Wikipedia – Bluetooth: en.wikipedia.org/wiki/Bluetooth

o   Fun and Easy UART - How the UART Serial Communication Protocol Works: youtube.com/watch?v=ZzRXKDkMBhA

o   Using Terminals with DE-Series Boards: ftp://ftp.intel.de/Pub/fpgaup/pub/Intel_Material/17.0/Tutorials/Using_Terminals.pdf

o   Tera Term Home Page: ttssh2.osdn.jp/index.html.en

o   How to Make an Android App for Beginners: youtube.com/watch?v=EOfCEhWq8sg

o   Appinventor.org: appinventor.org

 

 

Forum:

-      Altera Wiki: www.alterawiki.com

-      Altera Forum: www.alteraforum.com

 

Figure 1: HW/SW learning flow for FPGA developer

Errata

·       Under step 4 in chapter 6.4 a comment has made it look like there is an extra #endif in the example code:

·       The first example of TCL file content in chapter 6.5 shows hw_class_name as just “timer” this should be “TIMER_HW_IP”.

·       Table 38 incorrectly show the unoptimized code example using an unsigned integer value for x. This variable must be signed (int x) or the loop will run indefinitely.

·       Figure 121 shows the VGA buffer having 0-219 rows, but it is actually 0-239 rows.

 

Revision

Date

Description

4.0

2022

New version of book and hardware – previous version available here

 

Contact with the Author:

 

 

Disclaim
All the information (including hardware, software, designs, text and files) on this site are provided "as is" and without any warranties expressed or implied, including but not limited to implied warranties of merchantability and fitness for a particular purpose. In no event should the author be liable for any damages whatsoever (including without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use or inability to use information (including software, designs and files) provided on this site.
Copyright
Unless otherwise specified, all information (including software, designs and files) provided on this site are copyrighted 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020,
2021, 2022 AGSTU AB.
Copyright AGSTU.com. All Rights Reserved