03.08.2013 Views

S.N.A.K.E.: A Dynamically Reconfigurable Artificial Sensate Skin ...

S.N.A.K.E.: A Dynamically Reconfigurable Artificial Sensate Skin ...

S.N.A.K.E.: A Dynamically Reconfigurable Artificial Sensate Skin ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

flag 0x80 indicates a successful write to flash.<br />

As previously noted, the Bootloader will wait indefinitely for an instruction, but it could<br />

be easily changed to start execution of a program after a determined amount of time. Once<br />

execution starts though, the bootloader can’t be invoked again unless a reset is generated<br />

(hardware or software initiated) or the application code explicitly includes a mean to invoke<br />

it. This can be easily accomplished by generating either a Watchdog timer timeout or an<br />

invalid write to its counter register.<br />

4.1.2 Sampling Code<br />

The second large firmware component is the application code that deals with sensor sam-<br />

pling. This is probably, the principal software component, given that it is mainly where<br />

the<strong>Dynamically</strong> <strong>Reconfigurable</strong> feature of the <strong>Skin</strong> Patches lies 4 . As the reader may recall,<br />

one of the main goals of the project is to demonstrate that the amount of required band-<br />

width and other resources can be minimized if each node is given processing power. By<br />

doing this, the need to route pixelated data to a centralized processing unit is practically<br />

eliminated.<br />

Although this code could be used if the <strong>Skin</strong> Patches are used as data extraction devices, it<br />

is mainly intended for the case when the <strong>Skin</strong> Patches are being used as stand-alone devices.<br />

Its main purpose is to set the rate at which the sensors are sampled, process the generated<br />

data, calculate higher order features and possibly transfer these to a PC through a Brain if<br />

further processing is needed. Concurrent sampling and processing is possible because the<br />

sampling and timing of the application is carried out by the microcontroller peripherals, so<br />

the processor core is left free to process the generated data. This is shown in Figure 4-3.<br />

Lets now describe what the microcontroller does after starting up. After a reset, the ap-<br />

plication configures the clocking unit to run at 8.000 Mhz, initializes the I 2 C module as a<br />

slave device and designates an ADC memory channel for each one of the sensor modes 5 .<br />

4 The other one being its ability to be reprogrammed<br />

5 The MSP430 ADC module is equipped with 10 sampling channels each one of them with a 16-bit<br />

conversion result register<br />

86

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!