7-segment display with P16F84


Results 1 to 17 of 17

Threaded View

  1. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    967


    Did you find this post helpful? Yes | No

    Default

    Code:
    i	Var	Byte
    n	Var	Byte
    Value	Var	Word
    
    
    	TRISB = $80		' Set segment pins to output
    	TRISA = $f0		' Set digit pins to output
    
    mainloop:
    	For Value = 0 To 9999
    		GoSub display	' Display the value
    	Next Value
    	
    	GoTo mainloop		' Do it forever
    You need to modify this patch to something like this
    Code:
    i	Var	Byte
    n	Var	Byte
    Value	Var	Word
    timedelay      var        word
    
    	TRISB = $80		' Set segment pins to output
    	TRISA = $f0		' Set digit pins to output
    
    mainloop:
    	For Value = 0 To 9999
                    for timedelay = 0 to 2000
    		GoSub display	' Display the value
                    next
    	Next Value
    	
    	GoTo mainloop		' Do it forever
    The value you choose for the timedelay will help you persist a value for as long as you choose.

    Jerson
    Last edited by Jerson; - 9th July 2007 at 13:02.

Similar Threads

  1. 7 Segment Displays and MAX7219
    By Bill Legge in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 31st October 2010, 18:30
  2. Weird compile issue 7 segment LED display
    By George in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st June 2006, 02:12
  3. 7 segment digit problem (using Mister E's code)
    By jmgelba in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 9th September 2005, 20:25
  4. WRITE not working
    By servo260 in forum mel PIC BASIC Pro
    Replies: 31
    Last Post: - 29th December 2004, 02:02
  5. Multiplex two 7 segment display
    By Fernando Santos in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 20th July 2003, 13:26

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts