Search Engine

79 Threads found on Code For ds1307
Hi to all, I am into a project of "programmable timer" using real time clock with ds1307, for that I am working with Pic16f1847 and using Mikroc pro compiler for programming. I am using 16Mhz internal oscillator for clocking the device. I am using PICKIT3 programmer for building the code. My (...)
hi..i am work with RTC ds1307..with PIC18F4520..compiler MikroC..i was connected that keypad ,RTC code is compiling good ...but in Proteus time not display...pls check my code... add my i2c.rar look forward response...
i need c code for rtc ds1307 for pic18f4550
Dear the new code is fetch date and time from ds1307 once every seconds for few ms then display it in 7 segment for the rest of seconds but i notice a very simple blink in 7 segment Why the led that indicate the PM not work ok i connect it to 74595 output as the 7 segment Kindly need help Perhaps your method o
Here is sample code for pic18f by using C18 compiler. Before this, once go through the ds1307 data sheet and pic i2c registers How to start & stop i2c....... void rtc_setTime() { //i2c_Wait(); i2c_start(); i2c_write(0xa2); i2c_write(0x02); i2c_write (0x00) ; //set sec i2c_write( 0x00); //min i2c_write(0x10); //hou (...)
Sir, I m very new using c compiler as mikro-c pro v6.0.1. Please help me with c-code for 7 segment clock using PIC 16F887A & ds1307. My Proteus file as follows. 105919
Hai, now i am doing program for interfacing ds1307 with lpc2148 using I2C communication protocol. i got this code from net but it is not working properly. the output is like 00:00:00 then in next line 00-00-00. i think that program have some minute error please clear that. or else if u have some other program kindly (...)
Hi I have a code for interfacing the ds1307 time IC with pic and LCD the code works fine and it has 3 buttons to adjust the time and other what I want to do is to add 3 buttons to allow user to enter the wake up time and compare it with the real time so that it can start a buzzer when there is a match the problem is (...)
you have many sample codes on
Hello there, I am working on RTC ds1307 using pic18f87k22 controller from few days but i dont know where i go wrong. I search most of the website but didnt get the solution. Here i post my code can you please trace out where are the problems. #include #include void delay(void); signed char ack=0; unsigned char
Year 1989 You can set only 00 to 99 19 set in manually in the source code There is no "19", the year settings refer to 2000 - 2099 and the programmed leap years are for 2000-2099, not 1900-1999
This link will help you to get code interfacing ds1307 with PIC
I want to automate 6 solenoid valve which connected to at89c51 controller and time period for all is different and I am using ds1307 RTC and now I want to Automate that solenoid valve using this rtc. can I automate that pin using rtc? can anyone suggest me logic for c code in keil for this. The time (...)
hello, in your program , you forget the day of the week ! add this variable and treat it in your program.. #define ds1307_ID 0xD0 #define SEC 0x00 #define MIN 0x01 #define HOUR 0x02 #define DOW 0x03 <- Day of week #define DATE 0x04 #define MONTH 0x05 #define YEAR 0x06 example: void ds1307_get_date(void) { I2C
Hello, The above code looks fine. Where is the main file? How are you sending commands to the device? There is no issue with the clock rate. Even you can read the device at 10Kb/s rate. Enjoy!!!
New file attached. Post code of btoa() function. while(1){ readds1307(); Transform_Time(sec, min1, hr, week_day, day, mn, year); Display_Time(sec, min1, hr, week_day, day, mn, year); lastdate_check(day, mn, year, last_date); lastmonth_check(day, mn, year); lastyear_check(day, mn, year); }
Hi Friends, I have written C programme for RTC ds1307 interfacing with at89c51 and just want to see this time in PC Hyper Terminal using RS232. but in hyper terminal I am getting some garbage value. so anyone can say me that what would be error in that program. if anyone want to see code it is in below
Hello Can Anyone Help me to interfacing RTC ds1307(I2C) with 89c51. Is PWM code is needed to give clock to RTC. Please Give me C code if any one have or give me idea to write code step by step. Description: I want to automate 6 valves using RTC Timing and by that time i also want to create files and folder in my (...)
Zip and post MPLAB project files and Proteus file for quick solution. I don't have time to create new projects for every code posted asking help. remove this second while(1); at the end of code. The code stucks execution stucks at 2nd while(1) loop and never comes out.
Thanks Jayanth, yes, I use mikroC Pro, the part of code: char filename = "BROJAC0x.TXT"; // File names // Creates new file and writes some data to it void M_Create_New_File() { filename = '1'; Mmc_Fat_Set_File_Date(2013, 9, 21, 9, 0, 0); // Set file date & time info Mmc_Fat_Assign(&filename, 0xA0); // Find exi
hello, to add a delay of 0,5sec you can use the output 1Hz of ds1307 square forme 0,5sec ON , 0,5sec OFF and link to an unsued input ex : RC2 char temp; While(RC2==0); // wait for rising edge T0CON.TMR0ON = 1; TMR0L = 0; TMR0H = 0; while(PORTCbits.RC2==1); // Wait for 0.5 sec T0CON.TMR0ON = 0; (...)
hi frnds here i have a problem - how data write and read in rtc (ds1304) . micro controller is at89s52 is used... how can i write and read data from ds1307 .? and is there any assembly code for it... thanx..
hello, i have a written code for ds1307 in pic18f46k20 using i2c master mode. i tried a many code .but it not work? can i get proper code to read the second ,minute from ds 1307 and write into ds1307?
Hi, The datasheet for that chip shows the program flow and timing diagrams for communicating with a micro. It used its own serial communications convention so you will have to write all your own Pic communications code. Assembler or C ? The more popular Maxim ds1307 RTC chip uses a standard I2C interface, though you (...)
Hi, Find the attached code files for ds1307 RTC IC and I2C interface for pic18f252. It is written in Hitech PICC. To use change the extensions, headers and include files. Enjoy!
Hello guys, Do you guys have experience with ds1307 and PIC 16F877A ? I 'm using Hitech C and I can't use the example from compiler.... I stack with : unsigned short read_ds1307(unsigned short address) { //unsigned short dataa; I2C_Start(); I2C_Wr(0xd0); //address 0x68 followed by direction bit (0 for write, 1 (...)
Dear all, I have an msp430g2553. please share code example for interfacing ds1307 with mspg2553.i am using code composer studio as IDE.
i need a heip in building c code for displaying RTC value serially using ATMEGA 32 microcontroller . please heip me out as soon as possible
What about use MUX. In that case you need to share time to communicate with ds1307 and SD Card. And you need to have write some code to control the mux depending on the necessity of operation. - - - Updated - - - there is another solution. you can use software driven IIC communication. follow the link: [URL="www.mi
Hi, To solve such problems zip and uplaod code and schematics
hi i am using ds1307 (RTC) with atmega 16 ,complier is code vision avr. i am using proteus simulation software. In my code i need to read the date/time from ds1307 to display in 2x16 lcd. i have given option of time/date change that my problem is start, when i made any change in date/time ,the value (...)
Hello! Please check the attachement and tell me what is wrong with the code. RTC value is not displayed on LCD.
this is my first attempt for I2C and i am experimenting on ds1307 with pic 16f876A. i have written a code just to read seconds on an lcd by displaying the complete byte. i am writing 0 value to the seconds register before while loop so that the oscillator starts. then in while loop i am reading the seconds register(reg0) (...)
Hi, I am here after a serious failure in all my practices done for the interfacing with ds1307 RTC. First of all I would like to tell you that, I have successfully compiled my code in C for AT89C2051 to communicate with ds1307. I have tried it in Proteus VSM and run successfully. But now (...)
hi...i am trying a c code for rtc using pic...almost i have done,i have done all function in i2c....can any one tell that,after sending a data or address, we have to call ack funtion or will call automatically..after sending..below is my code..can any body suggest me.... unsigned char read_ds1307(unsigned char address) { uns
Hi friends, I am doing a Digital Clock using RTC ds1307 and 89C4051 micro controller. Time is displayed on LCD and different alarms can be set through 3 switches. I have written the following code for updating RTC registers first time. Only minutes code is shown //Minutes min++; if((min>15)&&(min<20)) { (...)
Go through these: Hope this helps. Tahmid.
Stop typing in sms style... It may happen due to the delay's in display. Post your schematic and code to find out the exact reason for the problem
what is the code for RTC ds1307 and LPC2148???
excuse me can you learn me how to make source code using modem gsm, avr atmega32 for traffic light controll/remote controll/controlling by wire,i've succes to make source code trafficlight cantrolling usinf I@C ds1307 and now i want to add GSM MODEM best regard
pls. read data sheet before writting code
Hi, Friends My RTC clock with ds1307 and PIC16F877A as a master I2C using 16*2 LCD is working ok now i want an indication of AM/PM in LCD so requested friends that how to write code in Assembly.I have written 0x71 in hour location of ds1307 for 11pm and 12 Hrs mode and read hours are storing in TEMP Resistor and (...)
Buy one copy it will still available with some suppliers. for source code check this link
please my friends I want to change this 8051 bass file into a hex file .. but when I try to always error, I use Bascom 8051 ' -------------------------------- ' alarm1307.BAS 2-10-06 ' Led display with ds1307 rtc chip and max7219-hh:mm:ss ' written by K.S. Sankar India ' for MCS ELECTRONICS - Holland $large $regfile
Hello Everyone, I have been working on this code for a number of weeks and it is still not working. The area of concern is the PIC16877A interface to the RTC ds1307. With the Pic Kit2 debugger hooked up in MPLAB the program gets stuck the second time it enters the WaitMSSP loop waiting for btfss PIR1,SSPIF. When (...)
hi. below is my code for interfacing ds1307 with pic16f877 i am using hi-tech with mplab .i am having an issue that i always get 00:00:00 on time and 00/00/2000 on date no matter what value i initialize the time and date to. this code is part of my fyp and i have been strugling with it for quite a while (...)
Are you looking to use a Real-Time-Clock module to keep the time (for if power is cut to your module)... I2c RTC's are easy to communicate with, I've got some sample code I used on an 877 to start if this is a way you might go... Kind regards NEAL
Hello All i am working on RTC ds1307 and getting problem. i am using built in library of ds1307 in codeVision AVr. The problem is that when i start program it works fine. but after some time time got wrong as 31:05:30 and data like 01-15-13. and seconds runs as usual. i am using Atmgea16L
It' looks to me like a simulator problem, but don't use mikroC and thus can't further check the behaviour of your code.
I need to display only the time on the lcd ..can any one give me the code for this in assembly language. iam using at89s52 microcontroller and ds1307 RTC. Regards Vijay Kumar