Shop OBEX P1 Docs P2 Docs Learn Events
Six Digits of Doom — Parallax Forums

Six Digits of Doom

CalMarinerCalMariner Posts: 64
edited 2011-12-24 13:14 in BASIC Stamp
Hello all!

I have begun a new project which has quickly overwhelmed me. I am trying to make a clock using a 6-digit display which I have acquired. The display hardware has Serial(+) and (-) connectors, and a RS-232 chip in it. Sorry for the crude use of terms - still learning.

I have the BS2 on a B.O.E., but all the display does is blink when sent commands using SEROUT. The first step is to establish communication. I will work on programming the clock later. If anyone knows of this being done before, please help.

IMAG0686.jpg

IMAG0687.jpg
1024 x 612 - 94K
1024 x 612 - 110K
«134

Comments

  • dandreaedandreae Posts: 1,375
    edited 2011-08-17 12:19
    Do you have any information regarding your 6 Digit display? Data sheet?

    Dave
  • Mike GreenMike Green Posts: 23,101
    edited 2011-08-17 12:24
    Probably the problem you're running into may be an incompatibility between the the display and the Stamp's I/O voltage levels. If the display uses an RS232 adapter chip like the MAX232, the Stamp's I/O voltage levels won't work with it. You need to either bypass the MAX232 on the display or add another MAX232 to your B.O.E. If you have a serial B.O.E., the programming interface is considered RS232 compatible, but it's not strictly compatible and may not work with all RS232 devices. That depends on the details of how the device is constructed and how its serial connector is wired. If you want more help with this, you'll really need to supply more information about your display device. The picture raises more questions than it answers (like how does the addressing work?)
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-08-17 15:27
    CalMariner,

    If you're interested in in bypassing the MAX232 on the display, here's some information (just enough to be really dangerous).

    attachment.php?attachmentid=84169&d=1313619486

    To send data to the display, use pin 14 (T1 out) and/or pin 7 (T2 out).

    To receive data from the display, use pin 11 (T1 in) and/or pin 10 (T2 in).

    When sending or receiving you'll want to make sure both devices share a common ground connection (pin 15),

    You'll need to send the data in the correct protocol (whatever that may be).

    Okay, there's enough information to destroy the display and the Basic Stamp.

    Good luck.

    Duane
    570 x 301 - 413K
  • ercoerco Posts: 20,256
    edited 2011-08-17 15:43
    Duane, you are one smart & helpful fellow! Good man.

    BTW, I still owe you a video of the new parallelogram gripper I made last weekend, alluded to here: http://forums.parallax.com/showthread.php?133698-Lightweight-Gripper&p=1025895#post1025895

    Worked great until I went to make the video and made this critical error: http://forums.parallax.com/showthread.php?133126-3-Servo-Tester&p=1027694&viewfull=1#post1027694

    New servo tester en route to finish vid. :)
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-08-17 15:52
    "Tried on a BoE"
    Using SEROUT pin, baudmode?
    Have we tried using an inverted baudmode?
    (The Stamp should send INVERTED baudmode to any device expecting RS-232 levels [the ICL232].)
  • CalMarinerCalMariner Posts: 64
    edited 2011-08-17 16:07
    Thank you all for your quick replies. I do not have the datasheet for the clock, and the original manufacturer was very disinterested in helping me.

    I have tried the code below, just mucking about trying to get a response:

    'Display's Serial In (+) connection to PIN 15
    'Display's Serial In (-)
    DO
    SEROUT, 15, 9600, [53]
    PAUSE 1000
    LOOP

    I grabbed this from the reference manual (parallax).

    The display reacted by flashing a single zero once per second. Yes, we have life, but it's not intelligent.
  • CalMarinerCalMariner Posts: 64
    edited 2011-08-17 16:10
    How do you specify inverted vs regular?
  • CalMarinerCalMariner Posts: 64
    edited 2011-08-17 16:12
    @Duane Degn Thanks. I think I will try the front-door approach for now, though. I only have one of each of these items.
  • CalMarinerCalMariner Posts: 64
    edited 2011-08-17 16:15
    @dandreae I was just able to find it.
  • CalMarinerCalMariner Posts: 64
    edited 2011-08-17 16:16
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-08-17 16:19
    How do you specify inverted vs regular?

    Baudmodes are specified in PBASIC Help.
    DO
    SEROUT, 15, 9600, [53]
    PAUSE 1000
    LOOP
    
    That "9600" isn't the baudmode for 9600 Inverted.
    Look that up in PBASIC Help (SEROUT)

    16468
  • CalMarinerCalMariner Posts: 64
    edited 2011-08-17 16:50
    Thank you PJ
  • CalMarinerCalMariner Posts: 64
    edited 2011-08-17 17:02
    I GOT IT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Thanks to everyone.

    The code:
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    DO
    SEROUT 15, 16468, [49,50,51,52,53,54,CR]
    PAUSE 1000
    LOOP

    Produces:
    IMAG0688-1.jpg


    I think that the amount of exclamation points fail to express my excitement, so must again say thank you to everyone.
    1024 x 1712 - 119K
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-08-17 17:06
    Oooohh, looky!
  • dandreaedandreae Posts: 1,375
    edited 2011-08-18 09:15
    Very nice!
  • CalMarinerCalMariner Posts: 64
    edited 2011-08-18 10:09
    Well, in retrospect that was a very small achievement compared to the next goal.

    Now I need to adapt the DS1302 Template file to output time to said clock. I'm sure that I will be right back here again, but, for now, I am just going to jump right in.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-08-18 12:13
    Get a GPS instead.
  • CalMarinerCalMariner Posts: 64
    edited 2011-08-18 12:27
    I have a GPS (What's the connection?)
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-08-18 13:12
    GPS sends out a very accurate time-stamp.

    The problem is it doesn't work inside buildings very well.

    Duane
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-08-18 13:28
    I find that mine work well in buildings.
    Those timekeeper ICs are wobbly at best anyway.
  • CalMarinerCalMariner Posts: 64
    edited 2011-08-19 06:06
    @PJ Allen Luckily, I only need it to be accurate to within a minute in 24 hours. It is for keeping time during stage productions (3-4 hours max).
  • CalMarinerCalMariner Posts: 64
    edited 2011-08-19 06:08
    Next milestone reached!

    I don't know if I bumped the crystal or something, but the clock that wouldn't tick is now fully functional.

    Next step - make the clock set-able using pushbuttons instead of debug interface.
  • CalMarinerCalMariner Posts: 64
    edited 2011-08-20 10:29
    I know that there is a lot of polishing, but it is basically functional at this point.

    The code:
    VI77-708 Firmware.bs2
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-08-20 10:47
    Get thee to youtube!
  • CalMarinerCalMariner Posts: 64
    edited 2011-08-20 11:12
    One problem that is driving me nuts:

    If I change the HEX2 prefix to DEC2, then the clock looks right when I am setting it, but if I change the DEC2 prefix to HEX2 then the clock runs right. I don't get it...
  • CalMarinerCalMariner Posts: 64
    edited 2011-08-20 11:13
    I am on YouTube. Should I put a project video up?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-08-20 11:15
    Be that! :)


    Looks right vs. Runs right. Help me out.
  • CalMarinerCalMariner Posts: 64
    edited 2011-08-20 12:27
    Looks right: When I'm setting it, repeatedly pressing the "Hours" button (HBUT) makes the hours increment up. When using DEC2, the display will read out 1,2,3,4,...,10,11,12. For example, I set it to [12:59: A]
    Unfortunately, when the clock runs (Show_time), the display shows [ C:45: A].

    Runs right: When setting it, the time increments as follows: ...,7,8,9,A,B,C,D,E,F,10,11... However, when the clock is running using the HEX2 prefix, it looks and acts like a normal clock.

    I know that there is something I lack in comprehension. This is maddening.
  • CalMarinerCalMariner Posts: 64
    edited 2011-08-20 12:44
    Here is a short video introduction (available in HD):
Sign In or Register to comment.