element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
RoadTests & Reviews
  • Products
  • More
RoadTests & Reviews
RoadTest Forum Comments for using RPi with SPI memory
  • Blog
  • RoadTest Forum
  • Documents
  • RoadTests
  • Reviews
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RoadTests & Reviews to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 22 replies
  • Answers 2 answers
  • Subscribers 2549 subscribers
  • Views 3322 views
  • Users 0 members are here
  • ram
  • raspberry
  • microchip
  • pi
  • spi
  • sram
Related

Comments for using RPi with SPI memory

clem57
clem57 over 10 years ago

image

Here are my notes so far. Any comments or issues please let me know. I think I am on the right track.

  • Sign in to reply
  • Cancel

Top Replies

  • michaelkellett
    michaelkellett over 10 years ago +1
    Why do you want to connect a tiny additional memory to your PI ? There is no reason why it couldn't work - it just seems a bit odd. MK
  • bbolo1
    bbolo1 over 10 years ago in reply to clem57 +1
    Here are a few examples of SPI RTC chips: ST M41T93 Microchip RTCs NXP PCF2123 Maxim RTC and another Maxim RTC as for the CS manipulation, here are a couple of pages ( 1 , 2 ) that might help you. You…
  • clem57
    clem57 over 10 years ago +1 suggested
    Ok! I have learned that I should use pins 24/26 as CE0/CE1 instead of pin15(GPIO 22) because this alleviates me writing extra code. I plan on using Python SPIDEV from GitHub... Thanks for Elektor Academy…
Parents
  • clem57
    0 clem57 over 10 years ago

    Ok!

     

    I have learned that I should use pins 24/26 as CE0/CE1 instead of pin15(GPIO 22) because this alleviates me writing extra code. I plan on using Python SPIDEV from GitHub...

     

    Thanks for Elektor Academy - Hardware Hacking the RPi pointing this out. Excellent if you want the details image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago in reply to clem57

    Question: What to do with HOLD pin? I need it to stayhHigh. Also how to make the CS pin be high but go low when transmitting?

     

    Thanks,

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • bbolo1
    0 bbolo1 over 10 years ago in reply to clem57

    Hi Clem,

     

    Use a pull-up resistor (10K should be just fine) with the HOLD pin.

    The CS handling is done by the driver.

    I found an example here involving MCP3008. This chip uses an active low chip select as well as the 23K256. Good luck!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago in reply to bbolo1

    Just to be clear:

     

    V3.3 ------- R1(10K) -------- HOLD

     

    What state is the CS when I boot up? I put power on the 23K256 and the bootup for the Pi goes crazy with strange errors. Take power off the 23K256 and no problem...

     

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • bbolo1
    0 bbolo1 over 10 years ago in reply to clem57

    Yes, you are correct about the HOLD pull-up resistor.

    As for the CS state, I have to check it on my board as well. Can you try to disconnect the SO pin of the 23K256? Of course, this means the SPI communication with this chip won't work but it is worth checking if this is the cause of the strange errors you're seeing.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago in reply to bbolo1

    With the pullup resistor on HOLD, I can boot RPi with power to SPI memory. Thanks @bbolo1 ! image image image

     

    Clem

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • bbolo1
    0 bbolo1 over 10 years ago in reply to clem57

    Hi Clem,

    Congrats!!! It is good to hear everything works fine with the SPI memory. Good luck with the tests! image

    After you play with SPI maybe you can try some I2C chips as well. There are so many interesting I2C chips (pressure, temp, acceleration sensors, gyros, magnetometers, ...) you can attach to the RPi.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago in reply to bbolo1

    Well I am stuck again, but this time I think software. I can program using python, but nothing gets stored(?) and the chip does not respond (0XFF) ! If I unplug the chip's +3 volts, all responses are 0X00... I am too close to this to figure it out. Ask me questions to send me on the right track.

     

    Thanks,

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 10 years ago in reply to clem57

    You've now reached the stage where I would connect the 4 channel scope or a logic analyser !

     

    Do you have either ?

     

    If not you can try posting your code and we'll see if we can pick our way through it.

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • michaelkellett
    0 michaelkellett over 10 years ago in reply to clem57

    You've now reached the stage where I would connect the 4 channel scope or a logic analyser !

     

    Do you have either ?

     

    If not you can try posting your code and we'll see if we can pick our way through it.

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube