4 Push Buttons
Archiver
Posts: 46,084
Hello Stamp Programmers:
I am working on a system that use N O Push buttons active low. Can anyone
tell me if it is possible to convert
the indications to DEC. instead of Binary. For example what I have now is
1111 I would like to display this information
in DEC 0,1,2,3 and on the same line like binary. I am using The BS2E
Chip. I would appreciate any information
you can give me with sample code.
Harry.
E-mail HR518@ Juno.Com
I am working on a system that use N O Push buttons active low. Can anyone
tell me if it is possible to convert
the indications to DEC. instead of Binary. For example what I have now is
1111 I would like to display this information
in DEC 0,1,2,3 and on the same line like binary. I am using The BS2E
Chip. I would appreciate any information
you can give me with sample code.
Harry.
E-mail HR518@ Juno.Com
Comments
writes:
> I am working on a system that use N O Push buttons active low. Can anyone
> tell me if it is possible to convert
>
> the indications to DEC. instead of Binary. For example what I have now is
> 1111 I would like to display this information
>
> in DEC 0,1,2,3 and on the same line like binary. I am using The BS2E
> Chip. I would appreciate any information
>
>
Don't really understand what yiu want - if you want a "2" displayed if you
push button 2, then
If in0 = 1 then but2
but2:
serout 16, N9600, [noparse][[/noparse]"2", cr]
goto start
Something like that, perhaps?
Sid Weaver
W4EKQ
Port Richey, FL
[noparse][[/noparse]Non-text portions of this message have been removed]
DEBUG DEC buttons.Bit3 * 4
DEBUG DEC buttons.Bit2 * 3
DEBUG DEC buttons.Bit1 * 2
DEBUG DEC buttons.Bit0 * 1
Each position will display 0 or its position value.
-- Jon Williams
-- Parallax
In a message dated 12/8/2002 3:27:33 PM Central Standard Time, HR518@J...
writes:
> Hello Stamp Programmers:
>
> I am working on a system that use N O Push buttons active low. Can anyone
> tell me if it is possible to convert
>
> the indications to DEC. instead of Binary. For example what I have now is
> 1111 I would like to display this information
>
> in DEC 0,1,2,3 and on the same line like binary. I am using The BS2E
> Chip. I would appreciate any information
>
> you can give me with sample code.
>
> Harry.
[noparse][[/noparse]Non-text portions of this message have been removed]
Thanks for The information on the Push Buttons.
You are tops in my Book.
Harry
12/10/02