beast_boy
Junior Member level 1
I am trying to write the VHDL code for a Timing Genarator Chip :
in the VHDL code i have to incorporate a code for the 16 Bit BCD(Binary Coded Decimal) Counter i.e. 4 Decades , i tried a lot but unable to figure it out how to get it working...
as the 16 bit BCD counter can count from 0 to 9999 ,for the first 9 clock pulses i can easily create a counter as i will use the last your bits out of 16 bits for the count but for counting 10 i have to make the bits from 7 to 4 as BCD one and the last four bits as 0 (0000) , for counting eleven the bits from 7 to 4 should make a BCD one (0001) and the last four bits as (0001) and so on it will continue its count.....
can someone give me a hint how can i do it or if possible a small piece of working C or VHDL code for this.....as i also searched on net but everyone has written code for 4 bit BCD counter that can count from 0 to 9 only...
in the VHDL code i have to incorporate a code for the 16 Bit BCD(Binary Coded Decimal) Counter i.e. 4 Decades , i tried a lot but unable to figure it out how to get it working...
as the 16 bit BCD counter can count from 0 to 9999 ,for the first 9 clock pulses i can easily create a counter as i will use the last your bits out of 16 bits for the count but for counting 10 i have to make the bits from 7 to 4 as BCD one and the last four bits as 0 (0000) , for counting eleven the bits from 7 to 4 should make a BCD one (0001) and the last four bits as (0001) and so on it will continue its count.....
can someone give me a hint how can i do it or if possible a small piece of working C or VHDL code for this.....as i also searched on net but everyone has written code for 4 bit BCD counter that can count from 0 to 9 only...