Define OSC 4

INPUT portb.7
INPUT portb.6
INPUT portb.5
INPUT portb.4
INPUT portb.3
INPUT portb.2
INPUT portb.1


outPUT portC.2
outPUT portc.3
outPUT portd.0
outPUT portd.1

main:


IF portb.7=1 THEN
HIGH portC.2
ELSE
LOW portC.2
ENDIF

IF portb.6=1 THEN
HIGH portC.3
ELSE
LOW portC.3
ENDIF

IF portb.5=1 THEN
HIGH portd.0
ELSE
LOW portd.0
ENDIF

IF portb.4=1 THEN
HIGH portd.1
ELSE
LOW portd.1
ENDIF

SEROUT2 portc.6, 16468, [DEC 2, 13]



goto main

創作者介紹
創作者 冒險建築 ! Adventure  Architecture 的頭像
chiahac

冒險建築 ! Adventure Architecture

chiahac 發表在 痞客邦 留言(0) 人氣( 66 )