32
3-10-1 I2C WDT/DIO F75111N reference sample code:
Compile platform: Windows (include SMBus.h)
1. Introduction
1.1 Initial Internal F75111 port address (0x9c)
1.2 Set F75111 DI/DO ( sample code as below Get Input value/Set output value)
1.3 Enable/Disable WDT
1.4 PULSE mode
2. Initial internal F75111
3. Set output value
4. Get input value
5. Enable Watch Dog
6. Disable Watch Dog
7. Define F75111 pin
1-1. Initial Internal F75111 port address (0x9c)
define GPIO1X, GPIO2X, GPIO3X to input or output and Enable WDT function pin
1-2. Set F75111 DI/DO ( sample code as below Get Input value/Set output value )
DO: InterDigitalOutput(BYTE byteValue))
DI: InterDigitalInput()
1-3. Enable/Disable WDT
Enable : F75111_SetWDTEnable (BYTE byteTimer)
Disable: F75111_SetWDTDisable ()
1-4. PULSE mode
Sample to setting GP33, 32, 31, 30 output 1mS low pulse signal.
{
//This is setting low pulse output
this->Write_Byte(F75111_INTERNAL_ADDR, GPIO3X_PULSE_CONTROL, 0x00);
//This selects the pulse width to 1mS
this->Write_Byte(F75111_INTERNAL_ADDR, GPIO3X_PULSE_WIDTH_CONTROL, 0x01);
//This is setting the GP33, 32, 31, 30 to output function.
this->Write_Byte(F75111_INTERNAL_ADDR, GPIO3X_CONTROL_MODE, 0x0F);
//This is setting the GP33, 32, 31, 30
this->Write_Byte(F75111_INTERNAL_ADDR, GPIO3X_Output_Data , 0x0F);
}
Contents
1. Introduction