banner

Sunday, March 7, 2021

ARM CORTEX M0+ Interfacing part

 

**************************************************************************

 ARM Cortex M0 +

 **************************************************************************

########################################################
Embedded C - Interfacing

########################################################

Part 1- Basic Interfacing codes

**************************************************************************

LED blinking

**************************************************************************

 * Steps to realize basic embedded C code to blink green LED with some finite delay.

Without header file MKL25Z4.h 

# How to simulate the basic LED blinking embedded C code on FRDM KL25Z freedom board

With header file MKL25Z4.h

# Write Embedded C code to blink green LED with MKL25Z4.h library on KL25Z FRDM board.

 

Part-2

# Write the embedded C code to blink all three green, red and blue the LEDs on the FRDM-KL25Z4 after 500ms.

**************************************************************************

Switch and LED

**************************************************************************

* Steps to realize the interfacing of switch and LED with KL25Z FRDM board.

# Write the simple switch and LED interfacing code in Embedded C on KL25Z FRDM board.

 **************************************************************************

Linear search

 **************************************************************************

 * Write embedded C code for FRDMKL25Z to perform linear search of the number 25 from list of 10 elements size 32-bit. If search result true then lit green LED else red LED for 100ms.

 **************************************************************************

Simple calculator

 **************************************************************************

 * Write Embedded C code for FRDMKL25Z to interface four switches to perform the operation mentioned in below table and store the results to the locations.

SW1

SW2

SW3

SW4

Operation

Result stored on location

OFF

OFF

OFF

OFF

No operation

-

ON

OFF

OFF

OFF

Addition

0x1FFFF100 – 0x1FFFF103

OFF

ON

OFF

OFF

Subtraction

0x1FFFF104 – 0x1FFFF107

OFF

OFF

ON

OFF

Multiplication

0x1FFFF108 – 0x1FFFF10F

OFF

OFF

OFF

ON

Division

0x1FFFF110 – 0x1FFFF113

 **************************************************************************

Even and odd numbers
**************************************************************************

* Write embedded C code for FRDMKL25Z to bifurcate the even and odd numbers from given 16 elements list each having size of 8-bit. Store even numbers to the location starting from 0x1FFFF100 to 0x1FFFF10F and odd numbers to the location starting from 0x1FFFF110 to 0x1FFFF11F.

 **************************************************************************

PULP RISC-V important links

1) Understanding and working with PULP - all the details of the architectures https://pulp-platform.org/docs/riscv_workshop_zurich/schiavone...