Download SN8F27E64
Transcript
SN8F27E60 Series 8-Bit Flash Micro-Controller with Embedded ICE and ISP Example: Set P4.1 to be general purpose input mode. P4CON.1 must be set as “0”. ; Check GCHS and CHS [3:0] status. ;If CHS[3:0] point to P4.1 (CHS[3:0] = 0001B), set B0BCLR FGCHS GCHS=0 ;If CHS[3:0] don’t point to P4.1 (CHS[3:0] ≠ 0001B), don’t care GCHS status. ; Clear P4CON. B0BCLR ; Enable P4.1 input mode. B0BCLR P4CON.1 ; Enable P4.1 digital function. P4M.1 ; Set P4.1 as input mode. Example: Set P4.1 to be general purpose output. P4CON.1 must be set as “0”. ; Check GCHS and CHS [3:0] status. ; If CHS [3:0] point to P4.1 (CHS [3:0] = 0001B), set B0BCLR FGCHS GCHS=0. ; If CHS [3:0] don’t point to P4.1 (CHS [3:0] ≠ 0001B), don’t care GCHS status. ; Clear P4CON. B0BCLR P4CON.1 ; Set P4.1 output buffer to avoid glitch. B0BSET P4.1 ; or B0BCLR P4.1 ; Enable P4.1 output mode. B0BSET P4M.1 SONiX TECHNOLOGY CO., LTD ; Enable P4.1 digital function. ; Set P4.1 buffer as “1”. ; Set P4.1 buffer as “0”. ; Set P4.1 as input mode. Page 84 Version 1.4