Maker Pro
Maker Pro

making my atmega168 talk to an accelerometer and pressure sensor


Sep 27, 2009
Sep 27, 2009
Hi all, new here, first post, and I apologize if this is in the wrong place. Let me jump right in:

I'm working on a dive computer that uses a depth sensor, accelerometer, micro and (eventually) an LCD or OLED screen. I've just started this and I'm trying to get my parts talking to eachother. The schematic I have is attached and here are links to the ADXL345, ATMega168, and MS5541C (well, it won't let me post links because I'm new, so i'm cheating):
MS5541C: SLASH products/documentation/datasheets/doc/43/raw/
ADXL345: SLASH static/imported-files/data_sheets/ADXL345.pdf
ATMega168: SLASH dyn/resources/prod_documents/doc2545.pdf

What I'm going for is reading every second or half-second from the depth sensor and doing some number crunching. Whenever the ADXL345 puts out either its single tap or double tap interrupts, the micro needs to get data from it about which direction the taps were in, then do some more number crunching.

First of all, is this even remotely right, hardware-wise? This is the first embedded design i've built from scratch and I'm really not sure if I have the connections set up properly.

Second, is the 168 gonna be able to run this AND drive an OLED screen or should I be looking for a beefier processor?

Third, I'm not really sure what to do with the crystals. The depth sensor runs at 32kHz, but the micro much faster. Should the XTAL 1,2 pins (Q1 in my schematic) be the 32kHz crystal? The ATMega will put that out on the XCK pin, right?

Any general feedback? Thanks in advance :D


  • circuit.png
    20.8 KB · Views: 1,224
Last edited: