"its is possible to change from out put to a label? because i will use to control a different output devices for example RC servo, DC motor ,relay etc?"
sure....
Code:
ADCON1=7 ;disable ADC
TRISB=$FF
TRISA=0
TRISC=0
Out1 VAR PORTA.0
Out2 VAR PORTA.1
Out3 VAR PORTA.2
Out4 VAR PORTA.3
Out5 VAR PORTA.4
Out6 VAR PORTC.0
Out7 VAR PORTC.1
Out8 VAR PORTC.2
Out9 VAR PORTC.3
Out10 VAR PORTC.4
Rinput VAR PORTB
GetInput VAR BYTE
Gosub ResetOutputPort
start:
GetInput=Rinput & $0F ;will mask the MSB bits of PORTB
select case Getinput
Case 0
Gosub ResetOutputPort
Case 1
Out1=1
Out3=1
Case 2
Out2=1
Out4=1
Case 3
Out5=1
Case 4
Out1=1
Out4=1
Case 6
Out6=1
Case 7
Out8=1
Case 8
Out2=1
Out3=1
Case 12
Out7=1
Case 14
Out9=1
Case 15
Out10=1
End Select
goto start
ResetOutputPort:
PORTA=0
PORTC=0
return
now it's really suppose to match with your specific need.
NEXT!!!
Last edited by mister_e; - 4th November 2004 at 17:02.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks