- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good Evening,
Does anyone know what the voltage corresponding to a 1 and a 0 on the pins of the expansion port is? In general, I have connected an IDE (PATA) cable into the expansion port on the DE2 and have wires going into the other end of the IDE cable. I want to drive the voltage on the wires so that I am able to read either a 1 or a 0 from the expansion port. Is this possible? Thank you very much!Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Does anyone know what the voltage corresponding to a 1 and a 0 on the pins of the expansion port is? --- Quote End --- Yes, it will be the voltage you measure with a voltmeter. :) --- Quote Start --- In general, I have connected an IDE (PATA) cable into the expansion port on the DE2 and have wires going into the other end of the IDE cable. I want to drive the voltage on the wires so that I am able to read either a 1 or a 0 from the expansion port. Is this possible? --- Quote End --- There are multiple DE2 boards; DE2, DE2-70, DE2-115. I'm pretty sure they will all use 3.3V I/O on the expansion header, however, you should check the schematic to make sure. Whether your device sees the 3.3V logic levels as a 1 or a 0 depends on what logic levels it uses. If it is a 5V device, then check the DE2 board has 5V tolerant inputs (look at the schematics for clamping diodes). Cheers, Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DE2 has schottky clamps for th eexpansion header signals and can connect to TTL I/O standard, e.g. a IDE drive. The Voh level of 3.3 V complies with the TTL standard. You should be able to operata the IDE drive at least in faster PIO modes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks again for you quick replies Dave and FvM.
To check the voltage levels, I've set the GPIO_0 port to output a value of 0xffff0000. Then I have wires going into the IDE cable slot corresponding to the ground pin and a pin outputting a 0/1 and I measure the voltage difference between the two pins using a multimeter. I keep getting a value of 1V for both 0 and 1 for some reason. Could you possibly point out where im going wrong? Thank you very much!- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- To check the voltage levels, I've set the GPIO_0 port to output a value of 0xffff0000. Then I have wires going into the IDE cable slot corresponding to the ground pin and a pin outputting a 0/1 and I measure the voltage difference between the two pins using a multimeter. I keep getting a value of 1V for both 0 and 1 for some reason. Could you possibly point out where im going wrong? --- Quote End --- Remove the IDE cable and probe at the header on the DE2 board. Ideally with a scope, but if all you have is a voltmeter, turn the board over and probe on the bottom, where the 100-mil headers are soldered into the board. Look at the schematic. There should be a ground and maybe a couple of supply voltages, eg. 3.3V and perhaps a raw 5V voltage. Measure both of those relative to ground. That will confirm you have your voltmeter setup ok. Now create a design where all you have is something like gpio <= X"AAAAAAAA"; i.e, alternating high and low outputs. Do the same thing for the LEDs on the board, that way when the LEDs light up like you expect, you'll be a little more confident that the pinout is ok. Load that into the DE2 (make sure unused pins are set to tri-state) and then measure. If you're still not getting the right voltage, double check your pin assignments. Cheers, Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks again Dave,
I have attached the basic code that im using for the test. I'm writing a value of "AAAAAAAA" to GPIO_1 (which is configured as output) and have that connected to GPIO_0 (configured as input) via an IDE cable. Then we try to read the values from GPIO_0. This still gives me an output asprinting gpio_0 : 0
printing gpio_1 : aaaaaaaa Any thoughts? code int main() { int i; IOWR_ALTERA_AVALON_PIO_DATA(GPIO_1_BASE, 0xaaaaaaaa); while (1) { for (i=0; i<20000; i++) { } printf( "Printing GPIO_0 : %x \n", IORD_ALTERA_AVALON_PIO_DATA(GPIO_0_BASE)); printf( "Printing GPIO_1 : %x \n", IORD_ALTERA_AVALON_PIO_DATA(GPIO_1_BASE)); printf( "\n"); } }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you sure that the respective FPGA pins are correctly assigned to the GPIO? Do you have a GPIO module in SOPC?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The pins seem to be assigned correctly. I verified by looking at the pin assignment table in the DE2 Reference Manual. Also, in the SOPC builder I have
1. in_port_to_the_GPIO_0[31..0] 2. out_port_from_the_GPIO_1[31..0] Thanks Kartik- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The best way to determine what your problem is, is to reduce the design to its simplest. The method I suggested does not involve an SOPC system at all. Just a couple of lines of VHDL or Verilog (one for the LEDs and one for the GPIOs), then setup just those pins in the assignment editor, P&R the design, and download it.
That way you know you have the minimal design. Probe the GPIO header voltages. Look on the schematic at the VCCIO regulator. With luck, its the same supply that is on the GPIO header. If that supply rail is bad, it will explain why your I/O levels are incorrect. Cheers, Dave- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page