1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 <2005> 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 <2005> 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Hytec DAC8402 |
From: | "Sibley III, Coles" <[email protected]> |
To: | [email protected] |
Date: | Thu, 16 Jun 2005 12:47:18 -0400 |
Hello, We are using a Hytec DAC8402 at SNS for our beam loss
monitor reference. The driver uses far too much CPU time when we update 8 dacs
every 5 seconds. In fact it goes to 100% cpu usage. The offending code is
below. We can fix the code but the question is why does it take so long to set
16 register? The 8402 can be set to uses registers (for a typical dac
application) or memory (for arbitrary waveforms). We need the typical dac
configuration, not the arbitrary waveforms. We are using a Motorola MVME5100 cpu. The wait count goes to 600000 in our case, as if statadr was
not declared as volatile or the 512K of memory is getting loaded, not just the
16 registers. Our WAITLIM has to be set to 1000000. while(((*statadr&CSR_ARM) !=0) &&
waitcount < WAITLIM)waitcount++; if( waitcount < WAITLIM ) { /* set dac value
and rearm */
card->pMem->Data[signal]=val; *statadr
|=CSR_ARM; } The manual says: “While the unit is ARMed the DACs are constantly refreshed with the
contents of the registers which can be changed during this time. There is a
delay which is fixed of approximately 32us after ARM is set, before all the
outputs change together.” The problem seems to be that the ARM stays high far longer
than seems reasonable, as the count rate indicates. The initialization in st.cmd is: Hy8402Configure(1,1,0,0,0,0,0,0) Hy8402Configure(2,1,1,0,0,0,0,0) Any suggestions? Coles Sibley SNS – ORNL Controls Hardware Engineer 865-241-8055 |