Real time clock ICs


Closed Thread
Results 1 to 40 of 67

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default I would like to add

    Hi,

    I would like to add a 4k7 resistor between DS1307 (pin7) and 5V as a pullup resistor and as said many times before GND the backup battery pin.

  2. #2
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default No Pull-ups for the Buttons?

    I haven't gone through the code completely, but taking another quick look at the schematic I noticed there aren't any pull-ups used for the buttons. I did see a TRISB=%11111111 in there, as well as checking one of the buttons low as a condtion in an IF...THEN statement used to enter the SetupEntryLoop (I am assuming the logic is the same on all three). So they are floating, and should be pulled-up. You could just use those 10K pull-ups you removed from the SCL/SDA lines (which should now have 4.7K) and add them to the pins for each of the buttons. Just need one additional for the third button.

    Steve

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Gawd, that's a four-year-old program and you expect me to remember what LCD's I was using at the time? I do recall that you could use either the upper or lower 4-bits. On checking the current DATASHEET (Datasheets always seem to come into the conversation on this thread) I find that Tri-T (our currect supplier) only supports the UPPER four bits. So this is obviously non-standard. I'd connect as per the PBP manual, but using the Port pins as specified in the DEFINES within the program. I've tried the original MN1307 this morning (I've not checked the posted version) connected that way and it works.

    Buttons are on PortB and use the PICs internal weak pull-up's.

  4. #4
    Eng4444's Avatar
    Eng4444 Guest


    Did you find this post helpful? Yes | No

    Lightbulb Good morning!:-)

    The best thing is to have a huge project done ahead of time... everybody there is still working.

    I checked all the comments i have. Thank you for your cooperation :-)

    how would i know that they should have been D4 throught D7.... i do not work with electronics and i was doing exactly as it was said.

    i will try all what was said in 2 hours and then give feedback.

    i wish a nice day for everybody!

  5. #5
    Eng4444's Avatar
    Eng4444 Guest


    Did you find this post helpful? Yes | No

    Lightbulb Hello Melanie!

    Seems we sent our posts in the same time!


    SO you are saying that i can connect to the lower 4 bits as long as i keep the "defines" in the program?

    And in case i will use from D4 to D7 i should change the "defines".
    So what to change in this part if so?

    "

    Define LCD_DREG PORTA ' Port for LCD Data
    Define LCD_DBIT 0 ' Use lower 4 bits of Port
    Define LCD_RSREG PORTA ' Port for RegisterSelect (RS) bit
    Define LCD_RSBIT 6 ' Port Pin for RS bit
    Define LCD_EREG PORTA ' Port for Enable (E) bit
    Define LCD_EBIT 7 ' Port Pin for E bit
    Define LCB_BITS 4 ' Using 4-bit bus
    Define LCD_LINES 2 ' Using 2 line Display
    Define LCD_COMMANDUS 2000 ' Command Delay (uS)
    Define LCD_DATAUS 50 ' Data Delay (uS)

    "

    i'll check this this thread when i arrive to my Lab.

    By the way,
    Don't you think people that this thread reached the highest score of visits?! hehe.

    Let's reach the highest possible number! :-)

  6. #6
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    There is a very basic software only (no RTC chip required) elapsed timer demo, ready to run, just an LCD and one Button only, at the bottom of this thread here...

    http://www.picbasic.co.uk/forum/showthread.php?t=3423

  7. #7
    Eng4444's Avatar
    Eng4444 Guest


    Did you find this post helpful? Yes | No

    Lightbulb I am in Lab now.

    Hello,

    Here i arrived and will test your program....

    honestly, i liked the first program because it gives time and date. I really hope it will work.

    By the way, don't think that i will say that "i" did it. But i will show the source of it and all the posts and replies for this thread.

    i really hope i'll ba able to see something on LCD.

    First thing is that i will change the bits from D4 TO D7 and connect them to PIC; moreover, i will put 4.7 K resistors and 0.1uF Capcitors

    More infos to come soon!

  8. #8
    Eng4444's Avatar
    Eng4444 Guest


    Did you find this post helpful? Yes | No

    Exclamation First thing to be said..

    I connected all the circuit with the new changes and then downloaded the program after adding the following:

    @ DEVICE pic16F628A, INTRC_OSC_NOCLKOUT
    ' System Clock Options
    @ DEVICE pic16F628A, WDT_ON
    ' Watchdog Timer
    @ DEVICE pic16F628A, PWRT_ON
    ' Power-On Timer
    @ DEVICE pic16F628A, BOD_ON
    ' Brown-Out Detect
    @ DEVICE pic16F628A, MCLR_OFF
    ' Master Clear Options (Internal)
    @ DEVICE pic16F628A, LVP_OFF
    ' Low-Voltage Programming
    @ DEVICE pic16F628A, CPD_OFF
    ' Data Memory Code Protect
    @ DEVICE pic16F628A, PROTECT_OFF
    ' Program Code Protection

    So now , when i compile with microcoe studio it compiles successfully. Bu when i want to program the IC, it gives a message :

    " this program contains EEDATA - EDATA and this part will be discarded"

    so i press "OK" and it begins programming.

    during the process, when it arrives to " Programming EEDATA section" it stops and gives this message:
    " Programming time-out or connection error"

    For sure i have no connection error because i tried a small program on another IC and it worked.

    any idea?

  9. #9
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Not from me, I don't use Microcode studio and avoid any questions on the topic.

    If you compiled your MN1307.bas code from a DOS Window...

    PBP -p16F628 MN1307 -v

    or

    PBP -p16F628A MN1307 -v

    depending which version you're using... It will compile.

    Likewise I can't comment on your method of programming the actual PIC.

Similar Threads

  1. real time clock
    By maria in forum Code Examples
    Replies: 44
    Last Post: - 1st March 2022, 13:13
  2. Real Time Clock
    By in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 2nd June 2012, 05:52
  3. real time clock - PCF8583
    By maria in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 15th April 2010, 16:41
  4. Real Time Clock
    By savnik in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 8th December 2006, 03:02
  5. Real time clock... what a headache!
    By Eng4444 in forum mel PIC BASIC
    Replies: 2
    Last Post: - 8th June 2006, 22:56

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts