This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
resources:tools-software:uc-drivers:renesas:adxl345 [24 Feb 2012 08:56] – Added the "Reference Project Overview" sections. Dragos Bogdan | resources:tools-software:uc-drivers:renesas:adxl345 [24 Jan 2021 17:22] (current) – Fix bad links Dragos Bogdan | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== ADXL345 - Microcontroller | + | ====== ADXL345 - No-OS Driver |
+ | {{page>: | ||
- | ===== Supported Devices ===== | + | **HW Platform(s): |
- | * [[adi> | + | * [[https:// |
+ | * [[https:// | ||
- | ===== Overview | + | ===== Downloads |
- | The [[adi>ADXL345]] is a small, thin, low power, 3-axis accelerometer with high resolution (13-bit) measurement at up to ±16 g. Digital output data is formatted as 16-bit twos complement and is accessible through either a SPI (3- or 4-wire) or I2C digital interface. The [[adi>ADXL345]] is well suited for mobile device applications. It measures the static acceleration of gravity in tilt-sensing appli-cations, as well as dynamic acceleration resulting from motion or shock. Its high resolution (4 mg/LSB) enables measurement of inclination changes less than 1.0°. | + | <WRAP round download 80%> |
+ | * {{: | ||
+ | * {{: | ||
+ | * **ADXL345 Driver: | ||
+ | * **PmodACL Demo for RL78G14: ** https:// | ||
+ | * **RL78G14 Common Drivers: | ||
+ | </ | ||
- | The goal of this project (Microcontroller No-OS) is to be able to provide reference projects for lower end processors, which can' | + | ====== Renesas RL78G13 Quick Start Guide ====== |
+ | This section contains a description | ||
- | **HW Platform(s): | + | ==== Required Hardware ==== |
- | * [[http://am.renesas.com/ | + | * [[https://www.renesas.com/ |
- | * [[http://am.renesas.com/products/tools/ | + | * [[http://www.digilentinc.com/Products/Detail.cfm? |
- | ===== Driver Description ===== | + | ==== Required Software |
- | The driver contains two parts: | + | * [[http:// |
- | * The driver for the ADXL345 part, which may be used, without modifications, | + | |
- | * The Communication Driver, where the specific communication functions | + | |
- | The Communication Driver has a standard interface, so the ADXL345 driver can be used exactly as it is provided. | + | ==== Hardware Setup ==== |
- | * I2C_Init() – initializes the communication peripheral. | + | There are two options: |
- | * I2C_Write() – writes data to the device. | + | |
- | * I2C_Read() – reads data from the device. | + | |
- | {{ : | + | * The ADXL345 part installed on the Renesas Demonstration Kit (RDK) for RL78G13 can be used. In this case, the I2C protocol has to be chosen. |
- | <WRAP centeralign> | + | |
- | Driver architecture | + | |
- | </ | + | |
- | The implementation of these three functions depends on the used microcontroller. | + | {{ : |
- | The driver for ADXL345 contains functions for reading or writing any of the registers, for placing | + | * A PmodACL can be connected to the PMOD1 connector. In this case, the SPI protocol has to be chosen. |
- | The following functions are implemented in this version of ADXL345 driver: | + | {{ :resources: |
- | ^ Function | + | |
- | | void ADXL345_SetRegisterValue(unsigned char registerAddress, | + | |
- | | unsigned char ADXL345_GetRegisterValue(unsigned char registerAddress) | Reads the value of a register. | | + | |
- | | unsigned char ADXL345_Init(void) | Initializes the I2C peripheral and checks if the ADXL345 part is present. | | + | |
- | | void ADXL345_SetPowerMode(unsigned char pwrMode) | Places the device into standby/ | + | |
- | | void ADXL345_GetXyz(unsigned short* x, unsigned short* y, unsigned short* z) | Reads the output data of each axis. | | + | |
- | | void ADXL345_SetTapDetection(unsigned char tapType, unsigned char tapAxes, unsigned char tapDur, unsigned char tapLatent, unsigned char tapWindow, unsigned char tapThresh, unsigned char tapInt) | Enables/ | + | |
- | | void ADXL345_SetActivityDetection(unsigned char actOnOff, unsigned char actAxes, unsigned char actAcDc, unsigned char actThresh, unsigned char actInt) | Enables/ | + | |
- | | void ADXL345_SetInactivityDetection(unsigned char inactOnOff, unsigned char inactAxes, unsigned char inactAcDc, unsigned char inactThresh, | + | |
- | | void ADXL345_SetFreeFallDetection(unsigned char ffOnOff, unsigned char ffThresh, unsigned char ffTime, unsigned char ffInt) | Enables/ | + | |
- | | void ADXL345_SetOffset(unsigned char xOffset, unsigned char yOffset, unsigned char zOffset) | Calibrates the accelerometer. | | + | |
- | ===== Downloads ===== | + | ==== Reference Project Overview |
- | * {{: | + | In this example, the output data of each axis is read and displayed on the Renesas Demonstration Kit for RL78G13 board’s LCD. Were also activated “Single Tap”, “Double Tap” and “Free-Fall” interrupts. When one of them occurs, on the LCD screen appears a corresponding message. |
- | * {{: | + | |
- | * {{: | + | |
- | ====== Renesas | + | {{ : |
- | This section contains a description of the steps required to run the ADXL345 demonstration project on a Renesas | + | |
+ | ==== Software Project Setup ==== | ||
+ | {{page> | ||
+ | |||
+ | ====== Renesas | ||
+ | This section contains a description of the steps required to run the ADXL345 demonstration project on a Renesas | ||
==== Required Hardware ==== | ==== Required Hardware ==== | ||
- | * [[http:// | ||
+ | * [[https:// | ||
+ | * [[http:// | ||
==== Required Software ==== | ==== Required Software ==== | ||
- | * [[http:// | + | * [[http:// |
- | * [[http://am.renesas.com/ | + | * The ADXL345 demonstration project for the Renesas RL78G14 platform. |
+ | <WRAP round info 80%> | ||
+ | The ADXL345 demonstration project for the Renesas RL78G14 platform consists of three parts: the **ADXL345 Driver**, | ||
+ | |||
+ | All three parts have to be downloaded. | ||
+ | </ | ||
==== Hardware Setup ==== | ==== Hardware Setup ==== | ||
- | For this project it was used the ADXL345 part installed on the Renesas Demonstration Kit (RDK) for RX62N. | + | There are two options: |
+ | |||
+ | * The ADXL345 part installed on the Renesas Demonstration Kit (RDK) for RL78G14 can be used. In this case, the I2C protocol has to be chosen with ' | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | * A PmodACL can be connected to the PMOD1 connector. In this case, the SPI protocol has to be chosen with ' | ||
+ | |||
+ | {{ : | ||
==== Reference Project Overview ==== | ==== Reference Project Overview ==== | ||
+ | The reference project: | ||
+ | * reads and displays the data for each axis on LCD; | ||
+ | * it displays also on LCD if the interrupts “Single Tap”, “Double Tap” or “Free-Fall” were activated. | ||
- | In this example, the output data of each axis is read and displayed on the Renesas Demonstration Kit for RX62N board’s LCD. Were also activated “Single Tap”, “Double Tap” and “Free-Fall” interrupts. When one of them occurs, on the LCD screen appears a corresponding message. | + | {{ : |
- | {{ : | ||
- | ==== Software Project | + | ==== Software Project |
- | {{page>rx62n_software_design}} | + | {{page>rl78g14_software_tutorial}} |
- | ====== Renesas RL78G13 Quick Start Guide ====== | ||
- | This section contains a description of the steps required to run the ADF4118 | + | ====== Renesas RX62N Quick Start Guide ====== |
+ | This section contains a description of the steps required to run the ADXL345 | ||
==== Required Hardware ==== | ==== Required Hardware ==== | ||
- | * [[http://am.renesas.com/ | + | * [[https://www.renesas.com/ |
+ | * [[http:// | ||
==== Required Software ==== | ==== Required Software ==== | ||
- | * [[http://www.iar.com/en/Products/IAR-Embedded-Workbench/ | + | * [[https://www.renesas.com/us/en/software-tool/high-performance-embedded-workshop|High-performance |
+ | * [[https:// | ||
==== Hardware Setup ==== | ==== Hardware Setup ==== | ||
- | For this project it was used the ADXL345 part installed on the Renesas Demonstration Kit (RDK) for RL78G13. | + | There are two options: |
- | ==== Reference Project Overview ==== | + | * The ADXL345 part installed on the Renesas Demonstration Kit (RDK) for RX62N can be used. In this case, the I2C protocol has to be chosen. |
+ | {{ : | ||
+ | |||
+ | * A PmodACL can be connected to the Renesas Demonstration Kit (RDK) for RX62N (in this case, the SPI protocol has to be chosen): | ||
+ | |||
+ | PmodACL Pin 1 (CS) → YRDKRX62N J8 connector Pin 15 | ||
+ | PmodACL Pin 2 (MOSI) → YRDKRX62N J8 connector Pin 19 | ||
+ | PmodACL Pin 3 (MISO) → YRDKRX62N J8 connector Pin 22 | ||
+ | PmodACL Pin 4 (CLK) → YRDKRX62N J8 connector Pin 20 | ||
+ | PmodACL Pin 5 (GND) → YRDKRX62N J8 connector Pin 4 | ||
+ | PmodACL Pin 6 (VCC) → YRDKRX62N J8 connector Pin 3 | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | ==== Reference Project Overview ==== | ||
In this example, the output data of each axis is read and displayed on the Renesas Demonstration Kit for RX62N board’s LCD. Were also activated “Single Tap”, “Double Tap” and “Free-Fall” interrupts. When one of them occurs, on the LCD screen appears a corresponding message. | In this example, the output data of each axis is read and displayed on the Renesas Demonstration Kit for RX62N board’s LCD. Were also activated “Single Tap”, “Double Tap” and “Free-Fall” interrupts. When one of them occurs, on the LCD screen appears a corresponding message. | ||
- | {{ : | + | {{ : |
==== Software Project Setup ==== | ==== Software Project Setup ==== | ||
- | {{page>rl78g13_software_design}} | + | {{page>rx62n_software_design}} |
+ | ====== More information ====== | ||
+ | {{page>: |