Single-board microcontroller: Difference between revisions

Content deleted Content added
Added Raspberry Pi reference
Chi Loka (talk | contribs)
No edit summary
 
(35 intermediate revisions by 29 users not shown)
Line 1:
{{Short description|Microcontroller built onto a single printed circuit board}}
{{RefimproveMore citations needed|date=June 2011}}
{{Use dmy dates|date=JuneMay 20112020}}
[[Image:Mck glamor 320.jpg|thumb|right|The [[Make Controller Kit]] with an Atmel AT91SAM7X256 ([[ARM architecture|ARM]]) microcontroller.]]
A '''single-board microcontroller''' is a [[microcontroller]] built onto a single [[printed circuit board]]. This board provides all of the circuitry necessary for a useful control task: a [[microprocessor]], [[input/output|I/O circuits]], a [[clock generator]], [[RAM]], stored program memory and any necessary support [[integrated circuit|IC]]s. necessary. The intention is that the board is immediately useful to an application developer, without themrequiring needingthem to spend time and effort into developing thedevelop controller hardware.
 
As they are usually low-cost hardware, and have an especially low capital cost for development, single-board microcontrollers have long been popular in education. They are also a popular means for developers to gain hands-on experience with a new [[processor family]].
 
== Origins ==
Single-board microcontrollers appeared in the late 1970s, when the first generationsappearance of early microprocessors, such as the [[MOS Technology 6502|6502]] and the [[Zilog Z80|Z80]],<ref name="ETI, Marvin" >{{Cite journal
|journal=[[Electronics Today International]]
|title='Marvin' - Z80 Control Computer
|author=Peter Grigson
|author2=David Harris
|date=August, September, OctoberAugust–October 1983
}}</ref> made it practical to build an entire controller on a single board, andas well as affordable to dedicate a computer to a relatively minor task.
 
