measure the xtal


Results 1 to 12 of 12

Threaded View

  1. #1
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302

    Default measure the xtal

    I want to use timer0 in order to see in the LCD the frequency of crystal (internal clock). Or external on RA4
    But I do not know how I begin.
    I want use it , for measure xtal.

    Code:
        ' 16F877A
        
       	DEFINE LCD_DREG	PORTD	      ' Selection of the port D
        DEFINE LCD_DBIT 4	          ' Selection one RD4 with RD7
        DEFINE LCD_RSREG PORTD	      ' RS on port D
        DEFINE LCD_RSBIT 2	          
        DEFINE LCD_EREG	PORTD         ' E on port D
        DEFINE LCD_EBIT 3	         
        DEFINE LCD_BITS 4		      ' Mode 4 bits
        DEFINE LCD_LINES 2	          ' 2 lines
          
        DEFINE OSC 4
           
        OPTION_REG = %00001000  
        
    start:
    
        LCDOUT $FE,1,#TMR0
        
        goto start
    Last edited by savnik; - 7th June 2007 at 16:08.

Similar Threads

  1. 16F877A with 20MHz XTAL not working?
    By ustredna in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 19th August 2011, 15:04
  2. Xtal speed vs PIC power
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th January 2010, 19:55
  3. Using CCP1 and CCP2 to measure instant fuel consumption
    By srspinho in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 20th September 2008, 15:50
  4. How can I measure Duty cycle ?
    By MaxiBoost in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 28th December 2006, 15:02
  5. using internal xtal
    By jojokatada in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd April 2005, 16:25

Members who have read this thread : 0

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