Well,
After a few hours trying to get a positiv result, I just got nothing working.
I would like to read two buttons connected to one pin.
The states are "0" and "1". The third "Z" state is not relevant to me here.
To make sure I have an intermediate level, I use a 2 resistor divider like described in the first post.
Currently, I can't get clear "0" or "1" states.
Any idea?
I use PORTB.5 of my PIC16F88 for buttons because it is a TTL input only.Code:OSCCON = %01100000 '4MHz OPTION_REG = %10000000 'D I S A B L E PORTB's Pull-Ups for buttons ANSEL = %00000000 'Disable Analogue Inputs TRISB = %00010000 'Inputs/Outputs PORTB = %00000000 'Drive all ports low MAIN: IF PORTB.5 = 0 THEN PORTB.0 = 1 IF PORTB.5 = 1 THEN PORTB.1 = 1 PAUSE 1000 PORTB.0 = 0 PORTB.0 = 0 Goto MAIN end


				
				
				
				
			

Bookmarks