I use an ATMEGA328PB and 2 peripherals : MAX17841B and MCP2518FD.
So I use the SPI interface to control one or the other, but also to program the micro controller.
I connected the MISO MOSI and SCK pins directly to the ICSP connector in order to program it, and to avoid interference, I have 150 ohm resistors that go to both interfaces (MAX17841 and MCP2518FD)
The two interfaces (MAX17841 and MCP2518FD) have a resistance of 150 Ohm on their CS pin
My question is: how to properly manage the 2 interfaces? Should I add pull-up or pull-down resistors? PESD5V0U1UA, 115 connected to ground on the pins in order to protect?
Because on this circuit:
it is an evaluation board of one of the modules, fear to see several protection on the lines, but on the MCP2518FD in the documentation there is nothing, no pull-up or nothing ...
Can you please explain what you mean by this ?
Well, at the very beginning I had directly connected the connector and the chips without having any resistors and 9 times out of 10 the programming failed
I solved this by adding resistors only on the interfaces side and just leaving the lines on the icsp connector
EDIT : Now that I think about it by adding pull-up resistors on the CS pins, that would have solved the problems right?
Ok I modified everything a bit, now my SPI lines (MISO MOSI SCK) therefore have a 150 Ohm resistor, ESD protection, and the MISO line is put with a pull-up resistor
For my SPI interface modules, I have on each, for the CS pin a 150 Ohm resistor, a pull-up resistor and ESD protection
It is good ?
I usually put pull-up resistors in the CS pins for my SPI peripherals.
Yes I do the same, pull-up on all CS pin with ESD protection and 150 Ohm resistor
For SPI pin (SCK MISO MOSI) I have ESD protection and resistor 150 Ohm
And for Miso pin i have added a pull-up
I normally use 10K for the pull-ups, just enough that it is not floating
If your peripheral decoding is correct and you only enable SS0 OR SS1 but NOT both
at any given time you should not have a conflict.
Yes I know, to tell the truth it was more an electrical question, if the protection added on each module was good or not
If you have a DMM you can always measure the voltage drop across all the 150 ohm
resistors , calculate the current (I=V/R) and look for anomolies or inconsistencies.
November 30, 2021, 3:26pm
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.