Estou fazendo uma incursão em I2C no MPLABX. Alguém já se aventurou em I2C por lá ou já utilizou o Acelerômetro ADXL345?

Exibições: 209

Responder esta

Respostas a este tópico

Bom dia JL.

Este code que estou postando está escrito para CSS e não para MPLAX.

Mas se voce conhece C, e o MPLABX, pode facilmente adapta-lo.

Se não conseguir, avise que tento modifica-lo.

Segue arquivos anexos.

RV

Anexos
Você saberia dizer qual o pino que corresponde ao ALT Address, seria esse SDO?

JL

Table 4. Pin Function Descriptions
Pin Mnemonic -----------------------   Description
1      VDD I/O  -----------------------   Digital Interface Supply Voltage.
2      GND  ----------------------------   Must be connected to ground.
3      Reserved  ----------------------   Reserved. This pin must be connected to VS or left open.
4      GND  ----------------------------   Must be connected to ground.
5      GND  ----------------------------   Must be connected to ground.
6      VS  ------------------------------   Supply Voltage.
7      CS  ------------------------------   Chip Select.
8      INT1  ----------------------------   Interrupt 1 Output.
9      INT2  ----------------------------   Interrupt 2 Output.
10    NC  ------------------------------   Not Internally Connected.
11    Reserved  ----------------------   Reserved. This pin must be connected to ground or left open.
12    SDO/ALT ADDRESS  -------   Serial Data Output/Alternate I2C   Address Select.
13    SDA/SDI/SDIO  ---------------   Serial Data (I2C)/Serial Data Input (SPI 4-Wire)/Serial Data Input

                                                        and Output  (SPI 3-Wire).
14    SCL/SCLK  -------------------   Serial Communications Clock.

datasheet:https://www.sparkfun.com/datasheets/Sensors/Accelerometer/ADXL345.pdf

RV

RSS

© 2024   Criado por Marcelo Rodrigues.   Ativado por

Badges  |  Relatar um incidente  |  Termos de serviço