- Joined
- Jan 22, 2008
- Messages
- 53,397
- Helped
- 14,797
- Reputation
- 29,883
- Reaction score
- 14,349
- Trophy points
- 1,393
- Location
- Bochum, Germany
- Activity points
- 302,263
Code:
void main ()
{
InitI2c();
StartI2c();
ACK = write_i2c(unsigned char DS1307_SECONDS);;
}
No type cast needed for DS1307_SECONDS. The correct type cast syntax would be
Code:
write_i2c((unsigned char) DS1307_SECONDS);
write_i2c() might need a delay to keep I2C timing, depending on the processor speed.