azarutz
Member level 2
- Joined
- Mar 4, 2012
- Messages
- 42
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 1,288
- Location
- India
- Activity points
- 1,579
Hi i am writting program for rtc (ds 1307) to display it in lcd using pic 16f877a controller .i read ds 1307 datasheet it stated that if we want to write in timekeeper register then we should give BCD value . 50 sec in dec is written as 01010000 in bcd so it requires 8 free bit in a register to update but in sec register it has one clock halt bit(CH),three bit for 10 seconds and four bit for secondas i couldn't understand the conversion please help me. I attached timekeeper register of 1307 .
and in pic i2c programming there is a i2c wait routine every time we start and stop we wait some time to get the bus if it free . i dono what i put in wait routine .is whether i put some approximate delay like 10ms or any flag bit till it clear . i searched some code and i didn't understand what actually they did for wait routine.please help me to clear my doubt.
and in pic i2c programming there is a i2c wait routine every time we start and stop we wait some time to get the bus if it free . i dono what i put in wait routine .is whether i put some approximate delay like 10ms or any flag bit till it clear . i searched some code and i didn't understand what actually they did for wait routine.please help me to clear my doubt.