On Thu, 30 Apr 1998 07:37:17 -0700 Andre Abelian writes: >Hi to all engineers. > >I am working on project based on multiplex display, keypad, and DAC. >Every thing is fine except one thing. I want to add blinking led like >when you hit >enter the led will blink plus it will display what you want. right now >when I hit >enter led will turn on in same loop when I add delay after led like Since you are already scanning the display at a constant rate, it is easy to make some or all digits blink. Add a RAM counter that increments every time you finish scanning the display (scan the last digit) and just rolls over freely. When a certain bit in the counter is set (which one to use depends on how rapid the blinking should be), blank off the digits that should blink. Blanking them off means that when their time to scan comes up, ignore the value that should be displayed and write all ones or zeros for the segment data so the segements are all off. Using a bit in a binary counter means the display will blink on and off at 50% duty. For example if the display scans at 50 Hz and you use bit 4 of the counter, the blinking will be on for 320 ms and off for 320 ms. If you use the LSB, which is incrementing very fast, you can get a "dim" effect (blanked every other scan) which may be useful as well. Set up other bits in RAM to indicate which digits should blink. If you just want the whole display to blink like a clock that has not been set, then only one bit is required. The main program would set or clear the blinking flags as needed. The display will start and stop blinking "in the background". If you're talking about discrete LEDs, you can also control and time the blinking of them with the display multiplexing routine. They can have their own port pins or be connected in the multiplexed array (7 or 8 discrete LEDs connected like the segments in another digit). _____________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com Or call Juno at (800) 654-JUNO [654-5866]