Tuesday, 4 December 2012

SD Data logger schematic

Ok on the hardware side of the data logger, i leave the schematic for the version using a 4050 to do the level  translation to 3.3 V used by the sd. u might noticed i have the 5 V instead of the 3.3 as analog ref, so change code accordingly ( or use 3.3 if u prefer, though the 5 V is better for the moisture sensor
Below ill also leave the cheaper version with resistors as voltage dividers.

Saturday, 1 December 2012

Endianess ( Both the Big and the Little) : or "How they done my head for hours "...

This almost drove me to insanity, so here it is ( As a curiosity I still would like to know if the new DUE is Big Endianess or not, but ill have to wait till i get mine)
Usually, the C-Compiler has to care about it, but if you have to take over e.g a serial line, you have to know it.

Atmel AVR Endianess Cheat Sheet:

Example Value: 0x0A0B

All 8-bt AVRs: Little Endian in Memory 0x0B 0x0A (*adr: 0x0B, *(adr+1): 0x0A)

AVR32: Big Endian in Memory 0x0A 0x0B
Arduino DUE : ?!?!

Here are some images from Wikipedia to illustrate the memory layout of the different schemes, with the example 32-bit value 0x0A0B0C0D