![]() That's a "small" amount of memory for a modest modern microcontroller. Even if you ended up using 32 bits per table entry for convenience, that's still only 1024 bytes of program memory. That would require a minimum of 21 bits per table entry. Or, the table could even result in the 7-segment values for each digit directly. That means a 8-bit in 10-bit out lookup table solves this problem very simply. Since the highest digit can only be 0,1,2, you actually only need 2 bits for its BCD value. The lookup table could result in the 4-bit BCD values for each digit. Since you only have 256 possible input values, it doesn't need to be large. One brute force but simple approach is to use a lookup table. In the special case of the input value only being 0-255, various shortcuts are possible. ![]() Note that this works regardless of how large the original number is. The remainder from each division are the digit values in least to most significant order. I think I see a wiring mess around your three gates - you should look closely there. ![]() One way to generate decimal digits is to keep dividing a number by 10. But I dont use Multisim and cant help there, much. While it is possible to string together enough dedicated digital logic chips to achieve what you want, a microcontroller is the simplest solution for most cases. This could be successively, like counting, or outright dividing. ![]() If you want to convert binary to decimal, you're going to have to do a divide in one form or another. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |