Jump to content
  • 0

Arty - SENT - FPGA Output Question


maxtim10

Question

Hello all,

I am writing C code for the arty board to basically emulate the automotive SENT protocol.  I just need to know if the output pins are open drain on this board to prevent accidental loads that could damage my parts.

Let me know if any further information is required.

Thanks,

Tim

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Welcome to the Arty!  I think you'll find it's a fun board to work with ...

In answer to your question, each of the I/O ports on the Arty is independently configurable through the XDC file.  Further, while most of the pins have protection resistors on them between the FPGA and the external ports, not all of them do.  You can find the details of the I/O port wiring in the schematic, found here.

If you want to make a pin either open or a drain, you can set it's value (within Verilog) to be either 1'bz (open, or high impedence), or 1'b0.  Usually, though, when you do this you'll also want to place a pull up resistor on the pin as well.  That's done in the XDC file, with a line similar to

set_property -dict { PULLUP } [get_ports <pin_name_from_design>]

Xilinx also has a PULLUP and a PULLDOWN library function that you can use between your logic and the final pin out, that might be able to do the same thing.

You can find an example of doing this sort of thing with a Spartan 6 chip on the CMod-S6 board here, although it uses a UCF file instead of the XDC file used with the Arty.  Still, that CMod-S6 project makes it clear how you can have two output pins (ostensibly for I2C_SCL and I2C_DAT, called io_scl and io_sda within the toplevel of the  project and within the associated ADC file), drained to zero by logic else pulled high, and able to be read by logic whether drained or not.  Pay attention to the lines io_sda and io_scl logic in toplevel.v, if you decide to look into this.  Those lines are then fed into a GPIO controller, which allows the CPU to bit-bang the I2C lines, both writing as well as reading them.

While I expect that the Arty can dynamically turn on and off the pull-up resistor, I've never done it before so I wouldn't be able to help you if that's something you needed to do as well.

Dan

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...