I am still getting my feet wet programming PIC microcontrollers and need help with a project. I would like to build a 4-digit counter using a 16F628. For the oscillator, I would like to use the Internal 4MHz RC. For inputs, I need three push-button switches: Up, Down, and Reset. For output, I need 4 common-cathode 7-segment LED displays. I would like to write code to debounce the switches. This should be a fairly simple project, but at this stage in my PIC experience, it would really help if I could start with someone else's code that works and modify it. To start with, I want to learn to multiplex 4 7-segment LED displays. I know how to write my own code to count from 0-9 on one display, incrementing once per second. Where I am getting stuck is multiplexing 4 displays at once. I have tried the code in AN557, modifying it work with the 16F628. It compiles and partly works. The PORTB outputs go high and low as they should for a one-digit display. PORTA pins remain at ground. So, I can connect the common cathode of one display to ground and it counts up, one digit per second, but only on one display. One problem I am facing is I don't really understand how to use the TMR0 interrupt. If anyone is interesting in helping, I have posted the code at: http://www.patrickrichards.com/picmicro/projects/multiplex7seg/multiplex 7seg.asm. If there is a better way for me to approach this problem, any suggestions would be appreciated. I have searched the PICList Archive and while I do see some code for driving 7-segment displays, I couldn't find any I could easily adapt to my needs. Thanks! -Pat -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics