Shop OBEX P1 Docs P2 Docs Learn Events
SX28 / DS1302 RTC interface to a Serial LCD — Parallax Forums

SX28 / DS1302 RTC interface to a Serial LCD

T&E EngineerT&E Engineer Posts: 1,396
edited 2007-10-29 15:04 in Robotics
This circuit was the first step to building my SX52/48 16x16 LED display matrix interface to a DS1302 RTC. However, it is the first of its kind that I know of for the SX28/48/52 as most DS1302 Real Time Clock interfaces are designed for the Basic Stamp. JDOHio (Joe) wrote the original code and I modified it for this completed project.

Post Edited (T&E Engineer) : 4/8/2007 10:32:01 PM GMT

Comments

  • hmlittle59hmlittle59 Posts: 404
    edited 2007-09-29 22:17
    Hello T & E Eng.
    I am new to PBASIC and I am try to adapt your Push Button Time adjustment code to the BOE-BOT board. Will this work? I only have 10% of code space left. I'm studying your code now to try and make it work.

    thanks for any help
    hmlittle59
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-09-29 22:59
    There are lot of information on the DS1302 for the Basic Stamp 2. You should probably do a search on the Parallax Forum for this. However, this circuit and code is for an SX-28 using SX/B not PBASIC. This was much harder to do using SX/B and I was the first to publish this information that I know of for SX/B.
  • Roy CarlsonRoy Carlson Posts: 46
    edited 2007-10-27 05:08
    I have the circuit wired up but do not have a Parallax Serial LCD.

    I only have the Scott Edwards 4x20 Serial LCD and a K107 LCD Controller Board that I build and added to a 4x20 Backlit LCD Display.

    I have the Parallax 2x16 Parallel LCD for the Parallax PDB and tried this with the K107.

    I can get the LCDs to demo & test out but I get garbage when I try to display the clock data from your program.

    Do you know how I can fix this?

    Roy

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    ·
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-10-27 10:29
    The first thing you should look for when you get garbage characters is the baud settings in both the sx/b program and more specifically the hardware (LCD display or K107).· After quickly looking through the K107 guide online, it looks like it is·fixed·only for·9600 and not adjustable for anything else like 19,200. My sx/b program sets the LCD·for 19,200 baud. You can change this by looking at the SX/B program in the constants for a line like:

    DisplayBaud CON "T19200"

    change this line to:

    DisplayBaud CON "T9600"

    re-compile and you should be good to go.

    Let me know if this works.
    ·
  • Roy CarlsonRoy Carlson Posts: 46
    edited 2007-10-28 23:39
    T&E,



    It was the baud rate at first but after this fix I still find problems with the display formating.· I can see the clock updating but it doesn't seem to format the display for 2 lines.· I guess I can play with the command set's for either the Scott Edwards or the K107.·

    Another possibility is to purchase the Parallax 2x16 serial or move my serial controller over the the Parallax Parallel 2x16 display.

    I have also thought about just using a set of 7 seg LED's

    Roy

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    ·
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-10-28 23:47
    If you use a set of 7 seg displays you will probably need some control hardware like a MAX7219 or something. It would be more of a head ache in coding - but doable. If you can try getting a Parallax 4x20 which this program will also work on (back lit is best).
  • Roy CarlsonRoy Carlson Posts: 46
    edited 2007-10-29 02:18
    I have the 4x20 LCDs but one has the Scott Edwards serial board and the other the K107 board.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-10-29 15:04
    Roy,

    The Parallax and Scott Edwards serial displays are very different. The Parallax Displays use the upper 128 ASCII values for command codes, while on the Scott Edwards display these are Extended ASCII (ANSI) characters. Also, because the Parallax Display uses upper values for commands there is no need to send a special command byte for formatting, etc. The Scott Edwards display, however does use a special character sent to control formatting. It should not be difficult to make the current program fully compatible with your Scott Edwards display.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.