TRIS setting for the DS1302


Results 1 to 29 of 29

Threaded View

  1. #21


    Did you find this post helpful? Yes | No

    Default still no luck

    @Steve

    Thanks for the trickle charger tip :-) now that table makes sense too :-) YAY

    I added the code below (originally exactly as you gave it to me) see the updates, I haven't added all the possible options but I will so any line could be un-commented for any selection of the desired charger setup and will post the updates tomorrow sometime.
    Code:
    init:
    'initialize the RTC and set the trickle charge rate
    Low SCLK
    low rst        ' Reset RTC
    high rst       ' RTC Ready for transfer        
    Shiftout IO, SCLK, LSBFIRST, [$8e, 0]  ' Enable write
    low rst        
    high rst
    'Shiftout IO, SCLK, LSBFIRST, [$90, %10101011]  ' Set charger on and to "2 diodes, 8Kohm"              
    'Shiftout IO, SCLK, LSBFIRST, [$90, %01011100]  ' inititial power state     
    Shiftout IO, SCLK, LSBFIRST, [$90, %00000000]  ' disabled                       
    Low RST         ' Reset RTC
    return
    Sadly the clock is still not working. I still just get a static display.
    I have no buttons assigned to the clock as yet,so I didn't add any increment sub-routine..should I ?
    I was hoping to just preset the time and it would start ticking away.
    If I did add an increment sub-routine , would I need to add one for secs,mins,hours and day month and year ? Or just for mins and hours?

    Kind regards
    Dennis

    Are there any other things I could try ?

    Kind regards
    Dennis
    Last edited by Dennis; - 25th February 2010 at 00:45.

Similar Threads

  1. real time clock
    By maria in forum Code Examples
    Replies: 44
    Last Post: - 1st March 2022, 12:13
  2. PICKit2 - warning about configuration words
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 4th August 2009, 14:01
  3. DS1302 16F628 Woes
    By idtat in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 15th January 2009, 14:15
  4. TRIS E setting for 18F2550
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 23rd May 2007, 07:47
  5. Is LCDOUT setting always al TRIS ?
    By BigWumpus in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 19th June 2005, 17:02

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