Giter Club home page Giter Club logo

spi_accelerometer's Introduction

SPI Accelerometer

This repository contains a Master SPI (Serial Peripheral Interface) entity and an ADXL345 driver entity which work in tandem to configure, calibrate, read, and display accelerometer data.

Background on this repository

Recently I have been interested in IMU's and the history of GNC systems in aerospace which led me to experiment with sensors. I have a DE10-Lite Board that has an Altera MAX10 FPGA and an ADXL345 Accelerometer. The sensor has an I2C and a SPI bus to communiate with, but the FPGA has neither which means I had to pick one to develop a master component for. I chose SPI due to its higher speed and general interest in the protocol. The ADXL345 driver configures and calibrates the sensor after reset. All the code for these two entities were written in VHDL, simulated with test benches, and is synthesizable.

How to use this repository

This project is divided into a SPI Master and ADXL345 driver, where the SPI entity is completely independent of the driver. The two communicate via the top_level entity, which means the SPI Master can be used in any other project. The ADXL345 driver listens for byte signals from the SPI Master which are unique to my implementation. This means that using the driver with other SPI implementations will require modifications.

File List

Files Descriptions
accel_driver Configures sensor functionality, calibrates sensor, reads and writes to sensor on command and external interrupts
clock_div Generates spi clock signal on command for x amount of bytes and raises flag per byte transaction
clock_div_tb Test bench for clock_div.vhd
decoder7seg Converts nibbles to active low 7 segment displays on the board
spi_master Initiate transactions, controls data and cs lines, takes in transmit data, returns receive data
spi_master_tb Test bench for spi_master.vhd
top_level Top level entity used for accel_driver and spi_master to interact as well as external signals to the ADXL345 sensor, switches, and 7 segment display
top_level_tb Test bench for top_level.vhd

spi_accelerometer's People

Contributors

bjohnsonfl avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

rachidbenzhair

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.