Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
14 bit binary vs 4 bit BCD?
Archive: 6 posts
I have a score display I want to implement, and I am currently using a BCD setup and representing each individual digit in my number separately. I need the number to go all the way up to ten thousand. This works pretty well for my purposes. It would be a lot easier where calculations are concerned to use a 14 bit binary number because I wouldn't have to deal with rollover, or isolating sets of bits for addition and subtraction. The problem is representing that in a human readable decimal display. In my tiny little brain, this seems to require an insane amount of wiring and setup that I would rather avoid. Does anyone know a relatively easy, and thermo friendly, way to do this? | 2011-02-26 03:41:00 Author: tdarb Posts: 689 |
You can do it for under a segment of themo, but it's not easy. You need a chip to split the binary number into BCD, then use your existing display on the resulting BCD. The good news is once you have the right part and learn the wiring pattern, creating a binary to BCD decoder for any width of bits is fairly straight forward. Do a search for a level "double dabble" - though it can be implemented in a much more thermo friendly way than that, but it gets the basic pattern and the logic is easy to follow. | 2011-02-26 08:41:00 Author: Tygers Posts: 114 |
Thanks. I'm looking at that now, but I'm not quite sure how to implement it. I get the shift check the sum, and add 3 part. I found this PDf that explains it decently enough and provides a basic diagram that I am using http://people.ee.duke.edu/~dwyer/courses/ece52/Binary_to_BCD_Converter.pdf The problem I am having is figuring out, how to make this happen one shot without adding latency. I can check for greater than 5 and add 3 without a problem. After it adds 3, it is saying "oh now it's 8 so lets add again". I don't want that do I? | 2011-02-26 19:08:00 Author: tdarb Posts: 689 |
The trick is you replicate it and hook a bunch of them up. Check out this link (http://www.johnloomis.org/ece314/notes/devices/binary_to_BCD/bin_to_bcd.html), it's how I learned to do it. Edit: Oh I see, same thing different link. Well that should lay it out... The compare to 5 and add 3 is what's labelled a "C" in that diagram. Just put that in a chip, label it C if you wish, and wire a bunch of them up like they show. The flow is always in one direction, it never feeds back on itself. | 2011-02-26 21:03:00 Author: Tygers Posts: 114 |
yay!! thanks. That was exactly what I was doing. I was trying to make the values persistent instead of just modifying the live values being fed in and outputting that. Now I just need to modify it to work with a 14 bit register instead of the 7 I was testing with. I'm a little unsure about the diagram. Do I tack on a new output bit inserting a new chip every fourth level, and then just keep going until the first bit is the only one not passed through the sequence? | 2011-02-26 23:25:00 Author: tdarb Posts: 689 |
woohoo!!! Got it!!!! Thanks a ton to you, and everyone that helped me along the way trying to build this (in my other thread too). It is not exactly light on the thermo, but it works really well. The 50 pieces of holo probably don't help. 0 latency and it allows me to use pure binary calculations while maintaining human readability. | 2011-02-27 01:22:00 Author: tdarb Posts: 689 |
LBPCentral Archive Statistics
Posts: 1077139
Threads: 69970
Members: 9661
Archive-Date: 2019-01-19
Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.