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
  • 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
FPGA
  • Technologies
  • More
FPGA
Blog FPGA Design Guide Pt5 -  Working: SPI Temperature Display
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join FPGA to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: pjclarke
  • Date Created: 4 May 2012 6:39 PM Date Created
  • Views 495 views
  • Likes 1 like
  • Comments 0 comments
  • spi
  • fpga
  • xula
  • vhdl
Related
Recommended

FPGA Design Guide Pt5 -  Working: SPI Temperature Display

pjclarke
pjclarke
4 May 2012

So after so many weeks we have come to the end and I have got the whole project working. If you have been following then in Part One we came up with the idea of making a temperature display using a LED matrix (5x8). This would be driven by a FPGA and would get its temperature from a MAX31855 SPI temperature sensor. We then looked at the blocks of code and function blocks that would go into this project.

 

image


Then in Part Two I designed and generated the separate code blocks for the function blocks in Part One. Then in Part Three I connected the blocks together. However up till then I’d not used the SPI sensor. So in Part Four I designed a SPI interface that could interface to the chip. This used a small state machine that kept the interface running and updating a interface. So now its time to get this interface working.

 

image


I think this is a very important point to say that this went very easy. The reason for that is Part Four. I had spent a lot of time designing the SPI separately and also testing it. This did not appear in the blog but simulating your design is critical. So that in this part, ‘just’ placing the code in the full project worked really well because it was well tested. Testing on a live system in FPGA without the right tools can be very hard.

So let see it working then... I placed the SPI unit into the rest of the project and changed one line of code:

--bcd(11 downto 0) <= to_bcd(cnt_r(29 downto 22));
bcd(11 downto 0) <= to_bcd(SPI_Data(28 downto 21));

Here I commented out the original line that took the counter as our data input via the BCD converter. This was replaced with data from the SPI interface.

Once compiled this just run and was even surprised myself! So below here are a few pictures of the display. Sorry images are not clear but wanted the LEDs to show up clear on the camera.

 

image

 

image



So that's it. I’ve once again copied in the full design files for people to look at and hopefully learn from. I hope that you have enjoyed reading these blog posts and have been inspired to go do some FPGA programming yourself.

If you want to follow my other blogs then please feel free to follow me on Twitter, Facebook or Google+.

Thanks for reading and if you do any projects yourself, write them up and post them here. We all want to hear how you get on.

Paul
(aka @monpjc)

Attachments:
e14_002.zip
  • Sign in to reply
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