Hello everyone. I am really tired of doing this. Could Any one please help me out regarding programming. In the application I am making use of Arduino Due and configuring it as master and LMX2595 as slave. I need to transfer 24-bit data of about 79 registers. The output I get frequency for particular set of register transfer. But unfortunately I am not getting any output at the LMX2595 output. Below is the code attached. Could anyone please help me out with respect to this aspect. I am running out of time and need to submit this project within a week. I hope that I get some help here. Any help will be greatly greatly appreciated.
#include <SPI.h>
SPISettings mySettting(4000000, MSBFIRST, SPI_MODE0);
const uint8_t ss = 10;
void setup() {
pinMode(ss, OUTPUT);
SPI.begin();
SPI.beginTransaction(mySettting);
digitalWrite(ss, LOW);
SPI.transfer(0x1C);
SPI.transfer(0x25);
SPI.transfer(0x00);
digitalWrite(ss, HIGH);
digitalWrite(ss, LOW);
SPI.transfer(0x08);
SPI.transfer(0x08);
SPI.transfer(0x01);
digitalWrite(ss, HIGH);
digitalWrite(ss, LOW);
SPI.transfer(0x00);
SPI.transfer(0x05);
SPI.transfer(0x02);
digitalWrite(ss, HIGH);
digitalWrite(ss, LOW);
SPI.transfer(0x42);
SPI.transfer(0x06);
SPI.transfer(0x03);
digitalWrite(ss, HIGH);
SPI.endTransaction();
}
void loop() {
}
Hello everyone. I am really tired of doing this. Could Any one please help me out regarding programming. In the application I am making use of Arduino Due and configuring it as master and LMX2595 as slave. I need to transfer 24-bit data of about 79 registers. The output I get frequency for particular set of register transfer. But unfortunately I am not getting any output at the LMX2595 output. Below is the code attached. Could anyone please help me out with respect to this aspect. I am running out of time and need to submit this project within a week. I hope that I get some help here. Any help will be greatly greatly appreciated.
rduino Due interfacing with LMX2595 Evaluation Board
Nov 25, 2020, 12:02 pm
Hello everyone. I am really tired of doing this. Could Any one please help me out regarding programming. In the application I am making use of Arduino Due and configuring it as master and LMX2595 as slave. I need to transfer 24-bit data of about 79 registers. The output I get frequency for particular set of register transfer. But unfortunately I am not getting any output at the LMX2595 output. Below is the code attached. Could anyone please help me out with respect to this aspect. I am running out of time and need to submit this project within a week. I hope that I get some help here. Any help will be greatly greatly appreciated.
Code: [Select]
#include <SPI.h>
SPISettings mySettting(4000000, MSBFIRST, SPI_MODE0);
const uint8_t ss = 10;
void setup() {
pinMode(ss, OUTPUT);
SPI.begin();
SPI.beginTransaction(mySettting);
digitalWrite(ss, LOW);
SPI.transfer(0x1C);
SPI.transfer(0x25);
SPI.transfer(0x00);
digitalWrite(ss, HIGH);
digitalWrite(ss, LOW);
SPI.transfer(0x08);
SPI.transfer(0x08);
SPI.transfer(0x01);
digitalWrite(ss, HIGH);
digitalWrite(ss, LOW);
SPI.transfer(0x00);
SPI.transfer(0x05);
SPI.transfer(0x02);
digitalWrite(ss, HIGH);
digitalWrite(ss, LOW);
SPI.transfer(0x42);
SPI.transfer(0x06);
SPI.transfer(0x03);
digitalWrite(ss, HIGH);
SPI.endTransaction();
}
void loop() {
}
It's an RF synthesiser - what's it got to do with the pandemic response?
SPI protocol is rather simple, however some SPI slaves are implemented with slight differences with respect to a strict SPI protocol, which screws up communication between Master and Slave. Moreover, UC can also be prone to implement nuances with respect to SPI protocol...
To troubleshoot SPI communications, start with the slowest possible clock speed.
https://forum.arduino.cc/index.php?topic=715365.0


Duplicate topics moved and merged
Cross-posting is against the rules of the forum. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend 15 minutes (or more) writing a detailed answer on this topic, without knowing that someone else already did the same in the other topic.
Repeated cross-posting will result in a timeout from the forum.
In the future, please take some time to pick the forum board that best suits the topic of your question and then only post once to that forum board. This is basic forum etiquette, as explained in the sticky "How to use this forum - please read." post you will find at the top of every forum board. It contains a lot of other useful information. Please read it.
Thanks in advance for your cooperation.