Chapter 4 Software Developmentpage 4-234-4. Port 7 LED2 ControlThe MSM66Q573 microcontroller on the JOB60851 board has twelve bidirectional ports (P0 to P11)with 75 pins and an input only port (P12).The Section describes the use of Port 7 (P7), the one connected to LED2.4-4-1. Port 7 RegistersEach MSM66Q573 microcontroller port on the JOB60851 board has at least three control registers.The following describes those for Port 7.(1) Port Mode Register (P7IO)The bits in this register control the I/O directions of the corresponding Port 7 pins: input ("0") oroutput ("1"). After a reset, this register contains 00H, configuring all pins for input.Port Mode Register (P7IO)Bit number bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0P7IO P7IO7 P7IO6 P7IO5 P7IO4 --- P7IO2 P7IO1 P7IO0After a reset 0 0 0 0 --- 0 0 0Setting a bit to "0" configures the corresponding Port 7 pin for input; "1" is for output.(2) Port Secondary Function Control Register (P7SF)The bits in this register switch between the primary ("0") and secondary ("1") functions of thecorresponding Port 7 pins. After a reset, this register contains 00H, configuring all pins for theirprimary functions.Port Secondary Function Control Register (P7SF)Bit number bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0Primary PWM1OUTPWM2OUT --- PTM3OUT --- --- TXD0 ---P7SFSecondary P7SF7 P7SF6 P7SF5 P7SF4 --- P7SF2 P7SF1 P7SF0After a reset 0 0 0 0 --- 0 0 0Setting a bit to "0" configures the corresponding Port 7 pin for its primary function; "1" is for itssecondary function.Note that bit 0 has no secondary function because the corresponding pin is always a serial portreceive data pin. To enable this input pin, simply write "0" to bit 0 in the Port Mode Register(P7IO).(3) Data Port Register (P7)The bits in this register hold the port's I/O data. After a reset, this register contains 00H.Reading this register yields the input states of pins configured for input and the last data writtenfor pins configured for output.Writing to this register overwrites all bits regardless of pin I/O directions.