Search Engine

87 Threads found on Code For ds1307
hello, maybe this test for MCP23017 ( + ds1307) can inspire you ... sur le bus I2C ? 100Khz // Fosc =16Mhz #include "p18f26k22.h" #define OSCILLATEUR_INTERNE // voir Help // Topics // Pic18 // config bits settings // choisir PIC18F26K22 #ifdef OSCILLATEUR_INTERNE #pragma config FO
hi all, i have tried so much but PIC 18F458 is not reading RTC ds1307, PLz help me oscillator -HS 20Mhz complier-micro c pro for pic here is code // LCD module connections sbit LCD_RS at RB7_bit; sbit LCD_EN at RB6_bit; sbit LCD_D4 at RB5_bit; sbit LCD_D5 at RB4_bit; sbit LCD_D6 at RB3_bit; sbit LCD_D7 at RB2_bit; sbit LCD_RS_Dire
hi all, i have tried so much but PIC 18F458 is not reading RTC ds1307, PLz help me oscillator -HS 20Mhz complier-micro c pro for pic here is code // LCD module connections sbit LCD_RS at RB7_bit; sbit LCD_EN at RB6_bit; sbit LCD_D4 at RB5_bit; sbit LCD_D5 at RB4_bit; sbit LCD_D6 at RB3_bit; sbit LCD_D7 at RB2_bit; sbit LCD_RS_Dire
hi i am using RTC ds1307 with pic16f887. using very common code for mikro c, avilable on net. problem is when i run the code on debugger, "read_time" routine sticks on "I2C1_start();" can anybody help? code is: // LCD module connections sbit LCD_RS at RB3_bit; sbit LCD_EN at RB2_bit; sbit (...)
i want the code for setting time in ds1307 using i2c mechanism and im interfacing with galileo board
I want to convert 24Hr-to-12 mode in RTC ds1307 with atmega16(11.0592Mhz). Its ok with 24Hr mode. for its solution i had referred its datasheet....and read about 24/12 hour bit but in my code i cant find that where i have to make that change so that i can convert that time in 12HR. Compiler AVR GCC. #include #incl
Here I am posting mikroC PRO PIC code for multiple I2C LCDs. With this you can have a device like ds1307 of I2C bus and also 8 I2C PCF8574T based LCDs. I didn't post this in my previous thread in DIY section because its title had CCS C Project but this is mikroC PRO PIC project. I have used these I2C LCDs
you can search the forum have many ds1307 code. for LED operating use three variable for second,minute,hour when timer start increment second variable and turn on led. if second = 5 then turn the led gpio off.and for minutes increment the minute variable when second variable rich to 59.and (...)
code tags are now corrected to the more readable option which is supported by the Edaboard interface -- Moderator.
Just use RTC2 Click code at - - - Updated - -
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); }
First check is serial communication work using controller then try RTC . Send say a,b,c 0,1,2 to PC using controller if it work then may RTC reading issue or data conversion issue. RTC output BCD code & PC require ASCII code. for RTC have any issue then refer by blog it may help u
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 (...)
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 (...)
Can we see your DSN file and source code? hope you are using 16f877a MCU
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