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

Six Digits of Doom

13

Comments

  • CalMarinerCalMariner Posts: 64
    edited 2011-08-27 02:02
    Thanks to all of your help, the HEX / DEC issue is over. I have simply programmed the firmware to jump over the A-F values. I have attached a full copy of the most recent code. Now everything is working as desired.

    VI77-708 Firmware.bs2
    Free to all, just give credit.
  • jonwjonw Posts: 67
    edited 2011-09-20 18:26
    Is this the correct thinking,,,i match the 9600 dip switch setting on the display with using 9600 in the calulation from the stamp manuel to find the baudmode argument mode. First why 9600? we just decide to go with the fastest i suppose.
    The next question is why did we select inverted ( ie could we not use 8bit N true )
    And also a question on the code,under constants calmariner uses lcd BkSpc I don't understand, if we are not using lcd,,,why is this in the code with backlit,,,and curser left etc
    I plan to make a display like this also and looking at the spec's,it seems that the display has its own rtc also i notice the 77 series is a old series replaced with a 4 inch 87 series...Does anyone know if the 3 inch display will be still available? thanks jonw
  • CalMarinerCalMariner Posts: 64
    edited 2011-09-21 00:47
    Those were just leftover parts from the source code. I left them in just in case I wanted to add a LCD on the back of the clock. As for the BAUDMODE and inverted, I decided to tailor the BS2 to the display, since the display was in working condition, albeit very old. Like I said, look for the old displays on EBay.
  • jonwjonw Posts: 67
    edited 2011-09-21 10:57
    when i look for a display,,,am i looking for a 232 serial ?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2011-09-21 11:02
    RS-232 implies inverted voltages of up to +/-12V. If this is for a BASIC Stamp, then you want a TTL compatible serial interface, not RS-232.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-09-21 11:38
    Whenever an RS-232 device is connected directly to a Stamp then an Inverted baudmode is required.

    CalMariner's display has an RS-232 input (see his pictures, it's the MAX232/ICL232).

    Therefore an Inverted baudmode was required. I]modus ponens[/I
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2011-09-21 12:03
    PJ Allen wrote: »
    Whenever an RS-232 device is connected directly to a Stamp then an Inverted baudmode is required.
    CalMariner's display has an RS-232 input (see his pictures, it's the MAX232/ICL232).
    Therefore an Inverted baudmode was required. I]modus ponens[/I

    PJ,

    If a MAX232 is connected between the BASIC Stamp and and an RS-232 device then a non-inverted baud mode would be used, since the driver inverts the data.
  • jonwjonw Posts: 67
    edited 2011-09-21 14:35
    RS-232 implies inverted voltages of up to +/-12V. If this is for a BASIC Stamp, then you want a TTL compatible serial interface, not RS-232.

    This is a display I have found .

    http://www.vellemanusa.com/downloads/0/illustrated/illustrated_assembly_manual_k8063.pdf

    its a 232 interface, will this work with stamp or will i need a interface? The display used in the post was a 77series and you can only buy a 4 inch 87 series display now. I want something I can allways buy more of,so i will not search for a 77/708 display.
    Chris has me confused when he states stamp is not a 232 device I guess its cos stamp is 5 volt and 232 is 12 to 25 V can anyone clear up my understanding here. thanks...any help is appreciated jonw
    Ahh I think i see what PJ is saying,,,use a 232/ICL232 to connect these 232 displays to stamp.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-09-21 17:19
    "PJ,
    If a MAX232 is connected between the BASIC Stamp and and an RS-232 device then a non-inverted baud mode would be used, since the driver inverts the data."

    I didn't say for anyone to place a MAX232 between. I noted that CalMariner's device/display had one. That's why Inverted baudmode worked/works. I got it to work, with an Inverted baudmode, it was everybody else trying to jack it up by cutting traces and all the other junk. Cripes!

    There are two Stamp baudmode choices: "True" and "Inverted"
    Stamp "True" levels aren't RS-232 True, they're TTL True and TTL-Inverted -- Right?
    With StampTrue: Idle and Data_1 are +V, and Data_0 = 0V.

    9600True8N1_84.jpg


    If you run "True" baudmode data into a MAX232 then you'll end up, at its output, with RS232 True/standard signalling. Right?
    Stamp"True"/TTL-True means Idle and Data = 1 are +5, and when you run that into a MAX232, you get at its output RS232 Idle and Data = 1, -12V (and data_0 = +12).

    When you use a Stamp's Inverted baudmode (pins 0-15), the Stamp's Idle out is GND (0V) -- and since it's not positive then a forgiving RS232 device will grant that's as good as a negative voltage.

    CalMariner's display didn't work till he got it, at my urging, with an Inverted baudmode, because it expected RS232 levels (0=Idle, 0=data1, +V = data0).
    1024 x 768 - 61K
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-09-21 17:48
    What's more --

    Attachment not found.

    Debates?
    577 x 805 - 40K
  • CalMarinerCalMariner Posts: 64
    edited 2011-09-22 00:41
    Glad I never cut those traces. It might have worked, but it would be far from the polished product that I am going for.

    Today's update is more of a mechanical one, but it is still interesting. I have finally mounted the threaded inserts which will allow my custom yoke to hold the clock.

    IMAG0766-1.jpg


    It is exciting to see the final product start to emerge. I am currently working on getting the circuitry built on an old BS2 carrier board, which will be mounted inside the clock chassis. I have also installed a 7805 voltage regulator on the clock display's motherboard. There was a place where it would have been supplied by the factory, so it made the modification easy.

    More to come, stay tuned, and try to remember - this forum is about the clock, not BAUDMODES.
    1024 x 612 - 77K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2011-09-22 09:05
    PJ Allen wrote: »
    If you run "True" baudmode data into a MAX232 then you'll end up, at its output, with RS232 True/standard signalling. Right?
    Stamp"True"/TTL-True means Idle and Data = 1 are +5, and when you run that into a MAX232, you get at its output RS232 Idle and Data = 1, -12V (and data_0 = +12).

    I now see this is simply an isue of semantics. If you output non-inverted data (True) from the BASIC Stamp into a MAX232 driver that data is inverted by the driver. You're calling it RS-232 True/Normal, but it is still inverted data nonetheless. For some it will be a matter of perspectives or semantics and I will not argue those points. For clarity I was saying the following:

    If a BASIC Stamp receives data from an RS-232 device directly (which is possible using a resistor), it will need to use inverted baud mode, because the data is inverted. If there is a MAX232 inbetween the RS-232 and the BASIC Stamp, then the baud mode would be set to non-inverted/true baud mode because the driver inverts the data. It's easy to get confused trying to think of the RS-232 inverted data as True from its perspective. I would rather not go there and further confuse the issue.

    Maybe a better way to word it is that:
    RS-232 signals will always be inverted from the TTL-level signal fed to the RS-232 driver. That is to say, any 232 driver will invert any signal regardless of its original idle state.
  • jonwjonw Posts: 67
    edited 2011-09-22 13:34
    CalMariner wrote: »
    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

    Pls help me understand whats going on ,,I am a basic learner. How does [49,50,51,52,53,54,CR] produce 12,34,56 Thank you for your replys
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2011-09-22 13:38
    49-54 are the ASCII codes for the numbers 1-6. You can see the codes for each ASCII character using the following table.
  • CalMarinerCalMariner Posts: 64
    edited 2011-10-01 12:39
    Hello to all to have been following along, and warm greetings to newcomers. I apologize for my absence; getting back up to Academy speed has taken considerable attention.

    The clock project, at least in its initial form, is complete. Time will tell if the DS1302 is accurate enough. Starting with just a simple, serial LED display, I have accomplished the following objectives:
    • Established communication standards between the BS2 and the display
    • Integrated the DS1302 RTC with the BS2
    • Adapted and developed code to support three-button programming
    • Created a simple on-screen user interface
    • Augmented the existing serial display with a 5VDC supply for BS2 core
    • Modified the clock chassis to accept mounting hardware and BS2 core
    The circuit was first created on a serial BoE, but was always intended for a permanent, soldered board. The picture below is the prototype circuit, with full functionality.

    IMAG0677.jpg


    After successfully prototyping the circuit, I changed my direction to the mechanical engineering needs of this project. The existing chassis had only one, 1/2" hole for cables, but it was situated on the bottom. Since I wanted this unit to be able to sit on a desk, I had to move the power cord to the back of the unit. It also allowed me to upgrade the existing power cord to a stage-grade armored cable with a Leviton NEMA L5-20P connector. Additionally, I needed to mount my three NKK momentary pushbuttons on the back. Currently, they feature amber LEDs, but I will change them to red to match the clock. Finally, I needed to mount the BS2 core. Initially, I had mounted the BoE, but this was a mistake, as I eventually switched to the smaller CB. I guess I simply became too excited.

    IMAG0796.jpg


    After uploading the new firmware, adapting it for pin reassignments, and installing the core in the display chassis, It was time to power up. You can only imagine my happiness when it booted up flawlessly. There was full transfer of functionality, and the voltage regulator was working as intended. The only failure in the transition process was the backup battery (a new addition). After I cycled the power to the clock, it did not retain the time. After a short investigation, I realized that I had not soldered the negative lead of the battery holder correctly. After correcting the issue, the clock performed nominally.

    IMAG0801-1-1.jpg


    It has been given a temporary home in the sound booth at my school, so that it may serve as a clock for presenters on stage. Its true purpose, however, is to serve as a rehearsal clock for a Bay Area symphony. It is important to keep accurate time during rehearsals and shows, and I think that this clock will be perfect for that application.

    IMAG0813.jpg
    IMAG0812.jpg

    IMAG0807.jpg


    In the future, it is my desire that the clock should serve as a testbed for time-integrated projects. Some of the potential modifications and applications are:
    • Integrating remote RF control
    • Adding DMX dimming to LEDs
    • Installing AM/PM indicators
    • Installing LCD display on back
    • GPS-based or atomic clock synchronization
    • Serial clock system master controller
    • Countdown timer
    • Stopwatch
    • Time-based initiator

    I would be absolutely remiss if I failed to acknowledge those whose assistance has made this project much easier, if not entirely possible:

    Chris Savage - Your continued involvement with the implementation of DS1302 ICs has helped to create some of the most useful and cool projects that I have seen on these forums.

    Randy Thomas - You were where the rubber meets the road. Your considerable expertise, as well as your possession of a soldering station, really helped to move this project along.

    PJ Allen - This project was about to just become another sketch in my notebook. I was completely new to pretty much everything on this project, and your help with communications enabled me to focus on the real engineering. Your persistence and skill were critical in this project's success.

    Thank you to those above and to everyone on these forums who followed or contributed to this project. It is so important that these lines of communication are open. I will return to Parallax for my next project, and I hope to see you all again then.

    -Kevin R.
    1024 x 612 - 72K
    1024 x 780 - 186K
    1024 x 612 - 42K
    1024 x 1712 - 115K
    1024 x 612 - 56K
    1024 x 612 - 35K
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-10-01 12:49
    Excellent!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2011-10-02 21:53
    You're welcome! Glad to help.
  • CalMarinerCalMariner Posts: 64
    edited 2011-10-13 22:07
    This has nothing to do with Parallax, but I am finally getting the mounting brackets anodized black. No more bare aluminum. Now to just plug all those extra holes in the chassis. And to put a guard around the buttons. And to change the led colors. And to...
  • RDL2004RDL2004 Posts: 2,554
    edited 2011-10-14 07:13
    This has been one of the best BS2 projects I've seen in a while, mainly because it was interesting to follow the process of just getting it to work.

    When you finally decide it's done, you should condense everything into one post (photos, schematics, code, etc) and put it in the "Projects" forum.
  • CalMarinerCalMariner Posts: 64
    edited 2011-10-14 20:22
    Will do. Part of the idea was to never be done with it, but I have to move on at some point... :)
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-10-15 05:37
    The prominent feature of your project, as I see it, is your BS2 - so whatever updates you make and report are totally OK.
    I seldom "finish" a project, stepping stones and pivot points.
    You could petition the moderator to transfer this thread/subject to Projects (they can do things like that, you know.) Then, everyone can appreciate the process and appreciate that... it takes time.
  • CalMarinerCalMariner Posts: 64
    edited 2011-11-05 13:33
    Three quick updates:

    I guess I never uploaded pictures of the finished arms. Aren't they pretty?
    IMAG0877.jpg


    The clock has had it's debut performance! Last week, it was used as the exclusive timing device during our symphony rehearsals, and it performed flawlessly. I could not be more proud of it. The one...technical...issue was that the performance house only used "old-style" twist lock power connectors, instead of the modern standard which I had installed on the clock. Here is the clock in action:
    IMAG0900.jpg


    The other update is that work has officially begun on V1.2. This will feature a cleaned-up architecture (less about lines-of-code bragging rights and more about will-it-fit), and a provision for a simple serial out (maybe using debug?). I am also going to install a 2x16 LCD on the back (maybe Parallax). Here is the first testing using PAUSE instead of a RTC:
    IMAG0920.jpg


    Thanks for following! Check back soon - I will try to update weekly.
    1024 x 1712 - 113K
    1024 x 612 - 63K
    1024 x 612 - 45K
  • CalMarinerCalMariner Posts: 64
    edited 2011-11-08 01:48
    I just had the clock down from its post and on the bench. I wanted to fix a couple of bugs and add new features. The most important two updates were:
    • Adding a locked, 15-minute countdown timer to show remaining time during musician breaks. The only way to stop or reset the timer is to pull the plug.
    • Creating a flashing "12:00:00", indicating that the clock had lost its time setting.
    The critical part was synchronizing the countdown timer to the RTC clock without disrupting it. Check out the code:

    V1.2 as installed.bs2 (Free to all, just give credit)

    Next time the clock comes in to the shop, I will add some sort of external data connection so that I can tamper with the firmware without taking the whole thing apart. I am stilling working on v2.1, which will feature an on-board LCD for UI, RF control of clock functions, and a selectable countdown timer/chronograph.
  • CalMarinerCalMariner Posts: 64
    edited 2011-11-27 20:31
    Quick update:

    Working on 1.3, which will support a multi-connector.

    This 8-pin connector is used to program the unit, as well as to provide an external terminal. The connector is supplied with +5 VDC, COM/GND, and three pins connected to pins on the BS2. The remaining three are reserved for programming use (USB). This will allow for development of a multitude of accessories. By altering the code, and designing corresponding physical hardware, this improvement greatly expands the capabilities of this device.
  • CalMarinerCalMariner Posts: 64
    edited 2011-12-04 23:29
    Connector installed. I added a non-parallax USB to SERIAL converter inside the chassis, so it should allow me to just hook up my new programming cable: http://www.sparkfun.com/products/10851, and update the firmware whenever I want. The cable only uses 4 of the 8 pins available and, since one is common, it leaves me with 5 pins for terminal development.

    IMAG1012.jpg
    1024 x 612 - 101K
  • CalMarinerCalMariner Posts: 64
    edited 2011-12-11 07:42
    The beautiful orange box from Sparkfun arrived in the mail on Friday, bearing with it a 4 digit, 7-segment LED serial display. I took this to Radio Shack to look for an enclosure, but they didn't have any small enough. They did, however, have a black, ABS, 2xAAA battery box. Perfect fit (*some Dremel-ing required). It now becomes a comically tiny little terminal, which I have yet to fit out with a couple of tactile switches. Here are some pictures (the overall length is just 2.5"):

    IMAG1061.jpg


    IMAG1060.jpg


    IMAG1059.jpg


    Powered demo coming up next week!
    1024 x 612 - 57K
    1024 x 612 - 56K
    1024 x 612 - 51K
  • PublisonPublison Posts: 12,366
    edited 2011-12-11 08:57
    This is a great continuing project. Thanks for the update, (and thinking outside the box :tongue: on the enclosure)
  • CalMarinerCalMariner Posts: 64
    edited 2011-12-12 01:45
    LOL, thanks.
  • CalMarinerCalMariner Posts: 64
    edited 2011-12-12 06:08
    See:
    IMAG1068.jpg


    IMAG1062.jpg


    Three input pins are available for terminal development:
    • Serial to diaplay RX
    • Button A
    • Button B
    Now, all I have to do is to write the code for whatever I want, upload it using my super-handy USB cable (see previous posts), and let this little guy do my bidding.
    1024 x 612 - 56K
    1024 x 612 - 49K
  • CalMarinerCalMariner Posts: 64
    edited 2011-12-24 13:14
    Last week, I finished installing the components within the battery box...erm...custom enclosure. While I (literally) bricked one of the tact switches, i was able to successfully replace it with a functioning model. Apparently "flux tight" <> "Super Glue proof".

    For right now, the little unit displays four zeroes, as I was unable to upload new firmware to the main unit. The buttons do work, however, and the main unit displays the count-up timer as intended.

    IMAG1074.jpg
    1024 x 1712 - 150K
Sign In or Register to comment.