Introduction to embedded systems
Subtitle: using ANSI C and the Arduino development environment
By: David J. Russell
Series: Synthesis lectures on digital circuits and systems -- # 30
Publisher: Morgan & Claypool
Published: 2010
Place of publication: San Rafael, Calif. (1537 Fourth Street, San Rafael, CA 94901 USA)
Language: eng
Format: [electronic resource] :
ISBN-13: 9781608454990; 9781608454983
Subjects: Embedded computer systems; Programming
Other titles: Synthesis digital library of engineering and computer science.
Description: Many electrical and computer engineering projects involve some kind of embedded system in which a microcontroller sits at the center as the primary source of control.The recently-developed Arduino development platform includes an inexpensive hardware development board hosting an eight-bit ATMEL ATmega-family processor and a Java-based software-development environment. These features allow an embedded systems beginner the ability to focus their attention on learning how to write embedded software instead of wasting time overcoming the engineering CAD tools learning curve. The goal of this text is to introduce fundamental methods for creating embedded software in general, with a focus on ANSI C. The Arduino development platform provides a great means for accomplishing this task. As such, this work presents embedded software development using 100% ANSI C for the Arduino's ATmega328P processor. We deviate from using the Arduino-specific Wiring libraries in an attempt to provide the most general embedded methods. In this way, the reader will acquire essential knowledge necessary for work on future projects involving other processors. Particular attention is paid to the notorious issue of using C pointers in order to gain direct access to microprocessor registers, which ultimately allow control over all peripheral interfacing.
Notes: Part of: Synthesis digital library of engineering and computer science.

Series from website.

Includes bibliographical references (p. 249) and index.

Abstract freely available; full-text restricted to subscribers or individual document purchasers.

Also available in print.

Mode of access: World Wide Web.

