erwin4838
Member level 1
- Joined
- Mar 4, 2012
- Messages
- 32
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Location
- Tangerang-indonesia
- Activity points
- 1,478
dear all
i have simple source code :
in this code explaint if pinb.0 is NC then portd is active loop with a timer and if pinb.0 NO aoutomatic portd is inactive.
My question :
how to build instruction if input with push button principle(NC then NO) if pinb.0 NC then NO portd is stay active,but if start push botton(pinb.0)noting a touch/respon ,portd is inactive
thanks for you attention
i have simple source code :
Code:
$regfile = "attiny2313.dat"
$crystal = 1000000
$hwstack = 32
$swstack = 20
$framesize = 32
'------------------------ Configuration
Ddrd = &B11111111 'Port D output
Ddrb = &B00000000 'Port B input
Portb = &B11111111 'PULL-UP internal
'------------------------
Do
If Pinb.0 = 0 Then
Portd = &B11111111
Wait 3
Portd = &B00000000
Wait 5
End If
Loop
in this code explaint if pinb.0 is NC then portd is active loop with a timer and if pinb.0 NO aoutomatic portd is inactive.
My question :
how to build instruction if input with push button principle(NC then NO) if pinb.0 NC then NO portd is stay active,but if start push botton(pinb.0)noting a touch/respon ,portd is inactive
thanks for you attention
Last edited by a moderator: