THIS IS A RE-POST.
I first uploaded this post about 2 months ago but received no replies.
Had plenty of views but no replies.
I have been away for a month with my family and am now ready to tackle this problem again.
ORIGINAL POST FOLLOWS.Good afternoon every one.
For a couple of weeks now I have been trying to download a workable code for PIC16F877A and LCD to set and display a DS1307 RTC.
I'm using PIC16F877A because that is what I have.
Not working at it full time.
I am using MPLAB and am still basically a beginner.
A lot of code on line is written in micro C or some other language called ASSY. Actually I know what ASSY is but I don't want to learn that as well as C.
I use MPLAB because it works with PicKit 3
I use Pickit 3 Because it works with MPLAB,
I use PIC's because they work with MPLAB and Pickit 3
if you get the way I've drifted so far. Quote Henry Blake (M*A*S*H)
I managed to find some code written in MPLAB C and looked like it might get me started.
I downloaded the code that included i2c.h RTC.h & RTC.C
I added my own LCD Display Code.
As can be seen i2c.h has Processor: PIC32MX
Does that mean this version is no good for PIC16F877A or just has some features that are not available in PIC16F877A but should still work.
Where can I find the file i2c_legacy
I'm not sure where I found the code.
I have tried to find it again to add links to this post but it eludes me for now.
i2c.h has
/*******************************************************************************
FileName: i2c.h
Processor: PIC32MX
Compiler: Microchip MPLAB XC32 v1.00 or higher
Copyright © 2008-2009 released Microchip Technology Inc. All rights
reserved.
*/
#ifndef _I2C_H_
#define _I2C_H_
#include <xc.h>
#include <GenericTypeDefs.h>
#ifndef _PLIB_DISABLE_LEGACY
#include <peripheral/legacy/i2c_legacy.h> // Legacy definitions, do not use
#endif
RTC.h has
/*
* File: RTC.h
* Author: B.BINDU
* ST Number: 206017553
* Created on 03 May 2013, 1:26 PM
*/
#include <xc.h>
RTC.C has
/*
* File: RTC.c
* Author: Student Companion SA:
www.studentcompanion.co.za * Real Time Clock Using DS1307 on I2C Bus
* To simulate in Proteus, The I2C debugger must be connected on the I2C Bus.
*/
#include <xc.h>
#include "LCD_PORTS_V2.h" // my own LCD Display code
#include "RTC.h"
#include <stdio.h>
#include <stdlib.h>
#include "i2c.h"
I am unable to find i2c_legacy.h online.
I have tried to find it in MPLABs download site but nothing obvious comes up.
If anyone can help me out It would be appreciated.
Thank you.
BILL.