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

c

Ad-hoc unit testing on simAVR and VPL

In the previous post I showed you how to use VPL and simAVR together to write a basic activity that would test to see if a student could change or assign the value of a register in the simulated microcontroller using the C programming language. While it was the most straight-forward way that I could […]

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

Installing SIMAVR on Mac OS X

The SIMAVR package is for simulating AVR processors like the ATMEGA328 on the Arduino UNO. I'm looking to try to use it with VPL in courses like our computer architecture class, EECS 2021, as a way of simulating the UNO's processor in exercises involving assembler and C programming. On a Mac, we use HomeBrew. The […]

The EECS 2021 Lab Kit: Grove Board + Snap Programmer

EECS 2021 Lab Kit The EECS 2021 lab requires you to have both (1) the Grove board with an ATMEGA328P chip on it (you got it as a part of the EECS 1011/21 lab kit last year), as well as (2) a Snap programmer. The Grove kit (officially called the "Grove Beginner Kit for Arduino") […]

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

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

[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

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

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

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