Mosaic
Well-Known Member
Here is a complete Proteus sim with asm code running a number of useful routines.
1) A simple debouncer in asm, easily understood, not as eff. as a parallel debouncer.
2) Binary to decimal conversion for counting.
3) 7 segment lookup table to display digits.
4) Shift register serial data transfer with column select and strobe for each digit.
5) ASM delay in main loop to effect a precise strobe time, as opposed to an interrupt.
6) Sampling of a couple tactile switches.
Almost every line is commented.
I used a 16f886 which I find to be a very flexible chip, although there are better ones now.
Clicking Sw1 counts up, Sw2 reset the count.
You can swap in other Shift registers, just keep track of the pinouts as they are not necessarily pin for pin replacements. The TPIC6C595 Shift reg. packs a lot more power and can drive LEDS quite bright which is necessary when strobing for best effect.
Change the 'bin' extension to DSN to use in Proteus.
1) A simple debouncer in asm, easily understood, not as eff. as a parallel debouncer.
2) Binary to decimal conversion for counting.
3) 7 segment lookup table to display digits.
4) Shift register serial data transfer with column select and strobe for each digit.
5) ASM delay in main loop to effect a precise strobe time, as opposed to an interrupt.
6) Sampling of a couple tactile switches.
Almost every line is commented.
I used a 16f886 which I find to be a very flexible chip, although there are better ones now.
Clicking Sw1 counts up, Sw2 reset the count.
You can swap in other Shift registers, just keep track of the pinouts as they are not necessarily pin for pin replacements. The TPIC6C595 Shift reg. packs a lot more power and can drive LEDS quite bright which is necessary when strobing for best effect.
Change the 'bin' extension to DSN to use in Proteus.