18F4580 settings


Results 1 to 16 of 16

Threaded View

  1. #4
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Bruce, to be honest I don't have the understanding of these devices to really appreciate the info in that INC file...

    Here's my logic... for what its worth.

    The attached code works with a DS1307 module when using a 16F877A with just two small changes, namely the config settings are set to
    Code:
    @   __config _HS_OSC & _WDT_ON & _LVP_OFF & _CP_OFF
    And the OSC value set to 20

    I swapped the PIC for an 18F4580, changed the OSC value to 48 and the config settings to
    Code:
    ASM 
    ;  __CONFIG    CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L
    ;  __CONFIG    _CONFIG1H, _FOSC_HSPLL_HS_1H
      __CONFIG    _CONFIG2L, _PWRT_ON_2L  
      __CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
      __CONFIG    _CONFIG3H, _PBADEN_OFF_3H
      __CONFIG    _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
    ENDASM
    It compiles with no errors, loads into the PIC, but the LCD is blank. Both chips used RC3 and RC4 for the Ic2 (SCL and SDA) and I've tried changing OSC to 20 instead of 48 but it still fails to display anything (even garbage) on the LCD.

    Why is life so difficult.... !
    Attached Files Attached Files
    Last edited by malc-c; - 26th March 2010 at 21:50.

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