0
\$\begingroup\$

I'm working on a circuit where a 3.3v flash memory, which comunicate with SPI protocol, has to be interfaced to an 8-bit PIC microcontroller working at 5v. For the MISO signal there should not be any problem, but for MOSI, SCK and CS there are. So the solution i came across is a voltage divider. I've done this calculations but don't know if they are ok. _ First of all, i've calculated r1 in this way: (5-3.3)/0.001=1700 ohm _ Then i've resolved the equation Vout = Vin * (r2 / (r1+r2)) 3.3 = 5 * (r2/(1700+r2)) ...resolving the equation in order to find r2...

r2=3300 ohm. Is that correct? i have not any tester and i have just one flash memory. i don't want to fry it... Is the method i've used proper (first determinate r1 with the current and then find r2)? Thank you very very much. Greetings from Italy.

\$\endgroup\$
14
  • 1
    \$\begingroup\$ Who knows what R1 is and what R2 is - you didn't show a circuit. This may seem trivial but it isn't. You should also link the data sheet for the flash memory and state what speed you hope to achieve. \$\endgroup\$
    – Andy aka
    Commented Jun 13, 2020 at 12:40
  • \$\begingroup\$ Which PIC model? Have you checked 3.3V is above logic 1 threshold? At what speeds you plan to communicate? Any capacitance (stray, pin) after the divider will round down the edges, and there is a limit how round edges the SPI flash works with. Basically, resistor divider can be used for low speed stuff, but it may have issues with high speed stuff. \$\endgroup\$
    – Justme
    Commented Jun 13, 2020 at 12:47
  • \$\begingroup\$ The microcontroller is a PIC18F46Q10. \$\endgroup\$
    – morov
    Commented Jun 13, 2020 at 13:25
  • \$\begingroup\$ The flash is the SST25VF080B, the clock of sck is at 2 Mhz \$\endgroup\$
    – morov
    Commented Jun 13, 2020 at 13:26
  • \$\begingroup\$ For the circuit take the CS line like an example: from the pin of the microcontroller, first there is R1, after that there is: _R2 which goes to 0v _and the CS of the flash \$\endgroup\$
    – morov
    Commented Jun 13, 2020 at 13:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.