Altera_Forum
Honored Contributor
15 years agoDE2: USB examples
Hello,
I'm trying to figure out how to go about starting a USB device that blinks LEDs if told to do so by PC. Looking at the example, DE2_USB_API, I can see TONS of Verilog files for a Verilog project where most projects are done in VHDL. Not that big of a deal, I think I should be able to port it, but I'm not sure what peices I will need. I have been looking at the embedded programming guide and the datasheet, but I'm not sure what parts of the DE2 i need to be working with in order to blink 2 simple LEDs. For Example, these are all outputs and one inout:inout OTG_DATA; // ISP1362 Data bus 16 Bits
output OTG_ADDR; // ISP1362 Address 2 Bits
output OTG_CS_N; // ISP1362 Chip Select
output OTG_RD_N; // ISP1362 Write
output OTG_WR_N; // ISP1362 Read
output OTG_RST_N; // ISP1362 Reset
output OTG_FSPEED; // USB Full Speed, 0 = Enable, Z = Disable
output OTG_LSPEED; // USB Low Speed, 0 = Enable, Z = Disable
output OTG_INT0; // ISP1362 Interrupt 0
output OTG_INT1; // ISP1362 Interrupt 1
output OTG_DREQ0; // ISP1362 DMA Request 0
output OTG_DREQ1; // ISP1362 DMA Request 1
output OTG_DACK0_N; // ISP1362 DMA Acknowledge 0
output OTG_DACK1_N; // ISP1362 DMA Acknowledge 1 are there no inputs? Page 10 of the programming guide reads: --- Quote Start --- The ISP1362 can be viewed as a complete set of USB functionality—host, device and OTG—that is accessible to the programmer through four I/O ports. Writing and reading register sets control the functionality, and writing and reading the respective buffers access the USB traffic. At the lowest level, the ISP1362 is accessed as four I/O ports. These are: • Device Controller command port • Device Controller data port • Host Controller command port • Host Controller data port. The OTG Controller shares the same I/O ports as the Host Controller. --- Quote End --- is there a reason why these ports are not listed in the .v file? What am I supposed to be writing an interface for on the hardware side? I have what seems to be a good looking tutorial for the software side, so I figured I should tackle the hardware first. Can someone please help? Thanks Malik -edit- Does this example use the J-TAG(USBLaster?) port and not the USB Device port??