Help! How to make open-drain in QuartusII 4 (Cyclone FPGA)?

Status
Not open for further replies.

mountain

Member level 2
Joined
May 22, 2004
Messages
49
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
649
cyclon 3 open drain

These is a system:
Altera Cyclone FPGA(3.3V) and a driver IC(5V)

I want to use the FPGA output as an open drain to get the low level and a pull-up for the high.
But how can I realize it in QuartusII 4.0(Altera)?

Please give me a sample code(Verilog-HDL or VHDL, but the Verilog-HDL is better). Thank you!
 

Re: Help! How to make open-drain in QuartusII 4 (Cyclone FPG

One way is like this:

Code:
output mysignal;

wire mysignal_int;

assign mysignal = (mysignal_int) ? 1'bz : 1'b0;

And then assign mysignal_int with any expression you like, and you don't have to worry about the open drain stuff in the rest of your code...
 

Re: Help! How to make open-drain in QuartusII 4 (Cyclone FPG

Thank you very much!

If you like, would you like to explain your method (or code)? I am a freshman.
Thank you!
 

Re: Help! How to make open-drain in QuartusII 4 (Cyclone FPG

mountain said:
Thank you very much!

If you like, would you like to explain your method (or code)? I am a freshman.
Thank you!

If you use schematic capture see for OPNDRN primitive.
If you use AHDL - code example bellow:

Code:
SUBDESIGN open_drain
(
   in[3..0]   :INPUT;
   hiz[3..0]  :OUTPUT;
)
BEGIN
   FOR i IN 0 TO 3 GENERATE
       hiz[i] = OPNDRN(in[i]);
   END GENERATE;
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…