I am newbie to embedded programming. My problem is I can write and read data to ds1307(by saying using I2C debugger). But my received data on LCD showing 0xE1 constantly for every changing second. Is it I2C debugger showing wrong data as reading data? Or my conversion is wrong, if it so, my data should change but it doesn't. I'm stuck here so hard.please comment where did I go wrong.
Ok firstly calm down, everything has an answer. you say you read and write data from real time counter by I2C debugger but can not by microcontroller; MCU stands between LCD and RTC right? and there is alternate read/write path to RTC, either MCU can access it, either I2C debugger is that right? so from all this i assume you have some kind of Development board with RTC,MCU,LCD, and a I2C debugger.
first, always try to think of these electronic components as tiny micro cities. they all live by their own separate lives and communicate to each other by wires just as buses are used to connect cities to each other. if RTC responds to I2C debugger we can assume that RTC is powered and feels ok.
but LCD shows frozen values. you are not sure is this because MCU could not communicate to RTC... or because MCU can communicate with RTC but MCU fails to pass this data to LCD. so there are 2 joints, either MCU->RTC is dead or MCU->LCD is in wrong format. firstly try to send couple of things to LCD. something, does not matter what. Hello world or something. if it shows well, then problem is certainly with MCU->RTC communication.