System requirements: Adobe Acrobat Reader.
Table of contents: title: Preface; title: 1. Introduction; title: Background; title: Digital representation of information; title: Digital logic fundamentals; title: Digital vectors; title: Information representation in a digital processor; title: Numbers; title: Text; title: 2. ANSI C; title: Introduction; title: Background; title: Essential elements of the language; title: Formatted output; title: Variables and arithmetic expressions; title: Variable names; title: Type conversions; title: Constants; title: Arithmetic operators; title: Relational and logical operators; title: Increment and decrement operators; title: Bitwise operators; title: Assignment operators; title: Conditional expression; title: Control flow; title: If-else; title: Else-if; title: Switch; title: Loops; title: Infinite loops; title: Miscellaneous (please don't use); title: Functions and program structures; title: Scope rules; title: Pointers and arrays; title: Passing by reference; title: Dynamic memory allocation; title: Multi-dimensional arrays; title: Function pointers; title: Structures; title: Typedef; title: Unions; title: Bit-fields; title: Variable-length argument lists; title: 3. Introduction to Arduino; title: Background; title: Experiments using the Arduino duemilanove development board; title: Arduino tools tutorial; title: 4. Embedded debugging; title: Introduction; title: Debugging the arduino tutorial; title: 5. Atmega328p architecture; title: Overview; title: AVR CPU core; title: 6. General-purpose input/output; title: Output; title: Introduction; title: Basic operation; title: Pin-muxing; title: Input; title: Introduction; title: Internal pull-up resistor; title: Accessing GPIO lines in C; title: Managing outputs; title: Managing inputs; title: Pertinent register descriptions; title: PORTB, The Port B Data Register; title: DDRB, The Port B Data Direction Register; title: PINB, The Port B Input Pins Address; title: PORTC, The Port C Data Register; title: DDRC, The Port C Data Direction Register; title: PINC, The Port C Input Pins Address; title: PORTD, The Port D Data Register; title: DDRD, The Port D Data Direction Register; title: PIND, The Port D Input Pins Address; title: 7. Timer Ports; title: Pulse width modulation; title: Introduction; title: Demodulation; title: Modulation; title: Input Capture; title: Pertinent register descriptions; title: TCCR0A, Timer/Counter0 Control Register A; title: TCCR0B, Timer/Counter0 Control Register B; title: TCNT0, Timer/Counter0 Register; title: OCR0A, Output Compare0 Register A; title: OCR0B, Output Compare0 Register B; title: TCCR1A, Timer/Counter1 Control Register A; title: TCCR1B, Timer/Counter1 Control Register B; title: TCCR1C, Timer/Counter1 Control Register C; title: TCNT1H and TCNT1L, Timer/Counter1 Register; title: OCR1AH and OCR1AL, Output Compare1 Register A; title: OCR1BH and OCR1BL, Output Compare1 Register B; title: ICR1H and ICR1L, Input Capture1 Register; title: TCCR2A, Timer/Counter2 Control Register A; title: TCCR2B, Timer/Counter2 Control Register B; title: TCNT2, Timer/Counter2 Register; title: OCR2A, Output Compare2 Register A; title: OCR2B, Output Compare2 Register B; title: ASSR, Asynchronous Status Register; title: GTCCR, General Timer/Counter Control Register; title: 8. Analog input ports; title: Analog-to-digital converters; title: ADC peripheral; title: Analog comparator; title: Pertinent register descriptions; title: ADMUX, ADC Multiplexer Selection Register; title: ADCSRA, ADC Control and Status Register A; title: ADCH and ADCL, ADC Data Register; title: ADCSRB, ADC Control and Status Register B; title: DIDR0, Digital Input Disable Register; title: ACSR, Analog Comparator Control and Status Register; title: DIDR1, Digital Input Disable Register; title: 9. Interrupt processing; title: Introduction; title: Context; title: ISR and main task communication; title: ATmega328P interrupts in C; title: Pertinent register descriptions; title: EICRA, External Interrupt Control Register A; title: EIMSK, External Interrupt Mask Register; title: EIFR, External Interrupt Flag Register; title: PCICR, Pin Change Interrupt Control Register; title: PCIFR, Pin Change Interrupt Flag Register; title: PCMSK2, Pin Change Mask Register; title: PCMSK1, Pin Change Mask Register; title: PCMSK0, Pin Change Mask Register; title: TIMSK0, Timer/Counter0 Interrupt Mask Register; title: TIFR0, Timer/Counter0 Interrupt Flag Register; title: TIMSK1, Timer/Counter1 Interrupt Mask Register; title: TIFR1, Timer/Counter1 Interrupt Flag Register; title: TIMSK2, Timer/Counter2 Interrupt Mask Register; title: TIFR2, Timer/Counter2 Interrupt Flag Register; title: SPCR, SPI Control Register; title: SPSR, SPI Status Register; title: UCSR0A, USART0 Control and Status Register A; title: UCSR0B, USART0 Control and Status Register B; title: TWCR, TWI Control Register; title: ADCSRA, ADC Control and Status Register A; title: ACSR, Analog Comparator Control and Status Register; title: EECR, EEPROM Control Register; title: 10. Serial communications; title: Introduction; title: Inter-Integrated Circuit; title: Serial Peripheral Interface; title: Universal Asynchronous Receiver/Transmitter; title: USART on ATmega328P; title: Interrupt-based Serial Port Management in C; title: Pertinent Register Descriptions; title: TWBR, TWI Bit Rate Register; title: TWCR, TWI Control Register; title: TWSR, TWI Status Register; title: TWDR, TWI Data Register; title: TWAR, TWI Slave Address Register; title: TWAMR, TWI Slave Address Mask Register; title: SPCR, SPI Control Register; title: SPSR, SPI Status Register; title: SPDR, SPI Data Register; title: UDR0, USART0 I/O Data Register; title: UCSR0A, USART0 Control and Status Register A; title: UCSR0B, USART0 Control and Status Register B; title: UCSR0C, USART0 Control and Status Register C; title: UBRR0H and UBRR0L, USART0 Baud Rate Registers; title: 11. Assembly language; title: Introduction; title: Arduino tool-chain; title: Arduino assembly; title: Arduino inline assembly; title: C-instruction efficiency; title: 12. Non-volatile memory; title: Introduction; title: EEPROM via C on ATmega328P; title: Pertinent register descriptions; title: EEARH, EEPROM High Address Register; title: EEARL, EEPROM Low Address Register; title: EEDR, EEPROM Data Register; title: EECR, EEPROM Control Register; title: A. Arduino 2009 schematic; title: B. ATmega328P registers; title: B.1. Register summary; title: C. ATmega328P assembly instructions; title: C.1. Instruction set summary; title: C.2. Instruction set notation; title: SREG, AVR Status Register; title: General purpose register file; title: Miscellaneous; title: Stack pointer; title: D. Example C/C++ software coding guidelines; title: D.1. Introduction; title: Purpose; title: Philosophy; title: Format; title: D.2. General recommendations; title: D.3. Naming conventions; title: D.4. Layout; title: D.5. Statements; title: Types; title: Variables; title: Loops; title: Conditionals; title: Functions; title: Miscellaneous; title: D.6. Comments; title: D.7. Files; title: Bibliography; title: Author's biography; title: Index.