Page 1 of 52Free preview · 1–5

About this document

Fall 2014 ARM-version teaching slides for ELEC 3040/3050 Embedded Systems Lab, intended for readers with assembly language programming experience. The document introduces C program organization, microcontroller memory, data types, constants, variables, register addressing, bit manipulation, control structures, and functions. Examples use STM32 GPIO registers and include comparisons with HCS12 assembly language.

Free preview text

The first 5 pages, shown as text so search engines and readers can find this document.

Page 1

C programming for embedded microcontroller systems. Assumes experience with assembly language programming. V. P. Nelson Fall 2014 - ARM Version ELEC 3040/3050 Embedded Systems Lab (V. P. Nelson)

Page 2

Outline • Program organization and microcontroller memory • Data types, constants, variables • Microcontroller register/port addresses • Operators: arithmetic, logical, shift • Control structures: if, while, for • Functions • Interrupt routines Fall 2014 - ARM Version ELEC 3040/3050 Embedded Systems Lab (V. P. Nelson)

Page 3

Basic C program structure Fall 2014 - ARM Version ELEC 3040/3050 Embedded Systems Lab (V. P. Nelson) #include "STM32L1xx.h" /* I/O port/register names/addresses for the STM32L1xx microcontrollers */ /* Global variables – accessible by all functions */ int count, bob; //global (static) variables – placed in RAM /* Function definitions*/ int function1(char x) { //parameter x passed to the function, function returns an integer value int i,j; //local (automatic) variables – allocated to stack or registers -- instructions to implement the function } /* Main program */ void main(void) { unsigned char sw1; //local (automatic) variable (stack or registers) int k; //local (automatic) variable (stack or registers) /* Initialization section */ -- instructions to initialize variables, I/O ports, devices, function registers /* Endless loop */ while (1) { //Can also use: for(;;) { -- instructions to be repeated } /* repeat forever */ } Declare local variables Initialize variables/devices Body of the program

Page 4

STM32L100RC μC memory map Fall 2014 - ARM Version ELEC 3040/3050 Embedded Systems Lab (V. P. Nelson) 0xE00F FFFF 0xE000 0000 0x4002 67FF Peripheral registers0x4000 0000 0x2000 0000 0x0803 FFFF 16KB RAM 256KB Flash Memory Cortex registers Control/data registers: Cortex-M3 CPU functions (NVIC, SysTick Timer, etc.) Control/data registers: microcontroller peripherals (timers, ADCs, UARTs, etc.) 256K byte Flash memory: program code & constant data storage Reset & interrupt vectors: in 1st words of flash memory 0x0800 0000 16K byte RAM: variable & stack storage Vacant Vacant Vacant Address 0x2000 3FFF Vacant 0xFFFF FFFF Vacant

Page 5

Microcontroller “header file” • Keil MDK-ARM provides a derivative-specific “header file” for each microcontroller, which defines memory addresses and symbolic labels for CPU and peripheral function register addresses. #include "STM32L1xx.h“ /* target uC information */ // GPIOA configuration/data register addresses are defined in STM32L1xx.h void main(void) { uint16_t PAval; //16-bit unsigned variable GPIOA->MODER &= ~(0x00000003); // Set GPIOA pin PA0 as input PAval = GPIOA->IDR; // Set PAval to 16-bits from GPIOA for(;;) {} /* execute forever */ } Fall 2014 - ARM Version ELEC 3040/3050 Embedded Systems Lab (V. P. Nelson)

Tags

Doxxly editorial guide

C programming for embedded microcontroller systems: summary, contents and background

This guide helps you understand the scope of C programming for embedded microcontroller systems before or alongside reading the original document. It is based on the catalogue record, credited creator, source, classification and topics shown on this page. It does not replace the original work and does not invent claims about passages that Doxxly cannot verify.

Summary and overview

C programming for embedded microcontroller systems is a 52-page documentcredited to Zora Y. Oakfield. Fall 2014 ARM-version teaching slides for ELEC 3040/3050 Embedded Systems Lab, intended for readers with assembly language programming experience. The document introduces C program organization, microcontroller memory, data types, constants, variables, register addressing, bit manipulation, control structures, and functions. Examples use STM32 GPIO registers and include comparisons with HCS12 assembly language. It appears in the Education & Learning collection, which groups it with other material that readers may use for comparison and further study.

The item can be approached in several ways. A reader looking for a quick orientation can begin with the free five-page preview, inspect the page structure and use the metadata to judge relevance. Someone undertaking deeper research can work through the complete file, search its indexed text, record useful page references and compare its treatment of C programming, Embedded systems, Microcontrollers, ARM, STM32, GPIO, Bitwise operations, Control structures, Functions, Teaching slides with the related resources linked below.

Rather than reducing the work to a single claim, this page treats it as a source that should be read in context. The title, creator, publication source, licence and format all help explain what kind of evidence it may offer. Readers should distinguish the original author's statements from Doxxly's catalogue description, and should cite the original edition when using the material in academic, professional or published work.

Key topics and reader takeaways

The catalogue connects this document with C programming, Embedded systems, Microcontrollers, ARM, STM32, GPIO, Bitwise operations, Control structures, Functions, Teaching slides. These terms offer practical entry points rather than a substitute for close reading. Start by identifying the definitions, examples, arguments, tables or visual explanations attached to each topic. Then note where the creator draws connections, makes distinctions or moves from background material to a conclusion, recommendation, calculation or narrative development.

