Confusion with 18F45K80 config, maybe someone has working one?


Results 1 to 10 of 10

Threaded View

  1. #7
    Join Date
    Feb 2013
    Posts
    1,132


    Did you find this post helpful? Yes | No

    Default Re: Confusion with 18F45K80 config, maybe someone has working one?

    Code:
    #CONFIG
      CONFIG  RETEN=ON, INTOSCSEL=HIGH, SOSCSEL=HIGH, XINST=OFF, FOSC=INTIO2, PLLCFG=OFF
    #ENDCONFIG
    
    'then later you can change it
    OSCCON = $70     ' IRFC[2:0] = 111 (16MHz), SCS[1:0] = 00 (primary CONFIG osc setting)
    ' set PLLEN (optional, 4x16MHz=64MHz)
    OSCTUNE.6 = 1
    DEFINE OSC 16
    'ANSELE=%00000000 'enable adc input porte.2
    'ANSELA=%00000010 'disable ADC on A
    'ANSELB=%00000000 'disable ADC on B
    'ANSELD=%00000000 'disable ADC on D
    ANCON1=0 'DISABLE ADC D3-D2-D1-D0-
    TRISC=%00000000 'set PORTC as output all           0.
    
    TRISD=%00000000 'set PORTD as output all
    TRISB=%00000000 'set PORTB as output all
    TRISA=%00000000 'set PORTA 2 as input, others as output
    TRISE=%0000000  'set PORTE as output all
    
    
    GKO:
    HIGH PORTd.0
    PAUSE 2000
    LOW PORTd.0
    PAUSE 2000
    GOTO GKO
    Still does not work. In this example, PORTD.0 measures 2.5 volt and does not change.
    same to any other port.
    Last edited by CuriousOne; - 13th October 2022 at 09:09.

Similar Threads

  1. RS-232 confusion
    By Christopher4187 in forum General
    Replies: 11
    Last Post: - 17th March 2015, 15:16
  2. Servo confusion
    By Ramius in forum General
    Replies: 3
    Last Post: - 28th May 2012, 00:41
  3. setting config fuses not working
    By queenidog in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 23rd April 2012, 14:30
  4. HPWM confusion
    By lerameur in forum General
    Replies: 12
    Last Post: - 5th November 2006, 10:09
  5. HPWM confusion
    By rossfree in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 3rd November 2005, 16:50

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