Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

SPI to connect Nexys2 FPGA board and AVR ATmega16

Status
Not open for further replies.

electrobuz

Member level 2
Member level 2
Joined
May 20, 2013
Messages
46
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,638
I am trying to use SPI to connect to FPGA and microcontroller. When a switch on the FPGA is pressed I want to send a code (8 bit code assigned to each switch by me) to the microcontroller.
For this I have made the FPGA as master and written a code for data transmission. First I serialise the 8bits, using a shift register and send 1 bit at a time through the I/O pins. Along with MOSI, I also send SS and SCLK (reduced from 50Mhz to ~12Mhz).
But I am not getting anything on the microcontroller.
Appreciate any help. If required I can post the codes too.
 

There are an infinite number of reasons this isn't working. For starters, have you looked at signals with an oscilloscope? Have you run a simulation on your design?
 

I have done the simulation. These are some of the warnings I am getting:
WARNING:Xst:737 - Found 8-bit latch for signal <data>. Latches may be generated from incomplete case or if statements. We do not recommend the use of latches in FPGA/CPLD designs, as they may lead to timing problems.
WARNING:Xst:1710 - FF/Latch <0> (without init value) has a constant value of 0 in block <3>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1710 - FF/Latch <0> (without init value) has a constant value of 0 in block <4>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1710 - FF/Latch <0> (without init value) has a constant value of 0 in block <5>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1710 - FF/Latch <0> (without init value) has a constant value of 0 in block <6>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1710 - FF/Latch <0> (without init value) has a constant value of 0 in block <7>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1710 - FF/Latch <7> (without init value) has a constant value of 0 in block <LPM_LATCH_1>. This FF/Latch will be trimmed during the optimization process.
 

Best get rid of the latches because you want to get rid of the latches because latches are bad and also because latches are not good no this is no circular argument. :p

Anyways, the point is that unless you very specifically want latches (which I doubt), best get rid of them because they tend to create results that you are not expecting.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top