The only change is that the counter has an extra check to reset when the value of the count variable is greater than 9 (the counter range is 0 to 9).ġ1 output : out std_logic_vector((n−1) downto 0)ġ8 variable count : unsigned((n−1) downto 0) ![]() The VHDL for a simple BCD counter is given in the following listing. ![]() The VHDL for a BCD counter is very similar to that of a basic binary counter except that the maximum value is 10 (hexadecimal A) instead of 15 (hexadecimal F). This counter is often used for decimal displays and other human interface hardware. The BCD (Binary Coded Decimal) counter is simply a counter that resets when the decimal value 10 is reached instead of the normal 15 for a 4-bit binary counter.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |