Witam piszę program do układu AS3935 na płytce od MikroElektroniki na podstawie tego co znalazłem w sieci.
I chciałbym żeby ktoś zweryfikował ustawienia SPI .
Jak narazie dostaję same zera przy odczycie.
W jaki sposób zweryfikować poprawność transmisji ?
Atmega644PA - 18432000Hz
Połączenia:
Mikroe AVR
CS - PB4
SCK - PB7
SDO - PB6
SDI - PB5
main.c
AS3935.c
AS3935.h
---------------
Edit
Mała zmiana jak wynika z datasheet bit 6 adresu przy odczycie powinien być ustawiony
--------------------------------------------------------
Edit 2
Kolejna zmiana zgodnie z DS :
To activate this SPI, the CS has to be set to low. A SPI command consists of two bytes serial command and the data are sampled on the falling
edge of SCLK (CPHA=1). The next table shows command structure, from the MSB (B15) to LSB (B0). The command stream has to be sent to
the SPI from the MSB (B15) to the LSB (B0).
I chciałbym żeby ktoś zweryfikował ustawienia SPI .
Jak narazie dostaję same zera przy odczycie.
W jaki sposób zweryfikować poprawność transmisji ?
Atmega644PA - 18432000Hz
Połączenia:
Mikroe AVR
CS - PB4
SCK - PB7
SDO - PB6
SDI - PB5
main.c
Kod: C / C++
AS3935.c
Kod: C / C++
AS3935.h
Kod: C / C++
---------------
Edit
Mała zmiana jak wynika z datasheet bit 6 adresu przy odczycie powinien być ustawiony
Kod: C / C++
--------------------------------------------------------
Edit 2
Kolejna zmiana zgodnie z DS :
To activate this SPI, the CS has to be set to low. A SPI command consists of two bytes serial command and the data are sampled on the falling
edge of SCLK (CPHA=1). The next table shows command structure, from the MSB (B15) to LSB (B0). The command stream has to be sent to
the SPI from the MSB (B15) to the LSB (B0).
Kod: C / C++
