cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
8,996 Views
Registered: ‎11-21-2007

S3E Board using MicroBlaze to address J1 and J2

I can't figure out how to address the four input/output pins at both the J1 and J2 connectors on the Spartan S3E board.  I would like to write a simple program in C (running in MicroBlaze) that looks at the logic level on an input line (coming into the J2 connector), and then sets the logic level on an output line (going out of the J1 connector). 
 
This should be one of the easiest things in the world to do:  It would have taken me less than 5 minutes to write if I were using a real microprocessor.  But I've already spent 5 days trying to do this in MicroBlaze.  It just shouldn't be this difficult for me to do something this simple, so I would really appreciate your help.  Thanks.  
0 Kudos
4 Replies
Highlighted
Xilinx Employee
Xilinx Employee
8,986 Views
Registered: ‎08-06-2007

Re: S3E Board using MicroBlaze to address J1 and J2

Hi,
 
 - Find the pins on the FPGA that connected to J1 and J2, should be in the manual of the board.
 - Add GPIO peripherals to read and write to these pins
 - Make sure that the signals from the GPIO are connected to the right FPGA pins, this is done in the system.ucf file.
 - Write C code that reads and write to the GPIO peripherals.
 
Göran 
0 Kudos
Highlighted
Visitor
Visitor
8,978 Views
Registered: ‎11-21-2007

Re: S3E Board using MicroBlaze to address J1 and J2

Thanks, Goran.  I've already located the pins and written the UCF file:  
 

# These four connections are shared with the Hirose FX2 connector (J3) and the debugging port landing pads (J6)

NET "FX2_IO<1>" LOC = "B4" | IOSTANDARD = LVCMOS33 | ;

NET "FX2_IO<2>" LOC = "A4" | IOSTANDARD = LVCMOS33 | ;

NET "FX2_IO<3>" LOC = "D5" | IOSTANDARD = LVCMOS33 | SLEW = SLOW | DRIVE = 8 ;

NET "FX2_IO<4>" LOC = "C5" | IOSTANDARD = LVCMOS33 | SLEW = SLOW | DRIVE = 8 ;

 

What is the syntax for the C code to look at the receive logic levels coming into pins 1 and 2 for receive, and to set the output logic levels on pins 1 and 2 for transmit?  

 

Steven

kartys@cox.net

 

0 Kudos
Highlighted
Anonymous
Not applicable
8,968 Views

Re: S3E Board using MicroBlaze to address J1 and J2

Here you will find a small c-program that will read and write to the GPIO.
http://svenand.blogdrive.com/archive/53.html

Sven
0 Kudos
Highlighted
Visitor
Visitor
8,962 Views
Registered: ‎11-21-2007

Re: S3E Board using MicroBlaze to address J1 and J2

Thanks, Sven.  That's a lot more help than anyone else was able to give me.  Although I've been reading your blog intermittently, I missed that part.  Thanks again for pointing it out to me. 
 
Steven
0 Kudos