Allen Mahurin wrote: > I have a program that's supposed to multiplex some > characters across 5 7-segment displays for about a > second, change to another set of characters for about > a second, go blank for another second, then repeat. > What my program *actually* does is show the first set > of characters and briefly flicker about every second > or two. It's like it's resetting itself, and never > gets to the second set of characters. I'd like to use > TMR0 for the 1 second intervals, but didn't fully > understand how to implement it, so I'm using the > variable loops. Do I have an unintentional reset? Only from the WDT enabled. __CONFIG _CP_OFF & _WDT_ON & _PWRTE_ON & _XT_OSC Try... __CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC This type of code is not recommended... movwf PortB ; Now, display the new digit bsf PortB,0x07 ; Enable the first display call Delay1 ; Brief pause Try... movwf PortB ; Now, display the new digit goto $ + 1 ; equals 2 NOP's bsf PortB,0x07 ; Enable the first display call Delay1 ; Brief pause This is probably your code problem... Show1: decfsz Inner ; Decrement Inner loop goto First1 ; Z = 1, enter display routine decfsz Outer ; Z = 0, decrement the Outer loop goto First1 Try.... Show1: decfsz Inner ; Decrement Inner loop goto First1 ; Z = 1, enter display routine movlw 0x02 ; Reset the Inner loop movwf Inner decfsz Outer ; Z = 0, decrement the Outer loop goto First1 In your code, [Inner] never gets reset, so it keeps decrementing to 0xFF, 0xFE etc. Same for the [Show2:] code lines. -- Best regards Tony mICros http://www.bubblesoftonline.com mailto:sales@bubblesoftonline.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body