Doubts with 18LF6720


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Dec 2006
    Location
    Brasil, Sao Paulo, Campinas
    Posts
    54

    Default Doubts with 18LF6720

    I need help with 18LF6720, because my project works only when the 19 and 20 pins (AVDD and AVSS) are without conection. I do not using analog features in my circuit.
    I would like also a sample of configuration fuses and basic registers (most important as CMCON, ADCON1...) to analyze.
    Somebody has know how about 18LF6720, a program sample to help me?

    Thanks

    Pimentel

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    This is part of my header


    Code:
                                                                      
    	    DEFINE OSC 40
                                                                                    ' Set for 40Mhz operation
            DEFINE NO_CLRWDT 1
            DEFINE _18F8722 1
           
            DEFINE HSER_RCSTA1 90H
            DEFINE HSER_TXSTA1 24H
    
            DEFINE HSER_RCSTA2 90H
            DEFINE HSER_TXSTA2 24H
    
            DEFINE HSER_CLROERR 1
            DEFINE HSER2_CLROERR 1
    
            DEFINE CCP1_REG PORTC
            DEFINE CCP1_BIT 2
            DEFINE LOADER_USED 1                                                    ' Bootloader
            Define USE_LFSR 1
            DEFINE ADC_BITS 12
            DEFINE ADC_CLOCK 6
            DEFINE ADC_SAMPLEUS 8
            DEFINE Pulsin_MAX 18000
            DEFINE I2C_SLOW 1
            
    
        
           
            TRISA  = %11111111              '
            TRISB  = %00111111              '
            TRISC  = %10111111              ' 
            TRISD  = %01100111              ' 
            TRISE  = %11111111              '
            TRISF  = %11111111              '
            TRISG  = %00000100              '
            TRISH  = %00111111              ' 
            TRISJ  = %00011100              '
           
    
            ADCON2 = %10000110              ' Right justify 10 bit output, Clock = Fosc/64
            ADCON1 = %00010101              ' Set Vref on RA3, 9 chan A/D  (AN0-AN8)
            ADCON0 = %00000001              
    
            PSPCON = %00000000              ' No PSP
            MEMCON = %10000000              ' No External Memory
            CMCON  = %00000111              ' No Comparator used, turn it off
                          
            T0CON  = %10001000              ' Timer0 ON, no prescaler 100nSec/Count
          
            CCPR1L = %00010000
            CCPR1H = %00000000              ' Initialize to 0, PWM register
          
            PR2    = $7F                    ' PWM register,78 Khz@40Mhz, 9 bits
            
            T2CON  = %00000100
    Charles Linquist

  3. #3
    Join Date
    Dec 2006
    Location
    Brasil, Sao Paulo, Campinas
    Posts
    54


    Did you find this post helpful? Yes | No

    Thumbs up AVSS and AVDD -18LF6720

    Thanks Charles,

    I will to study it. Maybe my problem is ADCON2. I go to read the datasheet again for more details. Thanks again.
    And about pins 19 and 20. Do you now if is necessary to conect to VDD and VSS with analog features disable (all pins as diigital I/O)?

    Pimentel

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    ALL Vdd, Vss (or relabelled of) available HAVE to be connected, unless, you run into problem, that's for sure. You can even blow your chip... yup, life is cruel sometimes
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. 18LF6720 Datasheet ???
    By Darrel Taylor in forum Off Topic
    Replies: 3
    Last Post: - 13th August 2007, 23:51
  2. help with fan controller X10
    By iova in forum General
    Replies: 2
    Last Post: - 11th August 2006, 00:37

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