bianchi77
Advanced Member level 4
- Joined
- Jun 11, 2009
- Messages
- 1,313
- Helped
- 21
- Reputation
- 44
- Reaction score
- 20
- Trophy points
- 1,318
- Location
- California
- Activity points
- 9,442
Hello guys,
Do you guys have experience with DS1307 and PIC 16F877A ?
I 'm using Hitech C and I can't use the example from compiler....
I stack with :
when I call
sec=read_ds1307(0); // read second
Got error :
I put
already
Is there something I miss here ?
Any ideas or links will be very appreciated,
Thanks
Do you guys have experience with DS1307 and PIC 16F877A ?
I 'm using Hitech C and I can't use the example from compiler....
I stack with :
Code:
unsigned short read_ds1307(unsigned short address)
{
//unsigned short dataa;
I2C_Start();
I2C_Wr(0xd0); //address 0x68 followed by direction bit (0 for write, 1 for read) 0x68 followed by 0 --> 0xD0
I2C_Wr(address);
I2C_Repeated_Start();
I2C_Wr(0xd1); //0x68 followed by 1 --> 0xD1
dataa=I2C1_Rd(0);
I2C1_Stop();
return(dataa);
}
when I call
sec=read_ds1307(0); // read second
Got error :
Code:
Error [500] ; 0. undefined symbols:
_I2C1_Stop(LCD16X2Display.obj) _I2C1_Rd(LCD16X2Display.obj) _I2C1_Wr(LCD16X2Display.obj) _I2C1_Start(LCD16X2Display.obj) _I2C1_Repeated_Start(LCD16X2Display.obj)
I put
Code:
#include "i2c.c"
Is there something I miss here ?
Any ideas or links will be very appreciated,
Thanks