EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / hi nagalaxmi…..,try this

hi nagalaxmi…..,try this

|

Microcontroller › 8051 › RTC DS1307 interfacing with 8051 in C using I2C……. › hi nagalaxmi…..,try this

March 22, 2013 at 5:03 am #9361
Arun Sukumaran
Participant

hi nagalaxmi…..,

try this code…. it is easy….

 

 

unsigned char x,y;
//hour
                c=read_i2c(0xd0,0x02);
x= c & 0x0F;
x=x |’0′;
 
                        y= c & 0xF0;
y=y>>4;
y=y | ‘0’;
write_lcd(y);
write_lcd(x);
 
                        write_lcd(‘:’);

RSS Recent Posts

  • Pic18f25q10 osccon1 settings swordfish basic July 18, 2025
  • Sump pit water alarm - Kicad 9 July 18, 2025
  • Anyone jumped from Easyeda std to Easyeda pro? July 17, 2025
  • turbo jet fan - feedback appreciated. July 17, 2025
  • More fun with ws2812 this time XC8 and CLC July 17, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise