Turn-key PCB assembly services in prototype quantities or low-volume to mid-volume production runs

Digital dual axis SCA100T inclinometer project

Inclinometers are used to measure angles of inclination of an object. Angles are measured in reference to gravity. In this project angle is measured by using dual axis SCA100T MEMS sensor.

inclinometer.JPG

 

Digital inclinometer is far more precise than manual with bubble in liquid. Author didn’t provide full working code, but he gives SCA100T inclinometer library to use in new design. As SCA100T connects to microcontroller via SPI interface there shouldn’t be a problem at all. Library files are here.

[..Source link..]

Bookmark the permalink.

3 Comments

  1. Pingback: Electronics-Lab.com Blog » Blog Archive » Digital dual axis SCA100T inclinometer project

  2. Great Job 🙂 How Can you Read axis data with AVR?
    It has just 8Bit Register.
    but This Sensor Send 11Bit data.

    Well… I have to do study more.

  3. Hi,

    you did a good job !
    I’m trying to connect with my LPC936 via SPI.

    But it doesn’t run…
    Maybe you can help me.

    Programing Language is C# , here is my code , maybe you know a solution …

    The comments are in german, if you need them in English, let me know

    thank you

    #include

    void main()
    {
    unsigned char temp ;
    P2M1 = 0x3C; // Freigabe der SPI-Ports (MISO, MOSI, SPICLK, _SS)
    P2M2 = 0x3C;

    P2 = 0xFF;
    SPCTL = 0xD6; // Freigabe des SPI-Blocks, MSTR = 1, SSIG = 1)

    while(1)
    {
    SS = 0; // SPI Slave-Signal aktivieren

    SPDAT = 0x08; // Command für das Register für Temperatur -> RWTR
    while((SPSTAT & 0x80) == 0x00); // Warten bis Wert gesendet
    SPSTAT=0xFF; // Bestätigen eines Senden oder Empfangen > SPIF zuruecksetzen

    //SPSTAT=0x00; notwendig ???

    SPDAT=0xAA; //Dummy Wert
    while((SPSTAT & 0x80) == 0x00); // Warten bis Wert gesendet

    temp=SPDAT; // Wert ablegen in temp
    while((SPSTAT & 0x80) == 0x00); // Warten bis Wert gesendet

    SPSTAT = 0xFF; // SPIF zuruecksetzen

    SS=1; // SPI Slave-Signal deaktivieren

    }

    }

Comments are closed