Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

philvr

Member Since 29 Mar 2011
Offline Last Active Jul 21 2014 07:44 AM
-----

#53900 Help with "structs"

Posted by philvr on 08 November 2013 - 02:28 PM

I've got the following piece of code public struct MAX6651_DATA { public int nr_fans; public char valid; public uint speed; public uint config; public byte [] tachos = new byte[4]; public uint dac; public uint alarm; } MAX6651_DATA myFan = new MAX6651_DATA(); //create an instance of the fans data structure I would expect... myFan.dac = 100; to assign the dac element the value 100.... Please, what is wrong with this? I must be missing something fundamental! (I fear more background work/reading may be required). Thanks for any advice...


#53861 Hall Effect Current Sensors.

Posted by philvr on 07 November 2013 - 02:20 PM

I've been experimenting with a couple of Hall Effect Current Sensors and using them to measure large DC currents (up to 60A). The devices are the CSLA1CD by Honeywell. I've had some success but the device has developed an offset! Out of two units one now produces 5.8V when zero current flows and the other 6.3V! Originally they both produced 6V! My question is has anyone here experience of using Hall Effect Current Sensors? Can they become permanently magnetised if exposed to magnetic fields from associated high current DC cables and hence produce an output that is out of specification? I can not think of any other reason for them to develop an offset but I am new to these devices so am hoping someone reading this can offer advice. regards Philvr


#53047 Code optimisation? Shift left/right instead of divide by 2?

Posted by philvr on 04 October 2013 - 01:52 PM

The i2c MAX6651 fan controller has a tacho count time register that sets a tacho count period 0.25S, 0.5S, 1S or 2S. The tacho counter is read and the time of a fan rotation derived from the counting period set in the tacho count register and the number of pulses counted by the tacho.Questions is this. As the tacho count time register is in powers of 2, is it quicker to use a bitwise shift ( to shift the tacho counter reading right to multiply by two (left to divide by 2) or to use an integer multiply/divide operation?Does anyone know if the clr c# interpreting system would choose the most efficient operation?


home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.