11.07.2015 Views

Imagecraft c compiler and development environment for the atmel avr

Imagecraft c compiler and development environment for the atmel avr

Imagecraft c compiler and development environment for the atmel avr

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

EMBEDDED PROGRAMMINGEmbedded Programming BasicsWith some exceptions, a basic MCU control program consists of <strong>the</strong> following pieces: Some low-level functions that interface with <strong>the</strong> hardware, e.g., reading <strong>and</strong>writing <strong>the</strong> IO registers. IO register <strong>and</strong> o<strong>the</strong>r system initialization code. A set of interrupt h<strong>and</strong>lers to h<strong>and</strong>le real-world data, e.g., sensor input, timerfiring, etc. A set of “high-level” processing functions, e.g., what to do with <strong>the</strong> ga<strong>the</strong>red data. A control function. This can be a main routine that loops through all <strong>the</strong> high levelfunctions, or may be a task switcher or an RTOS that invokes <strong>the</strong> functions asneeded.This document does not explain embedded programming in full, as <strong>the</strong>re are manyexcellent resources <strong>and</strong> books on <strong>the</strong> subjects. Never<strong>the</strong>less, here are some topicsthat you may find useful.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!