I want to use a cd4040 (or similar... see attached image for pin description)
to pilot the address of an eeprom.
The eeprom will be programmed with a certain type of signal and output it with using a parallel port to a DAC converter to generate the signal I need. I use parallel port to increase the speed of the conversion. I will then drive the cd4040 using PIC to change frequency.
However, I have a problem understanding the 4040. I need only the counter to fold back to 0 after getting to 255. That means I need 8bit and not 12bit.. how do I ensure that the counter automatically reset when it is at 256?
I you are sure that the eeprom signal levels are compatible with the CD4040 and the speed suits you. Just use the first 8 bits. (9.7,6.5,3,2,4,13). There is no need to do anything else. Just ignore the remaining outputs.
An eight bit counter can only count to 255 then will return to zero and start again. It will not stop counting unless you stop the clock or keep reset high.
To understand this write in a paper the counting sequence of a 4 bit counter (that will count from 0 to 15 and the start again). And look what happens with the 2 or 3 bits of lower order.
Going back to the 4040 when the first 8 bits rollover from 255 to 0 they will increment the next bits by one. so the total count will be 256. The 2nd time the first 8 bits rollover will increment the next bits again and the total count will be 512. An so on. But the lower 8 bits will count from 0 to 255 forever.
Hope that I am not confusing you more with my explanation.
Well. Now I am confused. The counter will go from 255 to zero in its natural count. There is no need to reset it. I suppose that you want to generate a waveform by going thru all the address of the eeprom that works as a 256 byte lookup table. If you store one complete period the only thing you need to do is clock the 4040 at 256*required frequency to get a periodic wave.
Unless you want to generate a single shot wave there is no need to do anything else. In that case you should gate the clock to stop the counter.