Monday, October 24, 2011

Cortex-M3 Exception Vector Checksum

The 7th entry of the Cortex-M3 exception vector is reserved for the 2's complement of the checksum of the exception vector. At run time the bootloader computes the checksum again and adds it to the one stored in the exception vector, if the result equals zero it starts executing the user code. The checksum is usually computed by the software that flashes the binary like FashMagic or openocd, if you're using openocd like me,...
Read more ...

Tuesday, July 12, 2011

Delay Slots

Delay slots are an artifact of some early pipelined architectures in which  pipeline hazards were not handled explicitly. I was puzzled for while by some unexpected assembly produced by gcc while working on my  own implementation of the MIPS ISA,  further investigation yielded the following results about the branch delay and the load delay slots, both of them occurred in early MIPS architectures. Load Delay...
Read more ...

Saturday, April 30, 2011

Pimp My Hexbug!

What is a Hexbug you ask ? Well, a Hexbug is a line of micro robotic creatures! Sounds fancy doesn't it ? actually it's quite boring, if you ask me, for example, mine just walks around until it hits something and then it turns around and that's basically just about it! That's why I've decided to reuse the mechanical parts and boost the bug a bit.  So I designed a small wireless board to control my Hexbug. This is the modified...
Read more ...

MCP9800 Temperature Sensor

A while ago I picked up a few temperature sensors from DigiKey, it's been in my junk box for sometime now, so I decided it's about time to do something with it! Features The MCP9800 is a high accuracy digital temperature sensor from Microchip, the sensor has an  I2C interface, a configurable 9-bit to 12-bit temperature resolution, shutdown mode, one-shot mode (one conversion while in shutdown) and finally an interrupt...
Read more ...

Wednesday, March 30, 2011

TCM8230MD Breakout

TCM8230MD The TCM8230MD is a tiny camera from Toshiba theoretically capable of outputting 640x480@30FPS! This post is to document my experience with this devilish cam.  Breakout This is my second breakout board for the camera, this one is designed to be connected as a module to another board and doesn't use a crystal oscillator for the clock, I'm using one of the PWM channels instead. However, the older breakout is still...
Read more ...

Tuesday, March 29, 2011

Binary Counters

Binary counters can be used for a variety of things from time keeping to generating/measuring frequencies. Today, we will talk about the concepts behind binary counters using an atmega328 for practice. Logic! Let's start with a simple 4-bit counter based on JK flip-flops. A JK flip-flop has the following truth table: J K Qt+1 State 0 0 Qt No change 0 1 0 Clear 1 0 1 Set 1 1 Qt` Complement Where Qt is the current...
Read more ...

Saturday, January 1, 2011

Introduction to ARM Cortex-M3 Part 2-Programming

Welcome to the second part of the Introduction to ARM Cortex-M3, in part 1 we went through the core features of the Cortex-M3 and the LPC1768. In this part we will focus more on programming the LPC1768 by covering the following points: Toolchain overview Library Tweaks Hardware Interfaces Software Stacks we have a lot to cover so let's get started... Toolchain overview The toolchain of choice is the CodeSourcery toolchain,...
Read more ...