Let's Get Physical (Pdf)
Total Page:16
File Type:pdf, Size:1020Kb
Physical computing Physical computing various buses, Ethernet and USB. Development Why should free software be chained to keyboard, mouse and screen? In the fi rst of a boards with stuff like fl ash and 2.6.10 on board Standing between are readily available, with core CPUs such as compelling and practical two-parter Martin Howse examines open tools which allow for PowerPC abounding, but most GNU/Linux DIY SoC work takes place within the burgeoning embedding computation deep within the environment. hardware and software FPGA scene under the hardcore LGPLed LEON2 design of European Space Agency fame. FPGAs, and between software with the conceptual emphasis on programming in the fi eld very much to the fore, are a tough call to explain satisfactorily without some degree and coder, interface of low level knowledge of logic, processors and the like. FPGAs represent reconfi gurable computing at is a ripe area for the hardware level with vast arrays of gates reprogrammable through well defi ned interface further investigation with a conventional PC by way of a high level language such as VHDL or Verilog. VHDL, which stands for VHSIC Hardware Description Language, where VHSIC is yet another acronym CHEW ON THIS Though coaxing GNU/Linux, through tweaking hardware and porting code, to run on a rapidly growing range of small devices is defi nitely a possibility for physical computing - and poses its own rewards - what we’re more concerned with here is freeing ourselves from the further tethers of an OS which can penetrate tentacle-like downwards Let’s Get into hardware. Indeed, with OS defi ned primarily as both reliable and standard interface and manager of resources, in our world of open, environmentally embedded hardware it’s a tough call to decide exactly what needs managing and how to go about this awesome task. That said, it’s perfectly feasible, given some awareness of how a full-blown OS may condition our device, to run with uClinux, a port to small and MMU (Memory Management Unit) defi cient systems. Early test prototype shows three ap0201 modules connected including main computational board, charging circuitry and The advantages here include ease of porting for already coded apps microphone pre-amp or those that lend themselves to a high level language, and hassle- free hardware support if you’re looking to interface to a full-blown for Very High Speed Integrated Circuit, is Von Neumann style architecture, or to other machines by way of high favoured in Europe, and such described code is level protocols or, say, a wireless interface. It’s an approach with a then synthesised and uploaded to the FPGA Physical good deal of overhead both power-wise and conceptually but it rather than being used to fabricate costly silicon. works for a good many more conventional projects. On the hardware With the correct software in place, a decent side, and of course well supported by the GNU/Linux toolchain, sized FPGA could function as well defi ned DSP comprising GNU binutils, compiler set (GCC) and debugger, and one moment, offering up a bank of fi lters, or pushing forward the uCsimm approach of a good few years back, the SoC after another upload. It’s most defi nitely soft Gumstix Basix platform is very much de rigueur in such embedding hardware and several scientists have thrown hysical computing is all about freedom Gate Array) led designs. And though embedding is commonly circles. As the name would suggest Gumstix are the size of a stick of genetic algorithms (GA) into the mix to grow Pfrom a highly restrictive desktop bound used to refer to any specialised system which is embedded within gum, lightweight and offer comparatively low power consumption circuits which exhibit extraordinary properties. modus operandi in favour of new ways an often hidden purpose built device, for example an internal stats. Performance under the Intel XScale is good, and a 2.6.10 kernel To demonstrate the sheer versatility of FPGAs, of approaching code and computation. missile guidance system, it’s possible to extend the defi nition to boots from fl ash to interface to optional Bluetooth, CF or RS232. hobbyists have even succeeded in fi tting the Whether it’s about examining imaginative talk about embedding in a wider sense and to use such systems, Gumstix are perfect for a wearables project which needs to interface innards of a range of old-school arcade games, modes of input and output, conditioning fresh perhaps within an artistic context, to refer to notions of to a PDA or wireless enabled desktop. Indeed, the author fi rst including Pacman, into a single and CPU-sized responses in the user, investigating wearable environmental computing under which factors other than tightly encountered them in use within this context at the Piet Zwart Xilinx Virtex chip. In the case of our friend processing or, at an other extreme, embedding bound I/O enter the computational equation. Institute in Rotterdam, where media students were constructing an LEON2, which is commonly implemented on the sensor rich machines in extreme environments, Embedded systems are all about embedding; laying down within audio narrative weaving jacket based on the platform. popular, but now discontinued Xess XSV-800 getting physical is tightly bound with a free a wider context which involves the physical. And within these development board based around a Virtex FPGA, software model. terms, the notion of an interface is well untied from casual modes SOC IT TO ME GNU/Linux has been ported to run on the Within a domain which stresses black boxing of thought. Indeed, standing between hardware and software and Development under a familiar OS and GNU toolchain is one way to SPARC-based core, with further SoC components of software by the device in question, using between software and user or coder, interface is a ripe area for go for projects which adhere to more conventional conceptual thrown in by an active community of hackers. free software in this environment is essentially further investigation - especially under the exposure of the overlap architectures, or which can leverage additional memory and code to FPGAs are a tricky matter, with key all about visibility; devices which are otherwise of both hard and soft enacted by reconfi gurable computing. add virtual machine layers, but physical computing afi cionados have documentation, particularly with reference to totally opaque in relation to underlying tech Although, as we’ll see, we can readily interface microcontrollers a good many more radical choices in reserve, which play well to low cost development on a GNU/Linux platform, become open and hackable, schematics are and the like to a range of sensors, ranging from basic ADCs and varying degrees with a GNU development platform. Next down the hard to fi nd. Issues ensnared with physical exposed to further development, interfaces are DACs for audio capture and response, through to less apparent hierarchy in terms of complexity and overhead we fi nd the SoC, or computing are well exposed by these complex laid wide open and even processor designs can analogue data collectors such as accelerometers and magnetic fi eld System-on-Chip, processors which are very much in favour currently devices which will receive full illumination in the be readily implemented without encumbrances sensors, physical computing is more about running wild with a at the industrial end of the spectrum. next instalment. under extreme FPGA (Field Programmable close knit of code and interface. As the name implies, it’s all on board; CPU, RAM controllers, SoC processors, whilst usually employed in A modular design helps in debugging embedded devices with both hardware and software tested in easy stages in easy tested and software hardware with both in debugging embedded devices helps A modular design 30 LinuxUser & Developer LinuxUser & Developer 31 Physical computing embedded devices which need to interface to regular I/O including large banks of RAM, run close in complexity terms to good old microcontrollers which make up the mainstay of free range physical computing. They’re tough little fellows which can take a lot of maltreatment and suffer well under extreme environments, making them an ideal resource for rough and ready DIY work. It’s important to differentiate microprocessors, or CPUs, from their larger microcontroller brothers which pack in processor (simply without the micro), memory, and often some degree of I/O within a small enough IC (Integrated Circuit). Such I/O can include serial communications support by way of a UART, multiple ADCs to play well with the analogue world, PWM which can enable motor and minimal audio, protocols such as I2C and the like and even USB support. The amount of additional circuitry required varies according to chip and required functionality, but it is possible to run Self-suffi cient Other manufacturers in the fi eld include Texas Instruments and Dallas with a microcontroller-based system simply with ap0201 devices pack Semiconductor, who do seem to be drawing some applause for their the addition of a suitable power supply. in PIC16F877 low-powered MAXQ line. microcontroller, 32 Though it’s equally possible to develop for a range of micros on a TAKE YOUR PIC KB NVRAM and free software platform, we’ve chosen to concentrate development on There are plenty of options out there on the suffi cient solar a few PICs, which offer well documented resources and are upheld by micro front, with the two major players boiling charging circuitry to a strong DIY subculture which shares a vast range of application down to Microchip, pushing the funky PIC keep them running documentation. PICs as concept and as acronym date back to the late range, and Atmel, with the rather more sober for a good few hours 70s, when the phrase Peripheral Interface Controller was bandied but equally Harvard architecture based AVRs.