element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Achievement Levels
    • Benefits of Membership
    • Feedback and Support
    • Members Area
    • Personal Blogs
    • What's New on element14
  • Learn
    Learn
    • eBooks
    • Learning Center
    • Learning Groups
    • STEM Academy
    • Webinars, Training and Events
  • Technologies
    Technologies
    • 3D Printing
    • Experts & Guidance
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Arduino Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Project Groups
    • Raspberry Pi Projects
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Or 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
Personal Blogs
  • Members
  • More
Personal Blogs
Legacy Personal Blogs Talk SPI to EEPROM with Hercules Launchpad - part 2: Circuit and Test Bed
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 9 May 2015 9:07 AM Date Created
  • Views 702 views
  • Likes 1 like
  • Comments 5 comments
  • hercules_launchpad
  • microchip
  • EEPROM
  • spi
  • texas_instruments
  • serial
  • protocol
Related
Recommended

Talk SPI to EEPROM with Hercules Launchpad - part 2: Circuit and Test Bed

Jan Cumps
Jan Cumps
9 May 2015

My Peruvian mate martinvalencia and I purchased a set of 25LC256 SPI serial EEPROM chips.

Our plan was to get them working with the Texas Instruments Hercules LaunchPad MK II.

That was back in January. And then we stalled.

Martin has restarted the exercise and I'm going to play along.

 

This blog is our path from Zero to Hero.
This time it's about the circuit buildup and preparation of the test toolset.

Feel free to jump all over us while we're doing things the wrong way.

 

image

 

 

Wiring the LaunchPad to the EEPROM

 

No rocket science here.Although the signals are differently named by each Microchip and Texas Instruments, they are the same thing.

To overcome that, I've invented my own convention, so that neither of them gets away with  it image.

 

image

 

 

~HOLD and ~WP

These two pins are not part of the SPI interface.

 

I've checked what to do with the pins. I don't need them. To take care that the chip is not write protected and not in hold mode, I pull them high permanently.

It seems I can do that directly to the positive rail without resistor. I may check later with my µCurrent to see if they pull any real current.

 

You can find the use of these two signals in the datasheet.

 

On the Hercules Launchpad, I've selected the SPI module 3.

I didn't do that with a particular functional reason. It is the one that's broken out to both the BoosterPack headers and the breakout pads on the side.

I figured that this could be useful later on.

 

image

The pins that have a blue rectangle around them in the picture above are the ones I'm using.

The chip select goes to J11.40, clock to J11.38, master out to J11.37 and master in to J11.36.

I've placed a .1µ capacitor over the power rails, close to the ic.

 

image

 

 

Consistent Color Coding

 

I've kept the colors of the four SPI signals consistent in my drawings and with the patch wires.

I'm keeping this consistent in my logic analyzer. I'm setting it up to show the signals with those same colors and names.

 

My conventions:

signal (Microchip)signal (Texas Instruments)signal (my blog here)color codedescription
~CSNSC~CSorangechip select
SCKCLKSCKblueserial clock
SISIMOMOSIgreendata master -> slave
SOSOMIMISOwhitedata slave -> master

 

 

Configuring the Logic Analyzer

 

My Papilio FPGA board has logic analyzer duty.

As client, I'm using JaWi's Logic Sniffer client. I'm configuring it so that its colors match my drawings abd wires, and I've also labeled the signals to my naming convention.

 

Setting the colors and labels

The program doesn't save your color settings when you save a project. The easiest way to set the signal colors is by creating a color schema.

Just take one of the existing files in <ols_install_folder>/plugins, edit it as shown below, and save it under a new name.

 

<ols_install_folder>/plugins/ols.ui.colorscheme-spi

 

# The name of this color scheme
ols.color.scheme.name = SPI


# The default background color
ols.background.color = 1e2126


# The default color used for text shadows
ols.shadow.color = 151620


# The default color for channel group 1
ols.channelgroup1.default.color = 92d4ca
ols.channelgroup1.channel1.default.color = FF9900
ols.channelgroup1.channel2.default.color = 0066FF
ols.channelgroup1.channel3.default.color = 00CC00
ols.channelgroup1.channel4.default.color = FFFFFF
ols.channelgroup1.channel5.default.color = 1e2126
ols.channelgroup1.channel6.default.color = 1e2126
ols.channelgroup1.channel7.default.color = 1e2126
ols.channelgroup1.channel8.default.color = 1e2126
# ...

 

You can then select this color schema as your default:

image

 

You can rename the signals by double-clicking on them and typing the new name. These settings are stored when you save your project.

image

Connecting the Papilio.

I'm connecting 5 wires: GND and the 4 SPI signals. You can read how use your Papilio as logic analyzer here: Make a Logic Analyzer from your Dev Kit Part 2: Papilio FPGA.

Because there is no level translation needed in my setup here, I could use the Papilio without input buffer.

I'm leaving it in anyway to make it easy to disconnect the LA from the circuit in one go when needed. It just acts as a connector in this design.

image

 

Related posts
part 1: from Zero to Hero
part 2: this post
part 3: Testing SPI Protocol with Bus Pirate
part 4: First Trial on the RM46
  • Sign in to reply

Top Comments

  • Jan Cumps
    Jan Cumps over 8 years ago +1
    Our first tries look promising, but we don't get a CS yet...
  • Jan Cumps
    Jan Cumps over 8 years ago +1
    It's getting better. I believe that there are still issues with CS_HOLD, but were moving...
  • Jan Cumps
    Jan Cumps over 8 years ago +1
    I think I'm doing the right thing, but the eeprom doesn't reply (1: set write enable, 2: write data 0xAA , 3: set write disable, 4: read data 0x00 ) I must be doing the wrong thing then ... Back to the…
Parents
  • Jan Cumps
    Jan Cumps over 8 years ago

    I think I'm doing the right thing, but the eeprom doesn't reply (1: set write enable, 2: write data 0xAA, 3: set write disable, 4: read data 0x00 image )

     

    image

     

    I must be doing the wrong thing then ...

    Back to the spec.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • martinvalencia
    martinvalencia over 8 years ago in reply to Jan Cumps

    good friend !, I am in the same problem as you.

     

     

    I think it's time to change the clock speed, perhaps there begins the problem.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 8 years ago in reply to martinvalencia

    I tried 1M and 400 K.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • Jan Cumps
    Jan Cumps over 8 years ago in reply to martinvalencia

    I tried 1M and 400 K.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • 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 © 2023 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