The 87LPC76X Microcontroller combines in a small package thebenefits of a high-performance microcontroller with on-boardhardware supporting the Inter-Integrated Circuit (I2C) bus interface.The 87LPC76X can be programmed both as an I2C bus master, aslave, or both. An overview of the I2C bus and description of the bussupport hardware in the 87LPC76X microcontrollers appears inapplication note AN464, Using the 87LPC76X Microcontroller as anI2C Bus Master. That application note includes a programmingexample, demonstrating a bus-master code. Here we show anexample of programming the microcontroller as an I2C slave.The code listing demonstrates communications routines for the87LPC76X as a slave on the I2C bus. It compliments the program inAN464 which demonstrates the 87LPC76X as an I2C bus master.One may demonstrate two 87LPC76X devices communicating witheach other on the I2C bus, using the AN464 code in one, and theprogram presented here in the other. The examples presented hereand in AN464 allow the 87LPC76X to be either a master or a slave,but not both. Switching between master and slave roles in amultimaster environment is described in application note AN435.The software for a slave on the bus is relatively simple, as theprocessor plays a relatively passive role. It does not initiate bustransfers on its own, but responds to a master initiating thecommunications. This is true whether the slave receives or transmitsdata—transmission takes place only as a response to a busmaster’s request. The slave does not have to worry about arbitrationor about devices which do not acknowledge their address. As theslave is not supposed to take control of the bus, we do not demandit to resolve bus Exceptions or “hangups”. If the bus becomesinactive the processor simply withdraws, not interfering with themaster (or masters) on the bus which should (hopefully) try toresolve the situation.
Overview In this chapter I introduce Borland C++Builder (BCB) and explain what it is about. I also devote considerable time to explaining the purpose of this book and the philosophy behind my approach to technical writing. Technical subjects covered in this chapter include Creating a simple Multimedia RAD program that plays movies, WAV files, and MIDI files. Shutting down the BCB RAD programming tools and writing raw Windows API code instead. Creating components dynamically on the heap at runtime. Setting up event handlers (closures) dynamically at runtime. A brief introduction to using Exceptions. This topic is covered in more depth in Chapter 5, "Exceptions." A brief introduction to ANSI strings. This subject is covered in more depth in Chapter 3, "C++Builder and the VCL." Using the online help. Greping through the include and source files that come with the product and with this book.
JILRuntime A general purpose, register based virtual machine (VM) that supports object-oriented features, reference counting (auto destruction of data as soon as it is no longer used, no garbage collection), Exceptions (handled in C/C++ or virtual machine code) and other debugging features. Objects and functions can be written in virtual machine code, as well as in C or C++, or any other language that can interface to C object code. The VM is written for maximum performance and thus is probably not suitable for embedded systems where a small memory footprint is required. Possible uses of the VM are in game development, scientific research, or to provide a stand-alone, general purpose programming environment.
Standard-Library Exception Safety
Bjarne Stroustrup
Texas A&M University
(and AT&T Labs – Research)
http://www.research.att.com/~bs
Introduction to the C++ exception handling mechanisms and “resource acquisition is initialization” for people with little experience with Exceptions
Core Java 2 Volume I - Fundamentals, Seventh Edition
Completely revised and up-to-date coverage of
Generic programming, restrictions and limitations, type bounds, wilcard types, and generic reflection
Swing GUI development, including input validation and other enhancements
Exception handling and debugging, including chained Exceptions, stack frames, assertions, and logging
Streams and files, the new I/O API, memory-mapped files, file locking, and character set encoders/decoders
Regular expressions using the powerful java.util.regex package
Inner classes, reflection, and dynamic proxies
Application packaging and the Preferences API
This book shows how to design and implement C++ software that is more effective: more likely to behave correctly more robust in the face of Exceptions more efficient more portable makes better use of language features adapts to change more gracefully works better in a mixed-language environment is easier to use correctly is harder to use incorrectly. In short, software that s just better.