Paul Keeton wrote:
>               I am using a mesa 5i20 for general purpose I/O. All pins are 
> gpio. This is what I am doing.....
> 
> setp hm2_5i20.0.gpio.000.is_output 1
> net classicladder.0.out-00 => hm2_5i20.0.gpio.000.out 

That all looks good.


>               When classicladder.0.out-00 is on hal config shows that 
> hm2_5i20.0.gpio.000.out is also on but I get no output out of the opto22 
> module. The led on the opto board doesn't light up either. If I check an 
> input with the same cable on a different opto board through a different 5i20 
> port it works fine and shows in hal config also. Any clue on what is causing 
> this? I want to use 48 I/O pins with 24 inputs on one opto board and 24 outs 
> on the other. In other words my ins are working but my outs are not.

Are both the .read and .write functions for that board running in your 
threads?  If you only have the .read, you'd get the behavior you describe.

If you *are* running the .write function and it's still not working, 
then it may be a voltage level issue.  There is some funny business with 
the 5i20 output voltage levels.  When you set a pin to 0 in HAL, you'll 
always get 0 volts on the I/O pin (unless .is_inverted is true, of 
course).  But if you set the pin to 1 in HAL, there are two possible 
things that can happen.  By default, you'll get 3.3V.  This may not be 
enough to light up the LEDs on your opto board.  If you set the gpio's 
.is_opendrain parameter, then a logic 1 gives you the full 5V on the 
output pin.  (In open drain mode, the FPGA does not pull the pin high on 
logic 1, it disconnects from the pin and a 10K resistor pulls it to +5.)

Something to play with.


-- 
Sebastian Kuzminsky

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to