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

c

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 […]

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, […]

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 […]

At Home Electronics Lab Kits for Engineering

At Home Electronics Lab Kits for Engineering

this is a work in progress... nothing is finalized and no decision made at this point.  Just doing a market survey for now... many people need to be consulted and this will have to be a joint decision... We'll use an internal (to York) Teams page to flesh out the details. Key characteristics Price. (low […]

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) […]

C++ and the LPC802: type casting

C++ and the LPC802: type casting

It appears that the C++ compilers in MCUXpresso don't like the C-style type casting that are found in some macros used by the SDK for the LPC802. One of our students, Richard, discovered that a change needs to be done to a pair of macros that reside inside of fsl_clock.h in order for C++ to […]

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 […]

C++ on Microcontrollers, Babysteps

C++ on Microcontrollers, Babysteps

Having watched some of Kate Gregory's tutorials on Pluralsight, I decided to start trying some aspects of C++ on very small microcontrollers.  They're physically small (only about 2cm across) and also small in terms of memory (2kB - 4kB of RAM; 16kB - 32kB of Flash). Two problems were immediately encountered: nothing with the iostream […]