Hi Mugel,
IF you have enough ports THEN . . .
MyVar var byte
If PortA.0 != 0 Then
my var = 0
else If portA.1 != 0 then
myvar = 1 . . . . and so on
here is another way using analog inputs
http://www.romanblack.com/keypad.htm
Hi Mugel,
IF you have enough ports THEN . . .
MyVar var byte
If PortA.0 != 0 Then
my var = 0
else If portA.1 != 0 then
myvar = 1 . . . . and so on
here is another way using analog inputs
http://www.romanblack.com/keypad.htm
Last edited by Archangel; - 10th November 2006 at 01:15.
If i'm right, the following may be something to play 'round of
Code:Switch1 Var Byte ' let's say it's connected on PORTB<7:4> Switch2 var Byte ' let's say it's connected on PORTA<4:0> Result var byte start: Switch1=PORTB>>4 Switch2=PORTA & $0F Result=(Switch1*10)+Switch2
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi guys!
thanks for your help, everything works fine for me Pic related of course, haha.
got to measure engine speed, rev limit with two BCD switches AND ignition shutoff while engine stands still to save the coil. WOW never thought this goes that easy, meaning: I am able to build that.
Ok youre right, this is just the lab version on a veroboard with a frequency counter as "test engine". But iīm shure it will work in Reality too because Iīm experienced in spike pested engine electrics
Iīll tell more!
Mugel
Hi Mugel,
Glad you got it working.
If it's not top secret I would like to eyeball that code
JS
Bookmarks