MIKROE-2708

Notes Pin
Pin Notes
#ALERT,activelow,local/remote
overtemperaturefault
ALR 1 AN PWM 16 NC
#SHDN,activelowovertemperature
shutdownfault
SHD 2 RST INT 15 INT
#INT,activelow,atleastoneofthe
threefaultshasoccurred
#FANFAULT,activelow,fanspeed
fault
FF 3 CS TX 14 NC
NC 4 SCK RX 13 NC
NC 5 MISO SCL12 SCL SCLI2Cline
NC 6 MOSI SDA 11 SDA SDAI2Cline
Powersupply +3.3V 7 3.3V 5V 10 +5V Powersupply
Ground GND 8 GND GND 9 GND Ground
Jumpersandsettings
Designator Name
Default
Position
Default
Option
Description
J1
FAN
SEL
ONorOFF(not
specified)
2/3or4
wirefan
Wheninplace(ONposition)itenablestwoorthreewire
fanusage,inotherwise(OFF‐unconnected)itenables4
wirefanapplications.
Programming
Code examples for Fan 2 click, written for MikroElektronika hardware and compilers are
available on Libstock.
Codesnippet
The following code snippet shows 3 functions from the example that control the fan speed. The
first one initializes Fan 2 click to work automatically, depending on the temperature, while the
second and third one demonstrates manual control.
01 //sets fan to automatic control (default), and fills the look-up table
02 void Fan_2_Init()
03 {
04 FAN2_I2CdriverInit( I2CM1_Set_Slave_Address, 0, 0, I2CM1_Write_Bytes,
I2CM1_Read_Bytes);
05 FAN2_sendCommand(_FAN2_CONTROL_REGISTER_1, _FAN2_CMD1_DEFAULT);
06 FAN2_sendCommand(_FAN2_CONTROL_REGISTER_2, _FAN2_CMD2_DEFAULT);
07 FAN2_sendCommand(_FAN2_CONTROL_REGISTER_3, _FAN2_CMD3_DEFAULT |
_FAN2_CMD3_INSTANT_RAMP);
08 FAN2_setupLUT(LUTSettings);
09 }
10
11 //sets fan to manual control
12 void Fan_2_Manual()
13 {
14 FAN2_sendCommand(_FAN2_CONTROL_REGISTER_1, _FAN2_CMD1_DEFAULT);
15 FAN2_sendCommand(_FAN2_CONTROL_REGISTER_2, _FAN2_CMD2_DEFAULT |
_FAN2_CMD2_DIRECT_CONTROL);
16 FAN2_sendCommand(_FAN2_CONTROL_REGISTER_3, _FAN2_CMD3_DEFAULT |
_FAN2_CMD3_INSTANT_RAMP);
17 }
18
19 //turns fan on and off
20 void Fan_2_Task()
21 {
22 FAN2_sendCommand(_FAN2_DIRECT_CONTROL_REGISTER, _FAN2_DUTYCYCLE_100);
23 delay_ms (5000);
24 FAN2_sendCommand(_FAN2_DIRECT_CONTROL_REGISTER, _FAN2_DUTYCYCLE_0);
25 delay_ms (5000);
26 }
https://shop.mikroe.com/fan2click8217

MIKROE-2708

Mfr. #:
Manufacturer:
Mikroe
Description:
Power Management IC Development Tools Fan 2 click
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet