![C&T Solution CT-PBT01 Series User Manual Download Page 46](http://html1.mh-extra.com/html/candt-solution/ct-pbt01-series/ct-pbt01-series_user-manual_3078926046.webp)
CT-PBT01 | User’s Manual
46
GPIO
GPIO Setting
#define GPIO_ADDR 0xA4Bh
//Example1: read input pin
// IO 0xA4Bh is Pin Status(default 0x0F )(at GPIO0~ GPIO3)
ByteData = ReadByte (GPIO_ADDR) //Read current Pin Status
//Example2 : Write output pin
//IO 0xA4Bh default setting is 0x0F (output pin default is Low) (at GPIO4~ GPIO7)
ByteData = 0xF0 //set GPIO4~ GPIO7 to high
WriteByte (GPIO_ADDR, ByteData)
Appendix – WDT & GPIO
GPIO7
I/O 0xA4Bh Bit7
Default output
GPIO6
I/O 0xA4Bh Bit6
Default output
GPIO5
I/O 0xA4Bh Bit5
Default output
GPIO4
I/O 0xA4Bh Bit4
Default output
GPIO3
I/O 0xA4Bh Bit3
Default input
GPIO2
I/O 0xA4Bh Bit2
Default input
GPIO1
I/O 0xA4Bh Bit1
Default input
GPIO0
I/O 0xA4Bh Bit0
Default input