A useful reading method is to separate description from interpretation. First record what the item actually presents: names, headings, figures, formulas, quotations or stated propositions. Next consider why those details matter within the whole work. Finally compare them with another source from the same subject area. This process helps turn a long digital file into evidence that can be evaluated rather than merely skimmed.

Table of contents and reading guide

The following is an editorial content guide based on the verified catalogue topics. It is not represented as the original author's formal table of contents. Use it to organise notes while moving through the 52 pages in the player.

  1. Part 1

    C programming

    Use this section of the reading guide to identify how C programming appears in C programming for embedded microcontroller systems, note important terms, and connect the subject to the wider purpose of the work.

  2. Part 2

    Embedded systems

    Use this section of the reading guide to identify how Embedded systems appears in C programming for embedded microcontroller systems, note important terms, and connect the subject to the wider purpose of the work.

  3. Part 3

    Microcontrollers

    Use this section of the reading guide to identify how Microcontrollers appears in C programming for embedded microcontroller systems, note important terms, and connect the subject to the wider purpose of the work.

  4. Part 4

    ARM

    Use this section of the reading guide to identify how ARM appears in C programming for embedded microcontroller systems, note important terms, and connect the subject to the wider purpose of the work.

  5. Part 5

    STM32

    Use this section of the reading guide to identify how STM32 appears in C programming for embedded microcontroller systems, note important terms, and connect the subject to the wider purpose of the work.

  6. Part 6

    GPIO

    Use this section of the reading guide to identify how GPIO appears in C programming for embedded microcontroller systems, note important terms, and connect the subject to the wider purpose of the work.

  7. Part 7

    Bitwise operations

    Use this section of the reading guide to identify how Bitwise operations appears in C programming for embedded microcontroller systems, note important terms, and connect the subject to the wider purpose of the work.

  8. Part 8

    Control structures

    Use this section of the reading guide to identify how Control structures appears in C programming for embedded microcontroller systems, note important terms, and connect the subject to the wider purpose of the work.

When a heading in the original differs from this guide, follow the original heading in your citation. Page numbers can also vary between editions. Doxxly's direct page field is useful for navigation, but formal references should include the title, creator, source and edition details available in the file itself.

About Zora Y. Oakfield

Doxxly credits Zora Y. Oakfield as the author or creator of C programming for embedded microcontroller systems. This page does not add an unverified biography, job title or institutional affiliation. The attribution is preserved so readers can distinguish the creator from the hosting library and follow the original record when an external author link is available.

Author context matters because a work reflects a particular purpose, audience and point of view. Before relying on the material, consider what the creator set out to explain, when the source was produced and whether later research or revised guidance should also be consulted. For literature and philosophy, compare translations and editions; for technical material, check whether a newer version has superseded the one shown here.

About the source organisation

The recorded source for this item is eng.auburn.edu. Doxxly provides access and discovery tools but does not claim to be the original publisher unless explicitly stated. Source links, creator attribution and the recorded Publicly available file collected for editorial review licence are displayed to help readers assess provenance and permitted use.

Provenance is especially important for reports, standards, presentations and working spreadsheets. Check the original source for amendments, supporting files and current policy. A trustworthy research workflow keeps the source URL with any notes or downloaded copy, verifies important figures against the original, and avoids treating an archived document as automatically current.

Visit eng.auburn.edu

How to read and use this document

Begin with the title and opening pages, then use the guide above to decide whether to read sequentially or move to a particular topic. The Doxxly player provides previous and next navigation, a direct page field, zoom steps, fit-to-width and fit-to-page modes, rotation and fullscreen. These controls are useful when a page contains small type, a wide table, an image, a scanned layout or a dense sequence of notes.

The first five pages are open to every visitor. A plan unlocks the complete item and full-document search. Search is best used for distinctive names, technical terms or short phrases; broad words can produce too many possible contexts. When you find a useful passage, read the surrounding pages so that a sentence, chart or formula is not separated from its explanation.

If downloading is enabled, members can obtain the original PDF file. Keep the original format when formulas, slide sequencing, pagination or layout carries meaning. Respect the Publicly available file collected for editorial review terms displayed on this page, and use the rights-report link if you believe the attribution or availability needs review.

Research questions to consider

As you read C programming for embedded microcontroller systems, ask which audience the creator addresses, what problem or idea organises the work, what evidence is presented, and which assumptions remain unstated. Note whether important terms are defined consistently and whether examples represent a broader pattern or a narrow case. For quantitative material, record units, time periods, formulas and data sources. For interpretive material, separate the creator's language from your own summary.

A second set of questions concerns relevance today. Which parts remain durable, which depend on their historical or institutional setting, and what would need confirmation from a newer source? Following the tags and the Education & Learning collection can reveal useful comparisons. Agreement between sources can strengthen confidence, while disagreement can point to changing definitions, methods, evidence or priorities.

Finally, decide what you need from the item: background knowledge, a quotation, a worked example, a model, a visual explanation or a starting bibliography. That purpose should guide the depth of reading and the notes you keep. Doxxly helps locate and navigate the source; careful interpretation remains the reader's responsibility.

Explore more Education & Learning resources

Frequently asked questions about C programming for embedded microcontroller systems

Practical answers about reading, downloading and understanding this document on Doxxly.

More in Education & Learning