Shop OBEX P1 Docs P2 Docs Learn Events
DS1302 for Prop — Parallax Forums

DS1302 for Prop

NewzedNewzed Posts: 2,503
edited 2007-08-06 11:51 in Propeller 1
Does anyone out there have a program for the DS1302 on the Prop - I could really use one.·

Thanks

Sid

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.

That is why they call it the present.

Don't have VGA?
Newzed@aol.com
·

Comments

  • Jason HicknerJason Hickner Posts: 21
    edited 2007-07-20 07:05
    Yep, there's one in the object exchange, by Daniel Robert:

    ww1.parallax.com/Default.aspx?tabid=65

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Jason
    www.pr0jects.com
  • NewzedNewzed Posts: 2,503
    edited 2007-07-20 11:46
    Jason, that file is a partial program covering only hours, minutes and seconds.· Besides, its for TV, not VGA.

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    ·
  • inserviinservi Posts: 113
    edited 2007-07-21 17:13
    Hello Newzed,

    The DS1302 programs published in the object exchange is a driver and a little demo program.

    I can help you to adapt it to what you need ?

    Could you explain exactly what you need ?

    Best regards,
    dro.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    in medio virtus
  • NewzedNewzed Posts: 2,503
    edited 2007-07-21 20:14
    Thanks for the offer, dro.· I have written a program using Mike Green's OS and it looks OK on the VGA.· Won't be able to really try it until I get my Proto Board and get my DS1302 hooked up to it.

    Right now I'm trying to convert the program to Chip Gracey's
    VGA_1280x1024_Tile_Driver_With_Cursor and I can't get the numbers to display.· I'm wondering if Chip's program has a provision to displaying decimal numbers.· As of now, if I enter a number it displays the ASCII value for the HEX of whatever number I enter.· For instance, if I enter '55', the VGA displays '7'.· Has me completely bugged.

    Sid



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    ·
  • Marc GebauerMarc Gebauer Posts: 60
    edited 2007-07-22 04:49
    I'm using the 1280x1024 driver. The print routines used in the demo expects you to use ascii. When I need to format a number·to display,·I've used the Simple_Numbers object which will take·a number value and return a pointer to a formatted string that can be used by the print_string() method.




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • inserviinservi Posts: 113
    edited 2007-07-23 08:54
    Hello Newzed,

    I can not help you for the use of VGA object because i have no vga monitor. For the demo program, you can simply change the line :
    text : "TV_Text"
    by
    text : "VGA_Text"
    and it will work with 'standard' vga output.

    I can help you for the use of the DS13202 to obtaining the date and time as you need !

    Best regards,
    dro.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    in medio virtus
  • NewzedNewzed Posts: 2,503
    edited 2007-07-23 12:59
    Since apparently no one had a program for the DS1302, and I could not find a suitable one, I wrote my own.· I am not a proficient SPIN programmer, so this was really a labor-intensive effort.· I can't run the program myself until I get my Proto Board, but I have been assured by a forum member who did run it that it works as anticipated.· On that basis,m I am attaching the program, plus the six objects it uses.· Rather than zip them into a bundle, I attached them separately so you can download only what you need.· Please check the VGApingroup and the clock pins in the CON block to make sure they agree with your setup.

    I could only attach five of the seven files - the remaining two will be by separate post.

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
  • NewzedNewzed Posts: 2,503
    edited 2007-07-23 13:01
    Here are the·two remaining files.

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
  • inserviinservi Posts: 113
    edited 2007-07-23 19:03
    Hello Newzed,

    Your program look to be great. I am particularly interested by your approach of the “object” concept as used with Propeller.
    I am impatient to be able to test the program when I would have a VGA screen.

    dro.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    in medio virtus
  • NewzedNewzed Posts: 2,503
    edited 2007-07-25 18:32
    Finally got my Proto Board all built up and plugged in the special DS1302 module I made just for this project.· Works great!· I have attached a picture of the Proto Board with the DS1302 installed.

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    450 x 416 - 16K
  • NewzedNewzed Posts: 2,503
    edited 2007-07-27 19:55
    I have a TV version of my DS1302 program.· I'll be happy to post it if anyone has a need for it.

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    ·
  • NewzedNewzed Posts: 2,503
    edited 2007-08-02 14:00

    I finally got my DS1302/LCD program all finished and working. It will display either on your VGA or 4x20 LCD or both. The attached zip file contains all seven objects required by the program.

    A few notes – check the CON block to make sure the VGA start pins and the 1302 connections agree with your setup. The 1302 uses HEX2 notation throughout – if the month is July, enter as 07. If the time is 9AM, enter as 09, and so on. DO NOT PRESS ENTER. The program will advance automatically after each entry.

    Make sure you use 3.3VDC on the 1302.

    I am using my 4x20 backpack for the LCD, so you will have to change the LCD routines beginning at Line 381 to fit the LCD you are using.

    Note that Lines 134-137 have been commented out. This permits using the Prop/LCD remotely, which is what I am presently doing.

    The 1302 routines do not use the synchronous shiftin/shiftout protocol. Instead, they write/to or read/from the particular clock registers asynchronously.

    If you are using the D or L options in the VGA/keyboard mode, these options can be terminated by pressing any key. If you are using the LCD as a stand-alone remote, the only way to terminate is to power off the Prop or Proto Board.

    If you have any questions about the program, please post them here.

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
  • hinvhinv Posts: 1,253
    edited 2007-08-04 14:41
    Hi,

    Will the DS1302 work with a crystal taken from a watch?

    Thanks,
    Doug
  • NewzedNewzed Posts: 2,503
    edited 2007-08-04 15:23
    No.· The correct crystal is a Digikey 300-8301 for about $0.28, 32.768Khz, 6pf.

    Sid





    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    ·
  • hinvhinv Posts: 1,253
    edited 2007-08-05 23:31
    What is the pf that is needed for the propeller?
  • NewzedNewzed Posts: 2,503
    edited 2007-08-05 23:35
    hinv, if you are talking about the 1302, the pf is 6.· If you are talking about the crystal for the Propeller, that is 20pf.

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    ·
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-08-06 04:08
    Is the schematic for your little board published? Perhaps something I can add to the Cookbook?

    Oldbitcollector

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!
  • NewzedNewzed Posts: 2,503
    edited 2007-08-06 11:51
    If you are talkling about the Proto Board, Parallax has already published an excellent schematic.

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    ·
Sign In or Register to comment.