Vlad wrote : > I'm using a 16f84a to multiplex two common cathode 7-segment displays > connected to PORTB pins 0-6. > > Now, I also have momentary pushbutton switches connected to > PORTA pins 2-3,... 1. Use an timer ISR to update the displays regulary. 2. Use the "main" loop to check the keys. (3. And use a "better" PIC...) That way, you will get the same brightness whatever the PIC is doing in it's main loop... Jan-Erik. > > > the main loop looks this: > > main call display_led > call check_button > goto main > > > The check_button routine looks like this > > check_button btfss PORTA,2 > return > call delay ;deboune (sleep 5ms) > btfss PORTA,2 > return > call do_something ;do_something is just > ;a few clock cycles > return > > > Is my hardware/software design flawed? What can I do to process user > input quickly while preventing any dimming on the LEDs? This seems > like a common thing and have follwed the wonderful suggestions on this > list. I can provide more information like pictures and complete code, > but I just wanted to feel this out and see if my problem is perhaps > simply design related > > > Thanks! > -v > > -- > 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 > Jan-Erik Svderholm S:t Anna Data tel : +46 121 42161 mob : +46 70 5241690 -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.