This post originated from an RSS feed registered with Java Buzz
by Wolf Paulus.
Original Post: Unit Testing Pt.1
Feed Title: Wolf's Web Journal
Feed URL: http://wolfpaulus.com/feed/
Feed Description: Journal - dedicated to excellence, and motivated by enthusiasm to trying new things
Preparing a presentation about the importance of Unit Testing, I was looking for some attention-grabbing opener, and thought
about an experience I had, connecting a digital-toy-camera with a DalSemi 80C400 powered embedded web server.
Software development for embedded systems usually means to write very hardware dependent code and spend lots of time finding out what's going wrong where and why. In most cases, the targeted hardware is optimized for the specific job the device needs to do and doesnÕt offer much beyond that.
However, embedded software development doesn't mean coding in assembly language anymore and for most of the commonly used processors and architectures one can find C and C++ compilers, e.g. at Keil.com
Moreover, there are solutions available that support Java or even execute Java byte code natively, e.g. http://saje.systronix.com/ and http://www.ajile.com/.
Using Java for embedded software development has the advantage that most of the software can be written and tested on a PC or Mac and one doesn't have to care about little endian, big endian, how many bits are used to encode an Integer or Boolean, etc.
Like aforementioned, doing software development for embedded systems sometimes means to spend a lot of time finding out where things went wrong and having a good test strategy that includes the use of Unit Testing is vital.
Back to the Toy-Camera which consists of:
STMicroelectronics VV6301 CMOS Sensor
TEMIC 51 X3702/B (Intel MSC51 compatible) Micro Controller
Winbond 128 Kbytes CMOS SRAM for storing up to 6 images (162x124 pixels)
And two TI 97E1L1M High Speed Counter
This cool little toy is available at ebay for about US$ 10 and is a great way to get your feet wet with embedded development.
Geared up with this information, your favorite Java IDE we can start having some embedded fun.
In case your computer doesnÕt have a serial port, which neither of my Macs had, you need a USB-Serial-Adapter, preferably the a high speed version like the KeySpan USA19HS.
The camera's 2-wire serial interface doesn't provide any handshaking, which requires consistent operation at a specific transfer speed of 57,600 baud.