Shop OBEX P1 Docs P2 Docs Learn Events
DS1307 Initialization and Demo - Page 2 — Parallax Forums

DS1307 Initialization and Demo

2»

Comments

  • ShaliniShalini Posts: 59
    edited 2013-04-04 14:53
    I downloaded all 3 codes into the propeller and I'm getting some lines in the display.
  • ShaliniShalini Posts: 59
    edited 2013-04-04 15:05
    I'm getting blank screen after the programs are downloaded....is there anything else to be done...Am I missing something???
  • ChrisGaddChrisGadd Posts: 310
    edited 2013-04-04 15:51
    Shalini wrote: »
    In your LCD driver.spin code you have given:

    PUB start(E_pin, RW_pin, RS_pin, D4_pin) : okay
    stop
    pins[0] := E_pin
    pins[1] := RW_pin
    pins[2] := RS_pin
    pins[3] := D4_pin

    the 0,1,2,3... is the propeller pins numbers which your using to connect E, RW, RS, and DB4??
    No, that's simply to make it easier to load those assignments into a PASM routine. All of the pin assignments are made in the top-level object "LCD clock". As currently written, RS is on 16, R/W 17, E 18, D4 through D7 on 19 through 22 ( in that order). The DS1307 uses 28 and 29, and a couple pushbutton switches (only required if you want to set the time) are on 26 and 27, with pull-ups to 3.3V.

    I tested it on a 16x2 LCD, though it displays all characters in the eight left-most columns so it should appear fine on a 8x2 display; your JHD162A uses the same format.
  • ShaliniShalini Posts: 59
    edited 2013-04-04 15:57
    ChrisGadd wrote: »
    No, that's simply to make it easier to load those assignments into a PASM routine. All of the pin assignments are made in the top-level object "LCD clock". As currently written, RS is on 16, R/W 17, E 18, D4 through D7 on 19 through 22 ( in that order). The DS1307 uses 28 and 29, and a couple pushbutton switches (only required if you want to set the time) are on 26 and 27, with pull-ups to 3.3V.

    I tested it on a 16x2 LCD, though it displays all characters in the eight left-most columns so it should appear fine on a 8x2 display; your JHD162A uses the same format.

    oh those three codes are for PASM (Assembly language), but are they still supposed to work on Propeller Tool 1.3.2?? because I'm getting blank display on the LCD...
  • ChrisGaddChrisGadd Posts: 310
    edited 2013-04-04 17:32
    Should work fine on 1.3.2

    Okay, let's try it from a different direction. You say that the display works properly with the LCD_8x2_4bit object?

    I simplified my object and modified it to use LCD_8x2_4bit instead, try it now. Also included the serial terminal just to see if the DS1307 is being read okay.

    LCD clock - basic - Archive [Date 2013.04.04 Time 20.20].zip

    And just to be sure, when you say you're downloading all of the codes into the Propeller, you do mean that you're loading the top-level object, "LCD Clock - basic" in this case, which is automatically loading the other objects, right? And not that you're not loading all of the object files individually one-at-a-time, right?
    Sorry, gotta ask.
  • ShaliniShalini Posts: 59
    edited 2013-04-04 18:00
    i download them individually...
  • ShaliniShalini Posts: 59
    edited 2013-04-04 18:24
    ChrisGadd wrote: »
    Should work fine on 1.3.2

    Okay, let's try it from a different direction. You say that the display works properly with the LCD_8x2_4bit object?

    I simplified my object and modified it to use LCD_8x2_4bit instead, try it now. Also included the serial terminal just to see if the DS1307 is being read okay.

    LCD clock - basic - Archive [Date 2013.04.04 Time 20.20].zip

    And just to be sure, when you say you're downloading all of the codes into the Propeller, you do mean that you're loading the top-level object, "LCD Clock - basic" in this case, which is automatically loading the other objects, right? And not that you're not loading all of the object files individually one-at-a-time, right?
    Sorry, gotta ask.

    IT WORKS!!!!! THANK YOU SO MUCH!!! Now the LCD is showing:
    31/12/00
    00:14:4801/01/01
  • ShaliniShalini Posts: 59
    edited 2013-04-04 19:21
    Shalini wrote: »
    IT WORKS!!!!! THANK YOU SO MUCH!!! Now the LCD is showing:
    31/12/00
    00:14:4801/01/01

    its running like a timer instead of a clock.....what do i need to change to make it display clock time??
  • ShaliniShalini Posts: 59
    edited 2013-04-04 20:07
    Shalini wrote: »
    its running like a timer instead of a clock.....what do i need to change to make it display clock time??

    now the clock is working in 24 hr mode,but I don't why the date is printing twice (one on first line and another on second line of the LCD)...
  • ShaliniShalini Posts: 59
    edited 2013-04-05 06:15
    Shalini wrote: »
    now the clock is working in 24 hr mode,but I don't why the date is printing twice (one on first line and another on second line of the LCD)...

    Now, its showing:
    Date: 05/04/13
    Time: 09:16:40AM

    THANKS TO ALL U GUYS FOR HELPING ME OUT, U SAVED MY PROJECT!!! BUT I'M STILL NOT DONE!!!
Sign In or Register to comment.