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
And the OSC value set to 20Code:@ __config _HS_OSC & _WDT_ON & _LVP_OFF & _CP_OFF
I swapped the PIC for an 18F4580, changed the OSC value to 48 and the config settings to
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.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
Why is life so difficult.... !




Bookmarks