Skip to main content Skip to local navigation
Home » Category: 'c programming' (Page 2)

c programming

Simulated Microcontrollers in VPL Exercises

Simulated Microcontrollers in VPL Exercises

In Computer Architecture classes or Embedded Systems classes, it can be really useful to allow for students to be graded on assignments that allow them to interactively explore the inner workings of a microprocessor. One way is to have the students create programs in a hardware description language like Verilog or VHDL. Another way is […]

Simulating Micros from Command Line

Simulating Micros from Command Line

Introduction Microchip's MPLAB X permits simulation from the command line.  This is interesting from the perspective of teaching if we have automatically-graded programming assignments that take the student's program and runs it against a simulated chip in an LMS like Moodle. Background I'm interested in how we can use the MDB in MPLAB X to […]

Lab Kit for EECS 1011 and 1021.

Lab Kit for EECS 1011 and 1021.

The YorkU Bookstore sells a lab kit for EECS 1011 and 1021.  The original batch of kits arrived in September, 2020.  The next batch arrived in December, 2020.  If you live in a country for which the Bookstore does not ship to you, or you have discovered that there is no more stock at the […]

LPC802 & LPC804 Microcontroller lessons

LPC802 & LPC804 Microcontroller lessons

These are copies of the lessons and labs that I developed for the LPC802 and LPC804 microcontrollers by NXP. These are the "student" versions and contain blanks in certain places on purpose. Course Outline (EECS 3215 Winter 2020) Introduction to the design of embedded systems using both hardware and software. Topics include microcontrollers; their architecture, […]

Virtual Programming Lab

Virtual Programming Lab

Virtual Programming Lab is a plugin for Moodle (eClass at YorkU) that permits interactive programming assignments to be made for students.   There are some really good examples at Smith College on how to set it up with Python and a few with Java and C. I've posted, on YouTube, an example of how to […]

Disassembling in MPLABX & MCUXpresso

Disassembling in MPLABX & MCUXpresso

[to be updated] When you write programs in languages like C or C++ the programs get converted by the compiler tools into commands that the computer can read and understand.  Just before the compiler tools do that they convert your work into a sequence of commands into a language called Assembler. Back in the day […]

Wakeup Timer on the LPC804

Wakeup Timer on the LPC804

Here is an example of running a timer on the LPC804, originally written in C and then modified to work in C++14 on MCUXpresso 11.1. Here we're using the 1MHz Low Power Oscillator to drive the Wakeup Timer on the LPC804. The same code would work as a C++ project on the LPC802 (OM40000 board) […]

Microcontroller Interrupts and C++

Microcontroller Interrupts and C++

As part of my examination of C++ programming on microcontrollers, I've run into an issue with implementing Interrupt Service Routines on the LPC804 and LPC802 microcontrollers.  These micros are based on the ARM Cortex M0+ core, are small, solderable and suitable for teaching and project development with undergraduate engineering and computer science students.  I'm looking […]

Testing the LPC804 Microcontroller

Testing the LPC804 Microcontroller

Here's a simple program, written for the LPC802 or LPC804 microcontroller, using MCUXpresso 11.0, the ISO C11 compiler and the latest LPC802 (OM40000) or LPC804 (OM400001) SDK from NXP. I started a project using MCUXPresso and the SDK, then erased the contents of the main .c file it produced, replacing it with the following: The […]