New answers tagged

2

assume I can pick any one up to M7 Then pick one from STM32H7 series, it has direct hardware support for all the features you need for this, independent fractional PLL to generate arbitrary SPI clock rates, and variable frame length if you need bit stuffing, i.e. frame length is not necessarily a multiple of 8 bits. Any other STM32 can do it as well, even ...


1

As others have noted, I would avoid SPI at that distance. However, if you want to link to be faster, I would recommend passing your UART signals through a full-duplex LVDS transceiver on each PCB. The differential signals will minimize radiated emissions, allowing your bit rate to increase significantly. Something like the DS90LV019 should meet your ...


1

I wouldn't use SPI at one meter due to the fact MOSI pulse doesn't start until the slave receives the clock pulse but must reach the master before the next clock pulse. Just sayin' It's also a pain since the link is always initiated and controlled from one end and dummy bits are required for the master to receive when it's not sending. It's even trickier ...


4

I tested it, and it works (115200 baud rate), there's just a small ~20ms latency getting a reply when sending a request from PCB1 to PCB2. That latency is almost certainly nothing to do with the data rate of 115 kbaud. In 1 ms there can be 115 bits transmitted so, unless your message protocol requires thousands of bits, you are going to be stuck with ...


1

The card may take quite a while to locate a sector, as it uses wear leveling internally (or at least should do so). That means your iteration counter while(result != 0xFE && iteration < 10){ is several orders of magnitude too small. I recommend using one of the open source FAT implementations rather than trying to roll your own. Check your ...


1

Follow the below image carefully. Several times, until you get a gist of it. (Image source: Wikipedia - Serial Peripheral Interface) Thumb rule is as below: CPOL significance: This defines, whether the Clock signal will be high (CPOL = 1) or low (CPOL = 0) before the Chip select goes low (before beginning the transaction). CPHA significance: It tells, ...


2

You must look at master datasheet and slave datasheet to find matching settings. While many microcontrollers have bits named CPOL and CPHA to change settings, there is no single standard how to set these bits to get the settings you need. Different microcontrollers could have different interpretation of these bits, so it is impossible to say how they should ...


0

This is the first (oldest) answer to this question: Based only on the informations you provided (for a slave device); your statements are equivalent to: The setup of SDO (Serial Data Out) or MISO (Master In, Slave Out) occurs in the falling edge of SCK. The sample of SDI (Serial Data In) or MOSI (Master Out, Slave In) occurs in the rising edge of SCK. ...


0

This seems like an interesting idea, but is there a reason you can’t use an off the shelf USB to SD Card adapter based on a commercial IC (e.g., Alcor Micro, Genesys logic, Norelsys, others)?


1

If you don't need your PIC and the computer to be able to access the card simultaneously, you could drop a USB->SDIO host controller (e.g. VUB300) and provide some sort of bus arbitration mechanism for the SD interface. E.g. when you plug in USB, the PIC resets the SD card and puts its SPI pins to Z-state to let the SDIO host controller to work with it. ...


0

A simple non-inverting amplifier with a single-supply or RR I/O precision (low Vos TCVos and high gain) op-amp will meet that requirement, at least in theory. The low output offset is not a problem if it is not required to sink current, otherwise you would need to make a negative supply rail to get nominal 0V out. However, 100uV error at 10V is 10ppm and ...


2

Standard op amp with a gain of 2, you will need a rail to rail op amp, you will also want some pulldown, e.g. 2K to ground to ensure it really can get that close to 0V without issue, I would recommend the 12V supply, to give you some head room to supply current for the pulldown resistor, simulate this circuit – Schematic created using CircuitLab


8

The cheapest solution from a hardware point of view would be to use a MCU that includes a USB interface (there are a lot of them in the PIC32MK/MZ/MX ranges), and just make the MCU responsible for all the communication to/from both the SD card and the USB interface. Implement the Mass Storage USB device class (or, alternatively, the Media Transfer Protocol ...


2

I will try to answer 1. Aesthetics: Please never draw a schematics like this. I wish your second schematics will be nicer one. The ground should always be in the bottom and the supply should always be on the top. Poor drawing simply sets off readers because it is so difficult to comprehend and needless to say it doesn't look good. You should really ...


0

Below is section of functional code snippet that initializes the SSI port and reads the device ID from the ADXL345. This code snippet confirm that the SPI interface is functional. This project can be found at Tiva SPI Nokia ADXL345 // // Enable the SSI3 peripheral // SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI3); // // Wait for the SSI0 module to be ready. // ...


1

I assume with "SS" pin you mean the signal connected to the CSB pin of the sensor. (I did a quick scan of the document provided and I could not immediately spot an SS pin.) The SS/CSB pin is an input and your micro-controller's SPI interface must set it low in order to access the device. If it does not go low that is not an error of the sensor. You should ...


1

The SS and MISO lines are idle HIGH, a pullup is keeping the voltage at 3.3 V. Only when there is data transmission these lines are pulled down to GND by the devices (SS by the Master, MISO by the slave).


Top 50 recent answers are included