Quote Originally Posted by spitfire View Post
Hi all, I am new to PIC's but have been studying electronics for 3 years and work as a technician.

I recently came across this site http://www.melabs.com/resources/articles/ledart.htm
with instruction on how to run 7-segment display, i have built the circuit and programmed the PIC with this code: http://www.melabs.com/resources/samp...p/7segment.pbp
but the numbers run really fast and display 0 runs too fast to read it, I have tried adding a PAUSE 1000 under "mainloop" and just below GOSUB display but it only make the displays flash on and off

I am trying to get them to display a number for atleast 1 second each or atleast make it so i can read digit 0

PS I have tried contacting the site but they never got back to me.

Thanks is advance.
once I get this working and learn a little more I plan on adding push buttons and making it into a stopwatch or either a countdown timer.

Raf

This is the section of code you should try to alter

Code:
display:
	For i = 0 To 3		' Loop through 4 digits
		n = Value Dig i	' Get digit to display
		GoSub display1	' Display the digit
		Pause 1		' Leave it on 1 millisecond
	Next i			' Do next digit
	Return
This displays each digit for 1 millisecond. try increasing the length of the pause.

By adding your Pause 1000 in the main loop you are adding a 1 second delay between counting. The LEDs are only lit during the display subroutine so you have 4mS of display and then a second waiting to the next 4mS.

Try a 25mS delay (PAUSE 25) or longer to make the digits more visible but you may then notice a flicker across the digits.

Try adding another counting loop so that you only increment the 0-9999 count once every "x" passes through the main loop.

HTH

Keith