We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2019-11-28
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Brushless
Downloaded: 3214 times
Not followed.
License: MIT license
The Fan 6 click is a Click board which features EMC2103, an SMBus compliant fan controller with up to up to 3 external and 1 internal temperature channels. The fan driver can be operated using two methods each with two modes. The methods include an RPM based Fan Speed Control Algorithm and a direct PWM drive setting.
Do you want to subscribe in order to receive notifications regarding "FAN 6 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "FAN 6 click" changes.
Do you want to report abuse regarding "FAN 6 click".
Library Description
Initializes and defines I2C driver and driver functions which have ability to controls the operation of the fan by writting to registers and reading from registers. Functions also offer a choice to communicate with EEPROM and check tachometer value and temperature value of internal or external diode. Also, there is an option to change operation mode of fan. For more details check documentation.
Key functions:
void fan6_writeReg( const uint8_t register_address, const uint16_t transfer_data )
- Function writes 16-bit or 8-bit data to register.uint16_t fan6_readReg( const uint8_t register_address )
- Function reads 16-bit or 8-bit data from register.uint8_t fan6_receiveByte( const uint8_t register_address )
- Function sends register address and reads byte from that address, without writting address again, every time when function be called.uint32_t fan6_readTachometer( void )
- Function reads current tachometer value and calculates that value in rpm.Examples description
The application is composed of three sections :
void applicationTask()
{
tachometer = fan6_readTachometer();
LongWordToStr( tachometer, text );
mikrobus_logWrite( "Tachometer value is: ", _LOG_TEXT );
mikrobus_logWrite( text, _LOG_TEXT );
mikrobus_logWrite( " rpm", _LOG_LINE );
tempDiode = fan6_getTemperature( _FAN6_EXTDIODE1_TEMP_READ_REG, &temperatureSign );
FloatToStr( tempDiode, text );
mikrobus_logWrite( "Temperature of DIODE is: ", _LOG_TEXT );
if (temperatureSign)
mikrobus_logWrite( "-", _LOG_TEXT );
mikrobus_logWrite( text, _LOG_TEXT );
mikrobus_logWrite( " Cels", _LOG_LINE );
mikrobus_logWrite( "", _LOG_LINE );
Delay_ms( 500 );
}
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.