39- Interfacing The DS1307 Real Time Clock | mikroC Pro for PIC Tutorial

Поділитися
Вставка
  • Опубліковано 22 жов 2024

КОМЕНТАРІ • 188

  • @sikazwe2010
    @sikazwe2010 8 років тому +7

    Easy and simple tutorial! Brother you are the best teacher. Keep it up!!

    • @StudentCompanion
      @StudentCompanion  8 років тому +5

      +sikalabs thank you. We appreciate your feedback.

  • @minthway2736
    @minthway2736 4 роки тому +1

    Thank a lot Sir !! This tutorial is very useful for me .You are The Best Teacher .

  • @Gitbizy
    @Gitbizy 7 років тому +3

    Why is it necessary to use the I2C debugger to get the simulation to work? Shouldn't the DS1307 return the clock information when it is selected and initialized? If we built this actual circuit you would not have an I2C debugger but the clock would function, correct? I am trying to understand what the need for the I2C debugger is in the proteus simulator... Thank you

    • @StudentCompanion
      @StudentCompanion  7 років тому +5

      +Shane Rolin it's in Proteus simulator to be able to send/receive I2C data. If you build the actual hardware you won't need the I2C debugger.

  • @tota896
    @tota896 8 років тому +5

    Thank you for the great tutorial

  • @StudentCompanion
    @StudentCompanion  8 років тому +6

    Please note: PIC18F26K20 operates with 3.3V even though in this simulation we used 5V. In your hardware 3.3V should be used

    • @hungnguyenquoc4996
      @hungnguyenquoc4996 7 років тому +1

      how about PIC16f887 ? Can I do it similarly?

    • @StudentCompanion
      @StudentCompanion  7 років тому +2

      +Hưng Nguyễn Quốc Hi. The procedure will be more or less the same only some small changes to the code.
      The major thing to note is PIC18F26K20 operates with 3.3V while PIC16F887 operates with 5V

    • @hungnguyenquoc4996
      @hungnguyenquoc4996 7 років тому +2

      thanks you so much :)

    • @StudentCompanion
      @StudentCompanion  7 років тому +3

      +Hưng Nguyễn Quốc you are welcome

  • @steve24822
    @steve24822 7 років тому +2

    I noticed that the display of the seconds is quite erratic. Sometimes it jumps a couple of seconds at a time and is delayed at other times.
    At first i thought it was something to do with your editing but when I simulated it myself I had the same problem. Is this a simulation problem or will it be the same when in hardware?

    • @StudentCompanion
      @StudentCompanion  7 років тому +2

      Hi. It might be a simulation problem as it reads current time form your computer, and this can be affected by your computer CPU available resources as simulation is quite a memory intensive task. In hardware you may not experience the same problem.

  • @bowninja
    @bowninja 5 років тому +2

    what happens if the read data is longer than 8 bit? The example you did the highest return value was 99 (0x63) so what happen if the return data is 65535? Would i have to do i2c read twice to get the first 8 bit(MSB?) then the next 8 bit(LSB)? how would I combine this data to be usable information?

    • @StudentCompanion
      @StudentCompanion  5 років тому +1

      For a DS1307 in what situation you would need more than 8-bit?

    • @StudentCompanion
      @StudentCompanion  5 років тому +1

      To read more than once or to access multiple registers, you can call a read function multiple times as explained in this video: ua-cam.com/video/E_bAO7MwadQ/v-deo.html

  • @abdelhakimerraoui2852
    @abdelhakimerraoui2852 7 років тому +2

    Great tutorial ! ThANKS A LOT

    • @StudentCompanion
      @StudentCompanion  7 років тому +3

      +Abdelhakim Erraoui thank you. We appreciate your feedback

  • @dsimiyu520
    @dsimiyu520 8 років тому +5

    led text moving message with keyboard usb project still waiting plus code

  • @keshenanaidu7160
    @keshenanaidu7160 8 років тому +5

    Thank you.

  • @rayaelectronic8183
    @rayaelectronic8183 2 роки тому +1

    THANKS MEN

  • @ShampooWow
    @ShampooWow 8 років тому +4

    *_Awesome video! I like it_*

    • @StudentCompanion
      @StudentCompanion  8 років тому +4

      +Shampoo Wow Thank you. We appreciate your feedback.

  • @StudentCompanion
    @StudentCompanion  8 років тому +4

    For more info and download source code: www.studentcompanion.co.za/interfacing-the-ds1307-real-time-clock-with-pic-microcontroller-mikroc/

  • @dsimiyu520
    @dsimiyu520 8 років тому +5

    works well

  • @EJGameplays
    @EJGameplays 8 років тому +3

    How can i read the information of the ds3132? thanks and nice work!

    • @StudentCompanion
      @StudentCompanion  8 років тому +2

      +Enrrique Flores hi !
      I guess you mean DS3231. There is no much differences between this chip and the DS1307 except for accuracy. The DS3231 is more accurate. It's not much affected by outside temperature. The code of the DS1307 should work well with DS3231 as they have the same time registers and can be accessed the same way. Read the datasheet and compare.

    • @EJGameplays
      @EJGameplays 8 років тому +2

      Thank you so much! i will compare them right now:)

    • @StudentCompanion
      @StudentCompanion  8 років тому +2

      +Enrrique Flores great!

    • @EJGameplays
      @EJGameplays 8 років тому +3

      i'm trying to use pic 16f877a and i have an undefined identifier with I2C1, OSCCON and MSB comands, what should i do?

    • @StudentCompanion
      @StudentCompanion  8 років тому +3

      +Enrrique Flores go ahead and use the i2c functions as described in the tutorial. Buf remember there are registers and instructions which are not available when using a PIC16F device such as LAT register, etc.

  • @origin5448
    @origin5448 8 років тому +4

    it is a good video .can i know how to interface a gps with microcontrollers

    • @StudentCompanion
      @StudentCompanion  8 років тому +5

      +suren suren thanks. Most of GPS use the USART module of the PIC microcontroller. Watch our RS232 tutorial to learn more.

  • @sitinazirahhjdamit6708
    @sitinazirahhjdamit6708 7 років тому +1

    I'm not sure what happen, but when I simulated it, it was slow. What do you think went wrong?

    • @StudentCompanion
      @StudentCompanion  7 років тому +1

      +Siti Nazirah Hj Damit Slow compared to what? Remember this is simulation it's not always gonna run like in hardware. Maybe it's your simulation that's slow. There is a simulation clock at the bottom bar of proteus runing immediately once you press the run button. Check if your minutes are in synchronous with that clock.

    • @sitinazirahhjdamit6708
      @sitinazirahhjdamit6708 7 років тому +1

      It's fine now, i'm not sure what really happen. One question, is it possible to use your code to PIC16f887? Thanks

    • @StudentCompanion
      @StudentCompanion  7 років тому +1

      +Siti Nazirah Hj Damit yes. But you'll have to make some few modifications.

  • @idrisishola6469
    @idrisishola6469 5 років тому +2

    Pls I have problem on stimulation the problem is
    Pic18 illegal FOSC bits (0b0011) in CONFIG1H.
    Also it complain of simulation failed to start

    • @StudentCompanion
      @StudentCompanion  5 років тому

      Did you select the correct PIC in Proteus the same PIC you used in your mikroC projet?

    • @idrisishola6469
      @idrisishola6469 5 років тому +1

      Thanks your suggestion is right,
      But my LCD didn't display anything sir

    • @StudentCompanion
      @StudentCompanion  5 років тому +1

      Then you are not doing thinhs right. Either using a wrong PIC or incorrect connection. Fix that first.

    • @idrisishola6469
      @idrisishola6469 5 років тому

      I used 18f26k20 in both my Proteus and mikroc pro. It display ds1307 clock and sare at one corner on Proteus but is the LCD that is no displace.
      At the stimulation log, error U1 (Pic18 )PC =0x0300.

  • @islombekmamatov2331
    @islombekmamatov2331 8 років тому +4

    Hi, one more great video thanks,
    i want to write code to count minutes when i press button, for example when i press button if it is 14:50 and press one more time 14:55 it should count and display every minute like 1, 2,3,4,5 or simply make another counter, how can i do that thanks a lot

    • @StudentCompanion
      @StudentCompanion  8 років тому +4

      +Islombek Mamatov do you want to display lapsed minutes since you pressed the button or the actual time?

    • @islombekmamatov2331
      @islombekmamatov2331 8 років тому +4

      Student Companion SA i am trying to make counting system , like money, lets say every 1 minute is 2$ , so i have this real time digital clock and when i press it should start counting and should be displayed like a counter, for example when 1 m passes 2$ , 2 passes 4$ should be displayed, thanks

    • @StudentCompanion
      @StudentCompanion  8 років тому +4

      +Islombek Mamatov then you probably won't need a real time chip. You can use a pic internal timer or even interrupt to achieve this. When a button is pressed it can generate an interrupt then you can start counting.

    • @islombekmamatov2331
      @islombekmamatov2331 8 років тому +4

      Student Companion SA i got it , thank you
      I also found when i run this tutorial simulation in proteus seconds are changing very slowly like 1 second in display changing in 3 seconds, can you explain that?

    • @StudentCompanion
      @StudentCompanion  8 років тому +4

      Usually because this is simulation, it will not run as real as in hardware, it will depend on some simulation limitation, the speed of your computer among others. But if the simulation is very slow, check the oscillator frequency you selected is not too low compared to the oscillator frequency you used in your project.

  • @fatihmamak2446
    @fatihmamak2446 4 роки тому +1

    Hi! I have a micro sd card module and a ds3231 RTC module. One of this module work with SPI, other is work with I2C. My question is can i use this modules in one MSSP on pic? (I have a pic 18f4685). I found "I2C bit banging" for my problem, but didn't understand anything how can i do it.

    • @StudentCompanion
      @StudentCompanion  4 роки тому +2

      The I2C and SPI use the same module in the PIC, so you can either use only the SPI or I2C if the PIC habe only one MSSP module, the only option to use both is to use the bit banging for one interface. But if you choose a PIC with 2 MSSP modules, you can use both SPI and I2C hardware modules.
      Why did you choose this PIC and you are not even using CAN bus? If you choose a PIC with 2 MSSP modules, you can make your life easy.

    • @fatihmamak2446
      @fatihmamak2446 4 роки тому +1

      My project code is 75k of flash. So i need to choose min. 96k flash size MCU. I live in Turkey and you can't find the all MCUs in Turkey. And also i don't have a smd soldering station. At the first i didn't know am i need SPI ind I2C modules at the same MCU. So i choosed the pic18f4685 DIP version. I don't need a CAN bus communication. I will use 2 SPI, 1 I2C module and uart communication. Therefore i will change the MCU to has 2 MSSP and 128k flash size MCU. (If ı find MCU has a usb interface, it'll be nice.) If i didn't find DIP model in Turkey, maybe i will buy from abroad. Thank you for answering my question!

    • @StudentCompanion
      @StudentCompanion  4 роки тому +1

      Yes, there are many MCUs in DIP packages that have 128KB of memory that you can use and have more than 1 MSSP. That can make your code easier to write than by using bitbanging.
      Also try to select a newer PIC model, there are cheaper, more powerful and with more features than old ones like the one you selected. There is no good reason to start a new project using an old PIC if newer alternative is available.

    • @StudentCompanion
      @StudentCompanion  4 роки тому +1

      You can use this tool to set your PIC requirements and it will give you a list that meet your requirements: www.microchip.com/maps/Microcontroller.aspx
      If shipping cost is not a lot, you can always buy directly from Microchip, they are quite cheaper. But try to buy first locally in Turkey if possible.

    • @fatihmamak2446
      @fatihmamak2446 4 роки тому

      @@StudentCompanion Do you have any suggestions? I was using the pic16f series 6 years ago, I switched from flash failure to the 18f series. I don't know the new MCUs very well.

  • @GuitarLucius
    @GuitarLucius 6 років тому +1

    Yup, this tutorial is excellent. Has anyone figured out an idiot proof way of loading config bits using MIKROC pro and pickit3 ? i've purchased the MikroProg but I haven't played with it yet. Cheers, Lucius

    • @StudentCompanion
      @StudentCompanion  6 років тому +2

      Why not load the Hex file directly with IPE or File --> Import --> Hex in MPLAB?
      If I understood correctly your question.

    • @GuitarLucius
      @GuitarLucius 6 років тому +1

      @@StudentCompanion hmmmmmm... like I said (I'm an), idiot proof lolol... thanks bud I'll try that....

    • @StudentCompanion
      @StudentCompanion  6 років тому +2

      You are welcome!

  • @grittinjames
    @grittinjames 6 років тому +1

    I expected you use code configuration to generate I2C functions since you mentioned it in Tutorial-38,

    • @StudentCompanion
      @StudentCompanion  6 років тому +1

      Hi. Do you mean MPLAB Code Configurator? If that's what you mean, this is mikroC tutorial it does not use it. It has its own library functions. It's a different compile than XC8.

  • @fseeletronicos
    @fseeletronicos 7 років тому +3

    Do you have a tutorial to work with ADC Keys ?

    • @StudentCompanion
      @StudentCompanion  7 років тому +3

      +fseeletronicos © hi. What is ADC keys?

    • @fseeletronicos
      @fseeletronicos 7 років тому +3

      Firstly, thanks for your fast reply. I tried to make PIC's ADC reads voltage divider from keys. And when you press a key, it will give you a voltage value. The PIC compares with a range and "know" what key was pressed. Have you ever try it ?

    • @StudentCompanion
      @StudentCompanion  7 років тому +3

      +fseeletronicos © No. We never tried. Why do you want to read the ADC value? It might not give you correct values as the column/row resistors might be the same for each column. Unless in your application you'll use of different values. The standard procedure is to read the digital value : 5v or 0v when a key is pressed or released

    • @fseeletronicos
      @fseeletronicos 7 років тому +3

      Student Companion Because read keys with ADC saves more ports.

    • @StudentCompanion
      @StudentCompanion  7 років тому +2

      +fseeletronicos © ok.i never tried that method

  • @siphodludlu1362
    @siphodludlu1362 3 роки тому +1

    What is the equivalent of the line if(ap) in mplab x?

  • @alikasim290
    @alikasim290 7 років тому +1

    thank you very much can i set alarms with it where can i find explanation for that

    • @StudentCompanion
      @StudentCompanion  7 років тому +1

      +ali kasim yes you can. You can find more in the datasheet.

    • @alikasim290
      @alikasim290 7 років тому +1

      the data sheet of ds1307?

    • @StudentCompanion
      @StudentCompanion  7 років тому +1

      +ali kasim yes if you are using the DS1307 you'll need its datasheet. That's where you'll get that explanation.

  • @asainarv
    @asainarv 7 років тому +2

    nothing coming in display, SCS(OSCCON) connection set error in proteus simulation ???

    • @StudentCompanion
      @StudentCompanion  7 років тому +2

      +Asainar Vadakkethil what error is generated in Proteus?

  • @yahyaamera7151
    @yahyaamera7151 3 роки тому

    Thanks a lot!!!

  • @pedrosegui9324
    @pedrosegui9324 8 років тому +4

    like I said good video, can you do a video of how to make a P.O.V with the pic 16f84

    • @StudentCompanion
      @StudentCompanion  8 років тому +5

      +Yohan Torre thanks for watching our videos. What do you mean by POV?

    • @StudentCompanion
      @StudentCompanion  8 років тому +5

      +Yohan Torre We don't know spanish/portuguese, we can't follow that video because we won't understand. Sorry maybe you could explain what is it.

  • @braveknight8278
    @braveknight8278 5 років тому +1

    Hi,I know Im late but what would you change in the code for pic16f887.Please answer

    • @StudentCompanion
      @StudentCompanion  5 років тому +1

      You must select your new PIC in edit project. Change LAT to PORT.

    • @braveknight8278
      @braveknight8278 5 років тому

      @@StudentCompanion Thank you for replying.I choose in device select my Pic and the code was built.When i put it in proteus LCD display just lights up.It doesnt show any letters.And where is that LAT? Where can I change it? Thank you

    • @StudentCompanion
      @StudentCompanion  5 років тому +1

      Did you connect correctly the lcd to your new PIC according to the lcd pin declarations? All instances of LAT in code must be replaced with PIC.

    • @braveknight8278
      @braveknight8278 5 років тому

      @@StudentCompanion I checked the connections,they are fine.Can you name an instance for me?
      In my code adress,read_data is underlined with red line.Also the variable char x is underlined.Could that be the issue?

    • @StudentCompanion
      @StudentCompanion  5 років тому

      Does it generate errors when you compile the code?

  • @cs_patel
    @cs_patel 7 років тому +4

    How should I proceed for interfacing rtc with PIC18f4520

    • @StudentCompanion
      @StudentCompanion  7 років тому +3

      Hi. You can proceed the same way. The code shouldn't change much when you are changing the PIC. Just select the PIC18F4520.

    • @StudentCompanion
      @StudentCompanion  7 років тому +3

      If you decide to use internal oscillator as well, just check the OSCCON value in the datasheet depending on the frequency selected.

    • @cs_patel
      @cs_patel 7 років тому +3

      I am using MP lab x compiler , it's showing some errors while compiling the same code.
      Also tell me which compiler did u use.
      Thanks in advance.

    • @StudentCompanion
      @StudentCompanion  7 років тому +2

      +Chandra Shekhar Patel this tutorial was done with mikroC Pro for PIC compiler as you can see. It's different from MPLAB XC8 compiler. You can't use this code exactly as it is without modification

    • @StudentCompanion
      @StudentCompanion  7 років тому +2

      +Chandra Shekhar Patel watch thus tutorial with MPLAB: ua-cam.com/video/1M1n8oEw9zk/v-deo.html

  • @muhammadimranisnoroddin1430
    @muhammadimranisnoroddin1430 7 років тому +2

    Hello.. i can't build the codes.. there are messages in message text about unresolved extern 'TFT_16bit_RS', Unresolved extern 'TFT_16bit_DataPort_Lo' and others unresolved extern.. how to fix it?

    • @StudentCompanion
      @StudentCompanion  7 років тому +2

      +Muhammad Imran Isnoroddin Hi. In the library manager, disabled (untick) the TFT_16bit libraries

    • @muhammadimranisnoroddin1430
      @muhammadimranisnoroddin1430 7 років тому +2

      Student Companion Can i know why we need to disable it?

    • @StudentCompanion
      @StudentCompanion  7 років тому +2

      +Muhammad Imran Isnoroddin you are not using it. Why do you want to enable it? It's a library for TFT colour screen

    • @RazibShahadat
      @RazibShahadat 7 років тому +1

      I have the same problem. How should i disabled (untick) the TFT_16bit libraries?

    • @StudentCompanion
      @StudentCompanion  7 років тому

      +Razib Shahadat in the library managers untick the TFT_16bit libraries.. watch video 1 to learn more

  • @alikasim290
    @alikasim290 7 років тому +1

    hello can i fix the error in delay function by rtc to control a bell of school

  • @RazibShahadat
    @RazibShahadat 7 років тому +1

    How i can change or set the real time ?

    • @StudentCompanion
      @StudentCompanion  7 років тому +1

      +Razib Shahadat it's all depends on how you want to set the time. How to you want to set it? By Keypad ? By push buttons...?

    • @StudentCompanion
      @StudentCompanion  7 років тому +1

      Razib Shahadat this is how you can set the time: ua-cam.com/video/E_bAO7MwadQ/v-deo.html

  • @ashwingarani5352
    @ashwingarani5352 7 років тому +1

    Does this work for pic 16f877 with a few changes?

    • @StudentCompanion
      @StudentCompanion  7 років тому +2

      +ashwin garani Hi. Yes it will work with PIC16F877 with some minor changes.

    • @nickgiachoi8308
      @nickgiachoi8308 5 років тому

      What is it? Please!

    • @StudentCompanion
      @StudentCompanion  5 років тому +1

      What are you talking about? Start your own question and explain clearly what is your problem.

    • @nickgiachoi8308
      @nickgiachoi8308 5 років тому

      @@StudentCompanion I did it. Thank you

    • @StudentCompanion
      @StudentCompanion  5 років тому

      Ok

  • @samirkennouche7087
    @samirkennouche7087 4 роки тому

    how to create the routine for reading with an pic33fj32mc204?

  • @sitinazirahhjdamit6708
    @sitinazirahhjdamit6708 7 років тому +1

    hr = hour & 0b00011111;
    ap = hour & 0b00100000;
    What does this code mean? Sorry and Thank you

    • @StudentCompanion
      @StudentCompanion  7 років тому +1

      +Siti Nazirah Hj Damit to check if PM or AM. You can read the datasheet to learn more

    • @sitinazirahhjdamit6708
      @sitinazirahhjdamit6708 7 років тому +1

      sorry if I keep asking too much. I ran the simulation now, it suppose to show 20.57 PM, however, on the LCD, it shows 00.57. what do you think went wrong?

    • @StudentCompanion
      @StudentCompanion  7 років тому +1

      +Siti Nazirah Hj Damit did you take some few minutes to study the code and the DS1307 datasheet and try to understand? Especially the 12H and 24H mode? And how the I2C debugger works reading from your PC?

  • @chinmaydixit9399
    @chinmaydixit9399 6 років тому +1

    how to write the values in ds1307 ?

    • @StudentCompanion
      @StudentCompanion  6 років тому +1

      +Chinmay Dixit you can watch this video it shows you how to write values to DS1307

    • @StudentCompanion
      @StudentCompanion  6 років тому +1

      +Student Companion you can watch this video: ua-cam.com/video/E_bAO7MwadQ/v-deo.html
      It shows you how to write values to DS1307

    • @chinmaydixit9399
      @chinmaydixit9399 6 років тому +1

      thank you so much!!!!!

    • @StudentCompanion
      @StudentCompanion  6 років тому +1

      +Chinmay Dixit you are welcome!

  • @ebrarsahin9671
    @ebrarsahin9671 2 роки тому

    I want to download source code but link doesnt work ?

    • @ebrarsahin9671
      @ebrarsahin9671 2 роки тому

      Spurious SCL transition detected at 0.665813s [$II2C DEBUGGER#0001] why i get this error ?

  • @chinmaydixit9399
    @chinmaydixit9399 7 років тому +1

    LCD display is not showing any data. what should I do?

    • @StudentCompanion
      @StudentCompanion  7 років тому +1

      +Chinmay Dixit without supplying extra info we can't really guess what could be wrong.
      Paste your code, pic you are using, etc.

    • @StudentCompanion
      @StudentCompanion  7 років тому +1

      +Chinmay Dixit did you get it right?

    • @chinmaydixit9399
      @chinmaydixit9399 7 років тому +1

      extremely sorry for the late reply because of some work..
      i am using 18f45k22 as a controller.
      my code is :
      sbit LCD_RS at RA4_bit;
      sbit LCD_EN at RA5_bit;
      sbit LCD_D4 at RA0_bit;
      sbit LCD_D5 at RA1_bit;
      sbit LCD_D6 at RA2_bit;
      sbit LCD_D7 at RA3_bit;
      sbit LCD_RS_Direction at TRISA4_bit;
      sbit LCD_EN_Direction at TRISA5_bit;
      sbit LCD_D4_Direction at TRISA0_bit;
      sbit LCD_D5_Direction at TRISA1_bit;
      sbit LCD_D6_Direction at TRISA2_bit;
      sbit LCD_D7_Direction at TRISA3_bit;
      unsigned int flag=0;
      void time_selection();
      unsigned short read_ds1307(unsigned short address)
      {
      unsigned short read_data ;
      I2C1_Start();
      I2C1_Wr(0xD0);
      I2C1_Wr(address);
      I2C1_Repeated_Start();
      I2C1_Wr(0xD1);
      read_data = I2C1_Rd(0);
      I2C1_Stop();
      return(read_data);
      }
      unsigned char MSB(unsigned char x)
      {
      return((x>>4) + '0');
      }
      unsigned char LSB(unsigned char x)
      {
      return((x & 0x0F) + '0');
      }
      void interrupt(void)
      {
      if(INT0F_bit==1)
      {
      flag=1;
      INT0F_bit=0;
      }
      }
      //Global variables
      int second;
      int minute;
      int hour;
      int hr;
      int day;
      int dday;
      int month;
      int year;
      char time[]= "00:00:00";
      char date[]= "00-00-00";
      void main()
      {
      OSCCON=0X66;
      I2C1_Init(100000);
      lcd_init();
      lcd_cmd(_LCD_CURSOR_OFF);
      ADCON1=0X0F;
      TRISB0_bit=1;
      TRISB1_bit=1;
      TRISB2_bit=1;
      GIE_bit=1;
      INT0IE_bit=1;
      INTEDG0_bit=1;
      //8MHz
      lcd_out(1,1,"Time");
      lcd_out(2,1,"Date");
      while(1)
      {
      second = read_ds1307(0);
      minute = read_ds1307(1);
      hour = read_ds1307(2);
      hr = hour & 0b00011111;
      dday = read_ds1307(3);
      day = read_ds1307(4);
      month = read_ds1307(5);
      year = read_ds1307(6);
      time[0] = MSB(hr);
      time[1] = LSB(hr);
      time[3] = MSB(minute);
      time[4] = LSB(minute);
      time[6] = MSB(second);
      time[7] = LSB(second);
      date[0] = MSB(day);
      date[1] = LSB(day);
      date[3] = MSB(month);
      date[4] = LSB(month);
      date[6] = MSB(year);
      date[7] = LSB(year);
      lcd_out(1,6,time);
      lcd_out(2,6,date);
      Delay_ms(100);
      if(flag)
      {
      time_selection();
      flag=0;
      }
      }
      }
      void time_selection()
      {
      lcd_cmd(_LCD_CLEAR);
      Delay_ms(500);
      //lcd_out(,1,"enter hour");
      }

    • @chinmaydixit9399
      @chinmaydixit9399 7 років тому +1

      No. I could not get it. I cant see the values or data on the 16*2 lcd display.
      Program is working fine.
      My interfacing diagram is also correct.

    • @StudentCompanion
      @StudentCompanion  7 років тому +1

      +Chinmay Dixit can you post your code and your diagram. We can have a look at it.

  • @alikasim290
    @alikasim290 7 років тому +2

    i writ the cod and build it but in simulation i get this message" (pic18)pc =0x0000 $MCLR$is low processor in rest"

    • @StudentCompanion
      @StudentCompanion  7 років тому +1

      +ali kasim you must connect MCLR pin to +5v of your supply voltage or disable MCLR in your code.

    • @alikasim290
      @alikasim290 7 років тому +1

      i connect it to 5v by 10k resistor but i get this message "(pic18)pc =0x0564 The SCS bit have been set. This feature is not modeled the model continue to clock "

    • @StudentCompanion
      @StudentCompanion  7 років тому

      +ali kasim try a different type of resistor.

    • @alikasim290
      @alikasim290 7 років тому +1

      how can i disable the MCL because i tried another resistor no change thank you for that

    • @StudentCompanion
      @StudentCompanion  7 років тому +1

      Hi. We have explained the procedure in this video: ua-cam.com/video/pvJWs3Dm2MQ/v-deo.html

  • @salmam5118
    @salmam5118 5 років тому +1

    HELLO
    dans arduino le programme reste le meme avec toutes les classes de RTC ou change

    • @StudentCompanion
      @StudentCompanion  5 років тому +2

      Bonjour. C'est quoi votre question?

    • @salmam5118
      @salmam5118 5 років тому

      @@StudentCompanion dans arduino je peux utiliser n'importe quelle modul rtc avec le meme programme

    • @StudentCompanion
      @StudentCompanion  5 років тому +1

      Non. Tu ne peux pas utiliser ce code de mikroC avec Arduino. Ça ne va pas marcher

    • @salmam5118
      @salmam5118 5 років тому +1

      @@StudentCompanion ok merci
      j'ai une question a l'etape ou on a bcd en decimal et comment on a fait ca
      j'ai pas compris bien

    • @StudentCompanion
      @StudentCompanion  5 років тому +1

      @@salmam5118 que ce que tu n'a pas compris? la conversion? tu ne sais pas c'est quoi le bcd? Tu ne sais pas pourquoi nous avons fais la conversion? Il faut bien decrire ta question pour que nous savions ton problem.

  • @walidzermout9046
    @walidzermout9046 7 років тому +2

    Please guys who can help me with something ? I want to turn on a LED after 22:00h but I cant figure out how to do this condition !!! who can help me !!

    • @StudentCompanion
      @StudentCompanion  7 років тому +3

      +walid_ Thegift hi. Will the LED remain ON after that?

    • @walidzermout9046
      @walidzermout9046 7 років тому +1

      the condition is about turning on the LED between 7:00h and 22:00h and its still off after 22:00h to 7:00h that's what I need to do in my program, but the problem is that I didn't understand how to do this condition with this program and how can I get the hour to write it in the if condition !!!! if(!!!!!!!){PORTD.RD0=1;}else{PORTD.RD0=0;}
      Thank's

  • @ankgaur
    @ankgaur 6 років тому +1

    Please send me source code hex file & design file

    • @StudentCompanion
      @StudentCompanion  6 років тому +1

      Ankit Gaur you can download them from our website. At the end of the article: www.studentcompanion.co.za/interfacing-the-ds1307-real-time-clock-with-pic-microcontroller-mikroc/

  • @smarterasap123
    @smarterasap123 24 дні тому

    please provide me codes and proteus simulation anyone

  • @dsimiyu520
    @dsimiyu520 8 років тому +5

    led text moving message with keyboard usb project still waiting plus code

    • @StudentCompanion
      @StudentCompanion  8 років тому +5

      Hi Daniel Simiyu, We are busy with your project, which PIC are you going to use? You want it to use USB but pic16f88/16f877a don't have USB interface. you can only use UART with these PIC

    • @dsimiyu520
      @dsimiyu520 8 років тому +6

      thanks for your efforts and making projects real ,can we use 16f877a for UART and 18f450 for usb. Now now now oh USB VS UART, very difficult again/ my wishes are to use keyboard as my text message input and have minimum components

    • @StudentCompanion
      @StudentCompanion  8 років тому +6

      +Daniel Simiyu You Can use USART and send data from your windows terminal.