Using 4 I/O lines as Binary Outputs
KraZe_EyE
Posts: 15
Hello,
I haven't used these fourms in a while because I haven't played with my stamp in a while.
Anyways for my digital class I am doing things a little differently and need you guys help on something.
I'm using an external memory chip that stores 1024 4 bit binary numbers selectable via a 4 address pins.
I am using a keypad to select memory locations 1-9; I dont need anymore then that. And, yes I could store them in the stamp but I need to use this chip.
My question is If i select memory location, say 3 (0011) how do I 'break apart' the binary number into sections, 0 - 0 - 1 - 1, to be outputted on 4 output pins? Also how do I do the reverse; read 4 IO pins and then store that number as a whole binary number?
Stamp IO | Address of Memory
IO 1
A
IO 2
B
IO 3
C
IO 4
D
I haven't started to code yet so don't ask for my program
Post Edited (KraZe_EyE) : 11/10/2008 8:40:19 PM GMT
I haven't used these fourms in a while because I haven't played with my stamp in a while.
Anyways for my digital class I am doing things a little differently and need you guys help on something.
I'm using an external memory chip that stores 1024 4 bit binary numbers selectable via a 4 address pins.
I am using a keypad to select memory locations 1-9; I dont need anymore then that. And, yes I could store them in the stamp but I need to use this chip.
My question is If i select memory location, say 3 (0011) how do I 'break apart' the binary number into sections, 0 - 0 - 1 - 1, to be outputted on 4 output pins? Also how do I do the reverse; read 4 IO pins and then store that number as a whole binary number?
Stamp IO | Address of Memory
IO 1
A
IO 2
B
IO 3
C
IO 4
D
I haven't started to code yet so don't ask for my program
Post Edited (KraZe_EyE) : 11/10/2008 8:40:19 PM GMT
Comments
Solution!?! Disconnect my stamps power supply and connect Vdd to the 5v rail of my breadboard and Vss to the ground rail? Power supply is rated 5v @ 5A.
connect Vdd to the 5v rail of my breadboard and Vss to the ground rail?
Power supply is rated 5v @ 5A.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i
IF AND ONLY IF:
1. You connect the Vss of the BS2 to the ground of the logic board.
2. You don't connect the Vdd of the BS2 to the +5 of the logic board.
When you do this, the logic signals from the BS2 will be referenced to its Vss.
Since you've connected Vss to the logic board ground, this will insure those signals are ALSO referenced to
the logic board ground, and will be able to drive the chips.
Other alternatives are as Carl has said: Leave Vin unconnected, and connect the BS2 Vdd to the logic board +5 supply,
and of course the BS2 Vss to the logic board ground. With 5 amps to play with, this would be a more typical scenario.
Note you MUST NOT connect more than +5 volts to the BS2 Vdd pin, or you risk destroying the BS2.
Note the BS2 also has a 'brown-out reset' circuit, which will reset the BS2 if the +5 volts falls too low.