In March 1976, [[Intel]] announced a single-board computer product that integrated all of the support components required for their [[8080]] microprocessor, along with 1 kbyte[[kilobyte]] of RAM, 4 kbyteskilobytes of user-programmable ROM, and 48 lines of parallel digital I/O with line drivers. The board also offered expansion through a bus connector, but it could be used without an expansion card cage wherewhen applications didn'tdid not require additional hardware. Software development for this system was hosted on Intel's [[Intellec MDS]] microcomputer development system; this provided assembler and [[PL/M]] support, and permitted [[in-circuit emulation]] for debugging.<ref>[http://www.dvq.com/docs/brochures/intel_sbc_80_10.pdf Intel SBC 80/10 Single Board Computer brochure], 1976</ref>
 
Processors of this era required a number of support chips into additionbe included outside of the processor. [[RAM]] and [[EPROM]] were separate, often requiring memory management or refresh circuitry for [[Dynamic random -access memory|dynamic memory]] as well. I/O processing might behave been carried out by a single chip such as the [[Intel 8255|8255]], but frequently required several more chips.
 
A single-board microcontroller differs from a [[single-board computer]] in that it lacks the general -purpose user interface and mass storage interfaces that a more general-purpose computer would have. Compared to a [[microprocessor development board]], a microcontroller board would emphasize digital and analog control interconnections to some controlled system, wherewhereas a development board might by comparison have only a few or no discrete or analog input/output devices. The development board exists to showcase or to train on some particular processor family and, thistherefore, internal implementation is more important than the external function.
 
== Internal bus ==
The [[bus (computing)|bus]] of the early single-board devices, such as the [[Z80]] and [[6502]], was universally a [[Von Neumann architecture]]. Program and data memory were accessed byvia the same shared bus, even though they were stored in fundamentally different types of memory: [[Read-only memory|ROM]] for programs and [[RAM]] for data. This bus architecture was needed to economise on the number of pins needed from the limited 40 available for the processor's ubiquitous dual-in-line IC package.
 
It was common to offer access to the internal bus through an expansion connector, or at least theprovide space for such a connector to be soldered on. This was a low-cost option and offered the potential for expansion, even if it was rarely made use ofused. Typical expansions would be I/O devices, or additional memory expansion. It was unusual to add peripheral devices such as tape or disk storage, or even a CRT display
 
WhenLater, when [[#Single-chip microcontrollers|single-chip microcontroller]]s, such as the [[8048]], became available later on, the bus no longer needed to be exposed outside the package, as all the necessary memory could be provided within the chip package. This generation of processors used a [[Harvard architecture]] ofwith separate program and data buses, both internal to the chip. Many of these processors used a [[modified Harvard architecture]], where some write access was possible to the program data space, thus permitting in-circuit programming. None of these processors required, or supported, a Harvard bus across a single-board microcontroller. WhereWhen they supported a bus for expansion of peripherals, this used a dedicated I/O bus, such as [[I2C|I<sup>2</sup>²C]], One[[1-wireWire]] or various [[serial busesbus]]es, was used.
 
== External bus expansion ==
Some microcontroller boards using a general-purpose microprocessor can bring the address and data bus of the processor to an expansion connector, allowing additional memory or peripherals to be added. This would provideprovides resources not already present on the single board system. Since not allevery systemssystem will require expansion, the connector may be an optionoptional, with a mounting position provided for the connector for installation by the user if desired.
 
== Input and output ==
[[Image:Arduino Diecimila.jpg|thumb|right|[[Arduino]] Diecimila with Atmel ATMEGA168]]
Microcontroller systems provide multiple forms of input and output signals to allow application software to control an external "real-world" system. Discrete digital I/O provides a single bit of data (on, or off). Analog signals, representing a continuouslycontinuous variable range, such as temperature or pressure, can also be inputs and outputs for microcontrollers.
 
Discrete digital inputs and outputs might only be buffered from the microprocessor data bus only by an addressable latch, or might be operated by a specialized input/output integrated circuitIC, such as an [[Intel 8255]] or Motorola 6821 [[Peripheral Interface Adapter|parallel input/output adapter]]. Later single-chip micrcontrollersmicrocontrollers have input and output pins available. TheThese input/output circuits usually do not provide enough current to directly operate such devices aslike lamps or motors, so solid-state relays are operated by the microcontroller digital outputs, and inputs are isolated by [[signal conditioning]] level-shifting and protection circuits.
One or more analog inputs, with an analog multiplexer and common [[analog -to -digital converter]], are found on some microcontroller boards. Analog outputs may use a digital-to-analog converter, or, on some microcontrollers, may be controlled by [[pulse-width modulation]]. As forFor discrete inputs, external circuits may be required to scale inputs, or to provide such functions aslike [[Wheatstone bridge|bridge]] excitation or [[cold junction compensation]].
 
To control component costs, many boards were designed with extra hardware interface circuits but without the components for these circuits weren't installed, andleaving the board was left bare. The circuit was only added as an option on delivery, or could be populated later.
 
It is common practice for boards to include "prototyping areas", areas of the board already laid out as a solderable breadboard area with the bus and power rails available, but without a defined circuit. Several controllers, particularly those intended for training, also include a pluggable, re-usable [[breadboard]] for easy prototyping of extra I/O circuits that could be changed or removed for later projects.
 
==Communications and user interfaces==
Communications interfaces vary depending on the age of the microcontroller system. Early systems might implement a [[serial port]] to provide [[RS-232]] or [[current loop]]. The serial port could be used by the application program, or could be used, in conjunction with a monitor ROM, to transfer programs into the microcontroller memory. Current microcontrollers may support [[USB]], wireless networknetworks ([[Wi-Fi]], [[ZigBeeZigbee]], or others) ports, or provide an Ethernet connection. In addition, andthey may support a [[TCP/IP]] protocol stack. Some devices have firmware available to implement a Web server, allowing an application developer to rapidly build a Web-enabled instrument or system.
 
== Programming ==
Many of the earliestearly systems had no internal facilityfacilities for programming at all, and relied on a separate "host" system for this task. This programming was typically done in [[assembly language]], or sometimes in [[C (programming language)|C]] or even [[PL/M]], and then cross-assembled or [[cross-compiler|cross-compiled]] on the host. Some single-board microcontrollers support a BASIC language system, allowing programs to be developed on the target hardware. Hosted development allows all the storage and peripherals of a desktop computer to be used, providing a more powerful development environment.
 
=== EPROM burning ===
 
Early microcontrollers relied on [[EPROM|erasable programmable read-only memory]] (EPROM) devices to hold the application program. The completed [[object code]] from a host system would be "burned" onto an [[EPROM]] with an [[EPROM programmer]],.<ref name="ETI, EPROM Programmer" >{{Cite journal
|journal=[[Electronics Today International]]
|title=Universal EPROM Programmer
|author=Mike Bedford
|date=August, SeptemberAugust–September 1983
|pages=45–51, 37–39
}}</ref> thisThis EPROM was then physically plugged into the board. As the EPROM would be removed and replaced many times during program development, it was usualcommon to provide a [[Zero Insertion Force|ZIF]] socket to avoid wear or damage. Erasing an EPROM with a [[ultraviolet|UV]] eraser takes a considerable time, and so it was also usualcommon for a developer to have several EPROMs in circulation at any one time.
 
Some microcontroller devices were available with on-board EPROM;. these, too,These would also be programmed in a separate burner, then put into a socket on the target system.
 
The use of EPROM sockets allowed field updateupdates ofto the application program, either to fix errors or to provide updated features.
 
=== Keypad monitors ===
 
[[File:MOS KIM-1 IMG 4211 cropped scale.jpg|thumb|right|A single-board computer with a hex keypad and 7-segment display]]
WhereWhen the single-board controller formed the entire development environment (typically in education), the board might also be providedhave withincluded a simple [[hexadecimal]] keypad, calculator-style LED display, and a "monitor" program set permanently in ROM. This monitor allowed [[machine code]] programs to be entered directly through the keyboard and held in RAM. These programs were in machine code, not even in assembly language, and were often assembled by hand on paper firstbefore being inputted. It's is arguable as to which process was more time-consuming and error prone: assembling by hand, or keying byte-by-byte.
 
Single-board "keypad and calculator display" microcontrollers of this type were very similar to some low-end microcomputers of the time, such as the [[KIM-1]] or the [[Microprofessor I]].<ref name="KIM 1">{{cite web |title=KIM 1 |url=http://www.old-computers.com/museum/computer.asp?c=149 |archive-url=https://web.archive.org/web/20210618184839/http://www.old-computers.com/museum/computer.asp?c=149 |archive-date=2021-06-18 |website=old-computers.com |publisher=Old Computers}}</ref> Some of these microprocessor "trainer" systems are still in production today, used as very low-cost introductions to microprocessors at the hardware programming level.<ref name="Microprofessor">{{cite web
|publisher = Flite Electronics International
|title=KIM 1
|title = Microprofessor Training System
|url=http://www.old-computers.com/museum/computer.asp?c=149
|url = http://flite.co.uk/microprofessor-mpf-1b-z80-training-system.htm
|publisher=[http://www.old-computers.com Old Computers.com]
|url-status = dead
}}</ref> Some of these microprocessor "trainer" systems are still in production today, as a very low-cost introduction to microprocessors at the hardware programming level.<ref name="Microprofessor" >{{cite web
|archiveurl = https://web.archive.org/web/20080509183609/http://www.flite.co.uk/microprofessor-mpf-1b-z80-training-system.htm
|publisher=Flite Electronics International
|archivedate = 9 May 2008}}</ref>
|title=Microprofessor Training System
|url=http://flite.co.uk/microprofessor-mpf-1b-z80-training-system.htm
}}</ref>
 
=== Hosted development ===
 
When desktop personal computers appeared, initially [[CP/M]] or [[Apple II]], then later the [[IBM PC]] and compatibles, there was a shift to hosted development. Hardware was now cheaper and RAM capacity had expanded such that it was possible to download the program through the serial port and hold it in RAM. This massive reduction in the cycle time to test a new version of a program gave an equally large boost in development speed.
 
This program memory was still [[volatile memory|volatile]] and would be lost if power was turned offlost. [[Flash memory]] was not yet available at a viable price. As a completed controller project was usually required to be non-volatile, the final step in a project was often to burn it to an EPROM again.
 
== Single-chip microcontrollers ==
[[Image:KL Intel D8749.jpg|right|thumb|A [[Intel 8048|8048]]-family microcontroller with an on-board UV [[EPROM]], the [[8749]] ]]
[[Image:Pickit1 devboard.jpg|thumb|right|A development board for a [[PIC microcontroller|PIC]] family device ]]
Single-chip microcontrollers, such as the Intel [[Intel 8048|8748]], combined many of the features of the previous boards into a single IC package. Single-chip microcontrollers integrate memory (both RAM and ROM) on-package and, sotherefore, do not need to expose the data and address [[Bus (computing)|bus]] through the pins of the IC package's pins. These pins are then available for I/O lines. These changes also reduce the area required on athe printed circuit board and simplify the design of athe single-board microcontroller. Examples of single-chip microcontrollers include:
* Intel [[Intel 8048|8748]]
* [[PIC microcontroller|PIC]]
* [[Atmel AVR]]
 
=== Program memory ===
For production use as [[embedded system]]s, the on-board [[Read-only memory|ROM]] would bewas either [[Programmable read-only memory|mask programmed]] at the chip factory or one-time programmed (OTP) by the developer as a [[Programmable read-only memory|PROM]]. PROMs often used the same UV EPROM technology for the chip, but in a cheaper package without the transparent erasure window. During program development, it was still necessary to burn EPROMs,. In this timecase, the entire controller IC, and sotherefore the [[Zero insertion force|ZIF]] sockets, would be provided.
 
With the development of affordable [[EEPROM]] and eventually [[flash memory]], it became practical to attach the controller permanently to the board and to download program code tofrom ita host computer through a serial connection to a host computer. This was termed "[[in-circuit programming]]". Erasure of old programs was carried out by either over-writing them with a new download, or bulk erasing them electrically (for [[EEPROM]]). The latter whichmethod was slower, but could be carried out in-situ.
 
The main function of the controller board was nowthen to carry the support circuits for this serial interfaceor, oron later boards, [[USB]] on later boardsinterface. As a further convenience feature during development, many boards also carriedhad low-cost features like LED monitors of the I/O lines or reset switches mounted on board.
 
== Single-board microcontrollers today ==
[[Image:DwengoBoard.jpg|thumb|right|[[Dwengo]] board]]
MicrocontrollersIt areis now cheap and simple to design circuit boards for microcontrollers. Development host systems are also cheap, especially when using [[Open-source software|open source]] software. Higher level programming languages [[Abstraction (computer science)|abstract]] details of the hardware, making differences between specific processors less obvious to the application programmer. Rewritable flash memory has replaced slow programming cycles, at least during program development. Accordingly, almost all development now is based on cross-compilation from personal computers and downloadprograms are downloaded to the controller board through a serial-like interface, usually appearing to the host as a USB device.
 
The original market demand offor a simplified board implementation is no longer soas relevant tofor microcontrollers. Single-board microcontrollers are still important, but have shifted their focus to:
 
* Easily accessible platforms aimed at traditionally "non-programmer" groups, such as artists, designers, hobbyists, and others interested in creating interactive objects or environments.<ref>[http://www.arduino.cc/ Arduino's home page]</ref> Some typical projects in 2011 included;: the backup control of DMX stage lights and special effects, multi-camera control, autonomous fighting robots, controlling bluetooth projects from a computer or smart phone,<ref name="Dwengo" /> LEDs and multiplexing, displays, audio, motors, mechanics, and power control.<ref>Arduino [http://arduino.cc/forum/ User's forum]</ref> These controllers may be embedded to form part of a [[physical computing]] project. Popular choices for this work are the [[Arduino]],<ref name="Arduino, Project homepage">{{cite web |title=Project homepage |url=http://www.arduino.cc/ |access-date=2024-09-05 |website=arduino.cc |publisher=Arduino project}}</ref> [[Dwengo]]<ref name="Dwengo">{{cite web |title=Project homepage |url=http://www.dwengo.org/ |access-date=2024-09-05 |website=dwengo.org |publisher=Dwengo}}</ref><ref>
Timothy L. Warner.
|title=Project homepage
[https://books.google.com/books?id=3TUkAQAAQBAJ "Hacking Raspberry Pi"].
|url=http://www.arduino.cc/
2013.
|publisher=[http://www.arduino.cc/ Arduino project]
p. 12.
}}</ref> [[Dwengo]]<ref name="Dwengo" >{{cite web
}}</ref> or [[Wiring (development platform)|Wiring]].<ref>Wiring.org's Wiring development platform [http://wiring.org.co/ home page]</ref><ref name="Wiring" >{{cite web |title=Wiring hardware. Overview |url=http://wiring.org.co/hardware/index.html |access-date=2024-09-05 |website=wiring.org.co |publisher=Wiring project}}</ref>
|title=Project homepage
* Technology demonstratordemonstration boards for innovative processors or peripheral features:
|url=http://www.dwengo.org/
|publisher=[http://www.dwengo.org/ Dwengo]
}}</ref> or [[Wiring (development platform)|Wiring]].<ref>Wiring.org's Wiring development platform [http://wiring.org.co/ home page]</ref><ref name="Wiring" >{{cite web
|title=Wiring: Hardware
|url=http://wiring.org.co/hardware/index.html
|publisher=[http://wiring.org.co/about.html Wiring project]
}}</ref>
* Technology demonstrator boards for innovative processors or peripheral features:
** [[AVR Butterfly]]
** [[Parallax Propeller]]
 
<!--
== Programming single-board microcontrollers ==
Line 138 ⟶ 130:
== See also ==
{{Portal|Electronics}}
* [[SingleComparison of single-board computermicrocontrollers]]
* [[Microprocessor development board]]
* [[Embedded system]]
* [[Programmable Logiclogic Controller|PLCcontroller]]
* [[Arduino]]
* [[Make Controller Kit#Make Controller Kit|Make Controller Kit]]
Line 147 ⟶ 139:
* [[BASIC Stamp]]
* [[Raspberry Pi]]
* [[Asus Tinker Board]]
* [[Tinkerforge]]
 
== References ==
{{Reflist|30em}}
 
{{Use dmy dates|date=June 2011}}
 
==External links==
* [http://www.robotplatform.com/howto/dev_board/atmega8_dev_board_1.html Atmega8 Development board] - DIY AVR development board based on Atmel's AVR microcontroller
 
{{Microcontrollers}}