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

  • getting no where fast 8 x 8 led matrix January 23, 2026
  • Expensive hobby January 23, 2026
  • analog logic of shmidt trigger bjt circuit January 22, 2026
  • Micro mouse January 22, 2026
  • Best practices for accurate LiPo battery monitoring on ESP32? January 22, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 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