Embedded Systems Building and Programming Embedded Devices

Total Page:16

File Type:pdf, Size:1020Kb

Embedded Systems Building and Programming Embedded Devices Embedded Systems Building and Programming Embedded Devices PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Mon, 28 Oct 2013 18:37:03 UTC Contents Articles Wikibooks:Collections Preface 1 Embedded Systems/Embedded Systems Introduction 3 Embedded Systems/Terminology 7 Microprocessor Basics 10 Embedded Systems/Microprocessor Introduction 10 Embedded Systems/Embedded System Basics 11 Embedded Systems/Microprocessor Architectures 13 Embedded Systems/Programmable Controllers 16 Embedded Systems/Floating Point Unit 18 Embedded Systems/Parity 20 Embedded Systems/Memory 21 Embedded Systems/Memory Units 24 Programming Embedded Systems 25 Embedded Systems/C Programming 25 Embedded Systems/Assembly Language 31 Embedded Systems/Mixed C and Assembly Programming 34 Embedded Systems/IO Programming 42 Embedded Systems/Serial and Parallel IO 43 Embedded Systems/Super Loop Architecture 44 Embedded Systems/Protected Mode and Real Mode 46 Embedded Systems/Bootloaders and Bootsectors 47 Embedded Systems/Terminate and Stay Resident 48 Real Time Operating Systems 49 Embedded Systems/Real-Time Operating Systems 49 Embedded Systems/Threading and Synchronization 51 Embedded Systems/Interrupts 57 Embedded Systems/RTOS Implementation 59 Embedded Systems/Locks and Critical Sections 62 Embedded Systems/Common RTOS 65 Embedded Systems/Common RTOS/Palm OS 67 Embedded Systems/Common RTOS/Windows CE 68 Embedded Systems/Common RTOS/DOS 69 Embedded Systems/Linux 70 Interfacing 73 Embedded Systems/Interfacing Basics 73 Embedded Systems/External ICs 74 Embedded Systems/Low-Voltage Circuits 74 Embedded Systems/High-Voltage Circuits 76 Particular Microprocessor Families 78 Embedded Systems/Particular Microprocessors 78 Embedded Systems/Intel Microprocessors 81 Embedded Systems/PIC Microcontroller 82 Embedded Systems/8051 Microcontroller 88 Embedded Systems/Freescale Microcontrollers 92 Embedded Systems/Atmel AVR 93 Embedded Systems/ARM Microprocessors 111 Embedded Systems/AT91SAM7S64 114 Embedded Systems/Cypress PSoC Microcontroller 115 Appendices 121 Embedded Systems/Common Protocols 121 Embedded Systems/Where To Buy 123 Resources and Licensing 124 Embedded Systems/Resources 124 Embedded Systems/Licensing 126 References Article Sources and Contributors 127 Image Sources, Licenses and Contributors 129 Article Licenses License 130 Wikibooks:Collections Preface 1 Wikibooks:Collections Preface This book was created by volunteers at Wikibooks (http:/ / en. wikibooks. org). What is Wikibooks? Started in 2003 as an offshoot of the popular Wikipedia project, Wikibooks is a free, collaborative wiki website dedicated to creating high-quality textbooks and other educational books for students around the world. In addition to English, Wikibooks is available in over 130 languages, a complete listing of which can be found at http:/ / www. wikibooks. org. Wikibooks is a "wiki", which means anybody can edit the content there at any time. If you find an error or omission in this book, you can log on to Wikibooks to make corrections and additions as necessary. All of your changes go live on the website immediately, so your effort can be enjoyed and utilized by other readers and editors without delay. Books at Wikibooks are written by volunteers, and can be accessed and printed for free from the website. Wikibooks is operated entirely by donations, and a certain portion of proceeds from sales is returned to the Wikimedia Foundation to help keep Wikibooks running smoothly. Because of the low overhead, we are able to produce and sell books for much cheaper then proprietary textbook publishers can. This book can be edited by anybody at any time, including you. We don't make you wait two years to get a new edition, and we don't stop selling old versions when a new one comes out. Note that Wikibooks is not a publisher of books, and is not responsible for the contributions of its volunteer editors. PediaPress.com is a print-on-demand publisher that is also not responsible for the content that it prints. Please see our disclaimer for more information: http:/ / en. wikibooks. org/ wiki/ Wikibooks:General_disclaimer . What is this book? This book was generated by the volunteers at Wikibooks, a team of people from around the world with varying backgrounds. The people who wrote this book may not be experts in the field. Some may not even have a passing familiarity with it. The result of this is that some information in this book may be incorrect, out of place, or misleading. For this reason, you should never rely on a community-edited Wikibook when dealing in matters of medical, legal, financial, or other importance. Please see our disclaimer for more details on this. Despite the warning of the last paragraph, however, books at Wikibooks are continuously edited and improved. If errors are found they can be corrected immediately. If you find a problem in one of our books, we ask that you be bold in fixing it. You don't need anybody's permission to help or to make our books better. Wikibooks runs off the assumption that many eyes can find many errors, and many able hands can fix them. Over time, with enough community involvement, the books at Wikibooks will become very high-quality indeed. You are invited to participate at Wikibooks to help make our books better. As you find problems in your book don't just complain about them: Log on and fix them! This is a kind of proactive and interactive reading experience that you probably aren't familiar with yet, so log on to http:/ / en. wikibooks. org and take a look around at all the possibilities. We promise that we won't bite! Wikibooks:Collections Preface 2 Who are the authors? The volunteers at Wikibooks come from around the world and have a wide range of educational and professional backgrounds. They come to Wikibooks for different reasons, and perform different tasks. Some Wikibookians are prolific authors, some are perceptive editors, some fancy illustrators, others diligent organizers. Some Wikibookians find and remove spam, vandalism, and other nonsense as it appears. Most wikibookians perform a combination of these jobs. It's difficult to say who are the authors for any particular book, because so many hands have touched it and so many changes have been made over time. It's not unheard of for a book to have been edited thousands of times by hundreds of authors and editors. You could be one of them too, if you're interested in helping out. Wikibooks in Class Books at Wikibooks are free, and with the proper editing and preparation they can be used as cost-effective textbooks in the classroom or for independent learners. In addition to using a Wikibook as a traditional read-only learning aide, it can also become an interactive class project. Several classes have come to Wikibooks to write new books and improve old books as part of their normal course work. In some cases, the books written by students one year are used to teach students in the same class next year. Books written can also be used in classes around the world by students who might not be able to afford traditional textbooks. Happy Reading! We at Wikibooks have put a lot of effort into these books, and we hope that you enjoy reading and learning from them. We want you to keep in mind that what you are holding is not a finished product but instead a work in progress. These books are never "finished" in the traditional sense, but they are ever-changing and evolving to meet the needs of readers and learners everywhere. Despite this constant change, we feel our books can be reliable and high-quality learning tools at a great price, and we hope you agree. Never hesitate to stop in at Wikibooks and make some edits of your own. We hope to see you there one day. Happy reading! Embedded Systems/Embedded Systems Introduction 3 Embedded Systems/Embedded Systems Introduction Embedded Technology is now in its prime and the wealth of knowledge available is mindblowing. However, most embedded systems engineers have a common complaint. There are no comprehensive resources available over the internet which deal with the various design and implementation issues of this technology. Intellectual property regulations of many corporations are partly to blame for this and also the tendency to keep technical know-how within a restricted group of researchers. Before embarking on the rest of this book, it is important first to cover exactly what embedded systems are, and how they are used. This wikibook will attempt to cover a large number of topics, some of which apply only to embedded systems, but some of which will apply to nearly all computers (embedded or otherwise). As such, there is a chance that some of the material from this book will overlap with material from other wikibooks that are focused on topics such as low-level computing, assembly language, computer architecture, etc. But we will first start with the basics, and attempt to answer some questions before the book actually begins. What is an Embedded Computer? The first question that needs to be asked, is "What exactly is an embedded computer?" To be fair, however, it is much easier to answer the question of what an embedded computer is not, than to try and describe all the many things that an embedded computer can be. An embedded computer is frequently a computer that is implemented for a particular purpose. In contrast, an average PC computer usually serves a number of purposes: checking email, surfing the internet, listening to music, word processing, etc... However, embedded systems usually only have a single task, or a very small number of related tasks that they are programmed to perform. Every home has several examples of embedded computers. Any appliance that has a digital clock, for instance, has a small embedded microcontroller that performs no other task than to display the clock.
Recommended publications
  • Embedded Systems Building and Programming Embedded Devices
    Embedded Systems Building and Programming Embedded Devices PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Tue, 29 May 2012 01:04:04 UTC Contents Articles Wikibooks:Collections Preface 1 Embedded Systems/Embedded Systems Introduction 3 Embedded Systems/Terminology 7 Microprocessor Basics 10 Embedded Systems/Microprocessor Introduction 10 Embedded Systems/Embedded System Basics 11 Embedded Systems/Microprocessor Architectures 13 Embedded Systems/Programmable Controllers 16 Embedded Systems/Floating Point Unit 18 Embedded Systems/Parity 20 Embedded Systems/Memory 21 Embedded Systems/Memory Units 24 Programming Embedded Systems 25 Embedded Systems/C Programming 25 Embedded Systems/Assembly Language 31 Embedded Systems/Mixed C and Assembly Programming 34 Embedded Systems/IO Programming 42 Embedded Systems/Serial and Parallel IO 43 Embedded Systems/Super Loop Architecture 44 Embedded Systems/Protected Mode and Real Mode 46 Embedded Systems/Bootloaders and Bootsectors 47 Embedded Systems/Terminate and Stay Resident 48 Real Time Operating Systems 49 Embedded Systems/Real-Time Operating Systems 49 Embedded Systems/Threading and Synchronization 51 Embedded Systems/Interrupts 54 Embedded Systems/RTOS Implementation 55 Embedded Systems/Locks and Critical Sections 57 Embedded Systems/Common RTOS 60 Embedded Systems/Common RTOS/Palm OS 63 Embedded Systems/Common RTOS/Windows CE 64 Embedded Systems/Common RTOS/DOS 64 Embedded Systems/Linux 65 Interfacing 68 Embedded Systems/Interfacing
    [Show full text]
  • Comparative Programming Languages CM20253
    We have briefly covered many aspects of language design And there are many more factors we could talk about in making choices of language The End There are many languages out there, both general purpose and specialist And there are many more factors we could talk about in making choices of language The End There are many languages out there, both general purpose and specialist We have briefly covered many aspects of language design The End There are many languages out there, both general purpose and specialist We have briefly covered many aspects of language design And there are many more factors we could talk about in making choices of language Often a single project can use several languages, each suited to its part of the project And then the interopability of languages becomes important For example, can you easily join together code written in Java and C? The End Or languages And then the interopability of languages becomes important For example, can you easily join together code written in Java and C? The End Or languages Often a single project can use several languages, each suited to its part of the project For example, can you easily join together code written in Java and C? The End Or languages Often a single project can use several languages, each suited to its part of the project And then the interopability of languages becomes important The End Or languages Often a single project can use several languages, each suited to its part of the project And then the interopability of languages becomes important For example, can you easily
    [Show full text]
  • CH Galf Int Basic Doc.Indd
    GALFO SYTEMS INTEGER BASIC COMPILER FOR THE APPLE II MICROCOMPUTER INSTRUCTION MANUAL COPYRIGHT 1981, GALFO SYSTEMS Converted to PDF format starting with an original documentation floppy disk. Ref- erence was also made to an original hard copy document. Both provided by Chris Galfo. Document was formatted in a style consistent with the original documents. Right to reproduce and distribute was granted by Chris Galfo. 2015, Mike Willegal GALFO SYSTEMS´ Integer BASIC compiler (IBC) greatly enhances the computing power of the Apple II microcomputer since it is a true compiler for Apple´s interpreted language. This allows the user to take advantage of the fast execution speed offered by a compiled language, yet maintain the advantage of interactive program development and testing available only in an interpreted language. IBC extends the scope of Integer BASIC by removing many programming restrictions found in Apple´s version of the language. For example, the restriction of string length to 255 characters and the limitation of what characters can be stored in a string have been removed. The IBC system offers the advanced programmer a host of new features which make Integer BASIC a truely fine development tool for the Apple II. IBC translates the source program into either of two forms of object code: pure GSL code or mixed 6502 and GSL code, the latter being generated to optimize execution speed. GSL is a computer code specially designed for the 6502 microprocessor and Integer BASIC. It is highly efficient and offers much higher execution speed on a 6502 processor than other coding schemes, such as Pascal´s P-code.
    [Show full text]
  • Functional and Concurrent Programming
    Functional and Concurrent Programming Simon Thompson [email protected] CO545 Lecture 1 CO545: functional and concurrent programming CO545: functional and concurrent programming Lectures 22 lectures: introduction, functional programming, concurrent programming, going further CO545: functional and concurrent programming Lectures Classes 22 lectures: introduction, 11 two-hour functional programming, terminal sessions: concurrent programming, from this week going further CO545: functional and concurrent programming Lectures Classes 22 lectures: introduction, 11 two-hour functional programming, terminal sessions: concurrent programming, from this week going further Resources Moodle for slides, lecture recordings, programs, class and seminar resources CO545: functional and concurrent programming Lectures Classes 22 lectures: introduction, 11 two-hour functional programming, terminal sessions: concurrent programming, from this week going further Resources Lecturers Moodle for Simon Thompson slides, lecture recordings, [email protected] programs, class and Dominic Orchard seminar resources [email protected] What will I learn? What will I learn? Functional ideas Values, names, evaluation, structured types, lists, higher-order functions, recursion, PBT. What will I learn? Functional ideas Concurrent ideas Values, names, evaluation, Processes and messages, structured types, lists, process ids and spawn, higher-order functions, asynchrony and mailboxes, recursion, PBT. fail-safe and exits, … What will I learn? Functional ideas Concurrent ideas Values, names, evaluation, Processes and messages, structured types, lists, process ids and spawn, higher-order functions, asynchrony and mailboxes, recursion, PBT. fail-safe and exits, … Put it into practice Using these ideas in practice in the Erlang programming language. What will I learn? Functional ideas Concurrent ideas Values, names, evaluation, Processes and messages, structured types, lists, process ids and spawn, higher-order functions, asynchrony and mailboxes, recursion, PBT.
    [Show full text]
  • Giant List of Programming Languages
    Giant List of Programming Languages This list is almost like a history lesson, some of the languages below are over half a century old. It is by no means exhaustive, but there are just so many of them. A large chunk of these languages are no longer active or supported. We added links to the official site where possible, otherwise linked to a knowledgable source or manual. If there is a better link for any of them, please let us know or check out this larger list. 1. 51-FORTH https://codelani.com/languages/51forth 2. 1C:Enterprise Script https://1c-dn.com/1c_enterprise/1c_enterprise_script 3. 4DOS https://www.4dos.info 4. A+ http://www.aplusdev.org 5. A++ https://www.aplusplus.net 6. A? (Axiom) http://axiom-developer.org 7. A-0 System No live site 8. ABCL/c+ No live site 9. ABAP https://www.sap.com/community/topics/abap 10. ABC https://homepages.cwi.nl/~steven/abc 11. ABC ALGOL No live site 12. ABSET http://hopl.info/showlanguage.prx?exp=356 13. Absys No live site 14. ACC No live site 15. Accent No live site 16. Accent R http://nissoftware.net/accentr_home 17. ACL2 http://www.cs.utexas.edu/users/moore/acl2 18. ActionScript https://www.adobe.com/devnet/actionscript 19. ActiveVFP https://archive.codeplex.com/?p=activevfp 20. Actor No live site 21. Ada https://www.adaic.org 22. Adenine http://www.ifcx.org/attach/Adenine 23. ADMB http://www.admb-project.org 24. Adobe ColdFusion https://www.adobe.com/products/coldfusion-family 25.
    [Show full text]
  • List of Programming Languages
    List of programming languages The aim of this list of programming languages is to 1 A include all notable programming languages in existence, both those in current use and historical ones, in alpha- • A# .NET betical order, except for dialects of BASIC, esoteric pro- gramming languages, and markup languages. • A# (Axiom) Contents : • A-0 System • A+ • A • A++ • B • ABAP • C • ABC • D • ABC ALGOL • E • • F ABSET • • G ABSYS • H • ACC • I • Accent • J • Ace DASL • K • ACL2 • L • Avicsoft • M • ACT-III • N • Action! • O • ActionScript • P • Ada • Q • Adenine • R • Agda • S • • T Agilent VEE • • U Agora • V • apple • W • AIMMS • X • Alef • Y • ALF • Z • ALGOL 58 • See also • ALGOL 60 1 2 3 C • ALGOL 68 2 B • ALGOL W • B • • Alice Babbage • Bash • Alma-0 • BASIC • AmbientTalk • bc • Amiga E • BCPL • AMOS • BeanShell • Batch (Windows/Dos) • AMPL • Bertrand • AngularJS • BETA • Apex (Salesforce.com) • Bistro • APL • BitC • BLISS • App Inventor for Android’s visual block language • Blockly • AppleScript • BlooP • Arc • Boo • ARexx • Boomerang • • Argus Bourne shell (including bash and ksh) • BREW • AspectJ • BPEL • Assembly language • Business Basic • ATS • Ateji PX 3 C • AutoHotkey • C • C-- • Autocoder • C++ – ISO/IEC 14882 • AutoIt • C# – ISO/IEC 23270 • AutoLISP / Visual LISP • C/AL • Averest • Caché ObjectScript • C Shell • AWK • Caml • Axum • Cayenne • Active Server Pages • CDuce • ASP.NET • Cecil 3 • Cesil • COMIT • Céu • Common Intermediate Language (CIL) • Ceylon • Common Lisp (also known as CL) • CFEngine • COMPASS • CFML • Component
    [Show full text]
  • Embedded Systems Building and Programming Embedded Devices
    Embedded Systems Building and Programming Embedded Devices PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Wed, 05 Oct 2011 11:42:21 UTC Contents Articles Wikibooks:Collections Preface 1 Embedded Systems/Embedded Systems Introduction 2 Embedded Systems/Terminology 6 Microprocessor Basics 9 Embedded Systems/Microprocessor Introduction 9 Embedded Systems/Embedded System Basics 10 Embedded Systems/Microprocessor Architectures 12 Embedded Systems/Programmable Controllers 15 Embedded Systems/Floating Point Unit 17 Embedded Systems/Parity 19 Embedded Systems/Memory 20 Embedded Systems/Memory Units 23 Programming Embedded Systems 24 Embedded Systems/C Programming 24 Embedded Systems/Assembly Language 30 Embedded Systems/Mixed C and Assembly Programming 32 Embedded Systems/IO Programming 40 Embedded Systems/Serial and Parallel IO 41 Embedded Systems/Super Loop Architecture 42 Embedded Systems/Protected Mode and Real Mode 44 Embedded Systems/Bootloaders and Bootsectors 45 Embedded Systems/Terminate and Stay Resident 46 Real Time Operating Systems 47 Embedded Systems/Real-Time Operating Systems 47 Embedded Systems/Threading and Synchronization 49 Embedded Systems/Interrupts 52 Embedded Systems/RTOS Implementation 53 Embedded Systems/Locks and Critical Sections 55 Embedded Systems/Common RTOS 58 Embedded Systems/Common RTOS/Palm OS 60 Embedded Systems/Common RTOS/Windows CE 61 Embedded Systems/Common RTOS/DOS 61 Embedded Systems/Linux 62 Interfacing 65 Embedded Systems/Interfacing
    [Show full text]
  • Charles Goon Resume (Feb 12, 2019)
    www.charlesgoon.com [email protected] (917) 692–3229 work experience 2018– Ziff Davis/What To Expect Product Manager . Video Producer, Streaming Producer, Dreamtek, Remote Producer, Digital Producer – New York, NY charles Present Google Develop vision and product for #1 pregnancy brand with 60% market share. Lead development Video Producer of apps (iOS/Android), content-recommendation engine, affiliate commerce (Amazon), email newsletters, and LeadGen marketing. Lead new initiative targeting +30% growth of video engagement to meet advertiser demands. +50% video views YoY; +20% open rate and +17% g oon email CTR after overhaul of content-reco engine, +33% revenue YoY Amazon affiliate Name: Charles Goon commerce. New York, NY New York City Manhattan, NY Innovative, data driven product and brand manager who exceeds revenue goals and delivers industry leading products. Recent Experience: Product Manager at Houghton Mifflin Harcourt . 2017– Nickelodeon Product Manager Senior Product Manager . Video Producer, Streaming Producer, Dreamtek, Remote Producer, Digital Producer – New York, NY additional experience 2018 . TV, Television, Media, Music, Film, Movies, Network TV, Nickelodeon, Video Production, Retail Google Lead development of Nick/NickJr. TVE (TV Everywhere) iOS apps. YoY: +10% MAUs, +13% video Video Producer views; +25% TV-authentication with new TVE onboarding prompt based on A/B test results. 2005–2011 Define UX, roadmaps and features; lead Agile Scrum team. Defined new features for Episode BBC Blue Peter (in London, UK) Increase Initiative (+1,000 eps.) to engage, retain and grow audience and increase ad NBC America’s Got Talent revenue—resulting in +16% video streams. CBS Survivor ABC One Life to Live .
    [Show full text]
  • T. WAYNE WALL [email protected]
    T. WAYNE WALL [email protected] Over 40 years’ experience designing and implementing innovative software/hardware solutions to challenging computing problems for academia and industry. Skilled in the art of advanced software design and implementation techniques and with a track record of producing quality solutions on time and under budget. Substantial electronics and hardware knowledge not found in the typical software engineer. Broad scientific background with emphasis in mathematics, physics and the earth sciences, as well as economics and operations research/management science. Adjunct teaching experience in both conventional and online settings. Can communicate effectively in both technical and non-technical environments. EXPERIENCE 2018 - PRESENT LECTURER OF COMPUTER SCIENCE, COLORADO MESA UNIVERSITY Am teaching these courses: • Computers in Our Society (6 credits) – 2 online sections, 3 credits each • Introduction to Engineering Computer Science (4 credits) • Computer Architecture/Assembly Language (4 credits) 2017 - PRESENT INSTRUCTOR, WORKFORCE INNOVATION PROGRAM Teach courses in microcontrollers, CNC milling machines, 3D printing, laser cutting/engraving 2017 PROGRAMMING MENTOR/INSTRUCTOR, HI FIVES ROBOTICS TEAM Mentor for F.I.R.S.T. Robotics Team 4944, consisting of high school students from the entire Grand Valley. 2016 STUDY.COM, LESSON WRITER, COMPUTER PROGRAMMING Contract position, working remotely, writing 500 to 1000 word lessons on topics as assigned. 2016 CONCORD CAREER COLLEGES, INSTRUCTOR, TOPICS IN CONTEMPORARY MATH Online instructor using Canvas and WebAssign courseware. Provided special guidance to at-risk students. Interacted with administrators concerning improvement of teaching methodologies. 1990-2015 GOLDEN SOFTWARE, SENIOR SOFTWARE DEVELOPER/SYSTEMS ANALYST • Designed and implemented complex graphical software products from inception to market. • Worked both independently and in collaboration to produce high quality real-world scientific graphing and mapping applications.
    [Show full text]
  • The Story Behind Apex/XPL0 and the 6502 Group
    12/8/2019 The Story Behind Apex/XPL0 and the 6502 Group Return to 6502 Group Home Page The Story Behind Apex/XPL0 and the 6502 Group by Larry Fish It all started with the release of a brand new microprocessor. In 1974, a group of former Motorola engineers formed a new company called MOS Technology. Later that year, they released a microprocessor called the 6501. It was pin-compatible with the 6800, and this feature soon had MOS Technology in court facing a lawsuit from Motorola. With a few pin changes, all was forgiven, and in the spring of 1975 MOS Technology released the 6502. In spite of its inauspicious beginnings, the processor had several advantages. It had a fast, pipelined architecture; and it was one of the few processors with indirect and indexed addressing modes. But most of all, it was cheap. Where an Intel or Motorola chip might set you back as much $500, the sweet little 6502 was only $25. In 1975, Denver was a hotbed of computer activities. There was a new computer club called the Denver Amateur Computer Society (DACS), and every meeting was packed with radio amateurs and hobbyists anxious to learn about this exciting new technology. DACS was dominated by Intel 8080 based computers, but there were a few people interested in the 6502. Wayne Wall was one of the first to appreciate the power and speed of the 6502, and he decided to form a subgroup of DACS for 6502 users. Wayne was a genius assembly language and systems programmer who worked at the Colorado School of Mines.
    [Show full text]