Trying to get back in the game
koolvista
Posts: 16
After a 9 10 year hiatus of working on Basic Stamp/Picaxe/Scribbler 1/Boe-Bot I am trying to get back in the game.
As I approach 3/4 of a century age I decided I need to get some brain stimulation and try to keep my brain active.
As I was doing some packing up of my stuff for a move, I found some SX modules and boards. I have the following hardware.
3 SX 18 modules
4 SX20 modules
2 SX 48/50 Proto boards
1 SX Tech board
1 SX Key (serial connection)
I would like to use this hardware in projects, realizing that it is out-of-fashion.
Now for my questions;
1. Can the SX software be used on Windows 7 or 8.1?
2. Can this hardware be used to drive the NeoPizels LEDs?
3. Can this hardware be used with I2C hardware like a Real Time Clock?
4. I ordered and received a Parallax USB to Serial unit. Can this be used with SX-Key mentioned above?
5. Probably a hundred other questions.
My project I would like to do is a Resistor Color Code clock using the NeoPixels and RTC.
The time and date would be displayed as the different colors.
I have 13 Parallax NeoPixels, 2 Adafruit 8 NeoPixel strips, and 30 raw NeoPixels.
I was originally going to try and use a Propeller for this project but looking at SPIN code
made my head spin. I think I can eventually learn SPIN but using the SX/B software seems easier
since I had experience using Basic previously even thought it was looonnng time ago.
I have limited time to work on my project since I am planning and getting ready for a move
and my 75 year brain works against me.
Any input is welcomed, thanks.
As I approach 3/4 of a century age I decided I need to get some brain stimulation and try to keep my brain active.
As I was doing some packing up of my stuff for a move, I found some SX modules and boards. I have the following hardware.
3 SX 18 modules
4 SX20 modules
2 SX 48/50 Proto boards
1 SX Tech board
1 SX Key (serial connection)
I would like to use this hardware in projects, realizing that it is out-of-fashion.
Now for my questions;
1. Can the SX software be used on Windows 7 or 8.1?
2. Can this hardware be used to drive the NeoPizels LEDs?
3. Can this hardware be used with I2C hardware like a Real Time Clock?
4. I ordered and received a Parallax USB to Serial unit. Can this be used with SX-Key mentioned above?
5. Probably a hundred other questions.
My project I would like to do is a Resistor Color Code clock using the NeoPixels and RTC.
The time and date would be displayed as the different colors.
I have 13 Parallax NeoPixels, 2 Adafruit 8 NeoPixel strips, and 30 raw NeoPixels.
I was originally going to try and use a Propeller for this project but looking at SPIN code
made my head spin. I think I can eventually learn SPIN but using the SX/B software seems easier
since I had experience using Basic previously even thought it was looonnng time ago.
I have limited time to work on my project since I am planning and getting ready for a move
and my 75 year brain works against me.
Any input is welcomed, thanks.
Comments
My dad is 78 and he programs most everything made by Parallax, but excelled with the BASIC Stamp and SX line.
I could use that lot of SX hardware you have for customers who need tools and hardware. We've pretty much sold out of the SX programming tools (we still have chips) and customers are always asking if we have any more SX-Keys.
Should you be interested, I'd be happy to trade your SX hardware for a Propeller setup consisting of a Propeller Activity Board or two. But don't do this on my account, please - just be sure you really want to go that way. Heck, you might want to just buy a Propeller Activity Board on sale now and get started, keeping your SX hardware too!
Ken Gracey
I am hanging on to Both my SXKeys. But why not recommend the Fluffy 2 Scenix Programmer to those that are SXKey-less?
http://www.semis.demon.co.uk/Sx/SXmain.htm
And yes, the SX software will install in Windows 7. I have no idea what 8.1 will do. But swapping out for Propellers might be much more fun -- lots of power, able to do video on a VGA or in NTSC, programs in several languages (SPIN, PASM, Basic, C, Forth), and much more.
Not much activity in the SXes here at this point. You will make more friends using a Propeller.
Short replies
1. Yes to Windows 7, and probably yes to Windows 8.1
2. Don't know what NeoPixel LEDs are, but I am pretty sure they will work.
3. I2C works fine with the SXes
4. USB to Serial will work with the SXes
5. Ask some more.
The latest version of the SX software:
http://www.parallax.com/downloads/sx-key-editor-software
works fine on my Windows 7 machine.
I just, (minutes ago), loaded onto a HP Stream tablet, and seemed to install correctly. I can't try out the USB connection yet as I am waiting for a OTG cable.
I see you have a serial SX-Key. You might want to grab a newer USB SX-KEY:
http://www.parallax.com/product/45214
They are on sale until 12/15. The would fit with the newer computers out there.
As Ken mentioned, have a look at the Propeller. It is an awsome MCU!
Jim
The IDE (aka the software development environment) runs fine in Windows 7 (I haven't checked 8.1, but I'll bet it's fine there too). It's also really simple to use and has a debugger if needed. You'll spend 10 minutes learning it and the rest of the time concentrating on programming. Yes, you can program the NeoPixels with SX/B as well as I2C RTC's, etc.. Of course it does RS-232 communications too, it works with every USB to RS232 converter I've tried.
I would love to have seen the SX line live on and grow. It's so much better than the STAMP for small, real-world projects and much, much cheaper. It's not that the SX is "out of fashion" so much as it's out of production. This happened several years ago so most people that were using it switched to the Propeller or some other other platform. The support forum for the SX still exists but is not active these days. Still, I think if you choose to use the SX people here will read your posts and respond I'm sure. Once you get going with it I think that you'll find you'll be able to master it after a few projects.
I believe SX-list is still active. www.sxlist.com
If you can handle the Interrupt Service Routines for I2C, SPI, and Asynchronous Serial (for RS-232 and RS-422), there are a lot of things you can do.
Abebooks has copies of Guenther Daubach's "Programing the SX Microcontroller" that are used for $4 USD plus shipping.
http://www.abebooks.co.uk/servlet/BookDetailsPL?bi=13987212730&searchurl=sts%3Dt%26kn%3DParallax+programming+SX
I think the SX18 and SX20 are all gone. (I have a tube of 25 SX18 chips here).
http://www.parallax.com/downloads/programming-sx-microcontroller
Thousands of SX's still available:
http://www.parallax.com/catalog/microcontrollers/sx
SX-Keys still available:
http://www.parallax.com/product/45214
and here:
http://www.ic0nstrux.com/sx-key-programmer-usb#.VIszsSvF_To
All of the downloads and docs still available:
http://www.parallax.com/product/sx48bd-g
Ken Gracey – It is great to hear that at 78 your Dad can still play with this ‘stuff’
Your trade offer sounds good, but I think I will try the SX route for now as it
has Basic and at one time with the Stamp I learned a lot so I thought that
would be easier to learn. I still like to learn how to program the Propeller
but I think it will have to wait until after I move as I can only try to learn one.
I do have 2 Propeller Quickstart boards and 1 Propeller Demo board. My
My total experience with Propeller is downloading the Demo program
for the Quickstart board and running it one time. This is more than I have
with the SX boards.
Loopy - Thanks very much for your answers to my questions. No, I never used SX/B but
did use Basic on the Stamp and Picaxe (a long time ago). I also wrote Assembler
programs (trial & error for my own use) for the IBM PCJR after I retired in 1992.
Great fun doing all that back then don’t know if I can learn anything new but
will give it a try. Also, thanks for the heads up on SX programming book.
Jim Publison - Thanks Jim for your Input. I do have the USB to Serial gizmo (just received
the other day) so that should plug into serial SX- Key and also used for
serial input on my Basic Stamp stuff that I will get into again after I move.
(South Florida to Central Florida).
Thanks for the links.
wass – Thanks for telling about your experiences with the SX and the SX software. I hope
as I start to use the software that things come back to me from my Stamp days
I wish I knew how to use the ‘Quote’ thing, something else to learn, my gray hair will be
getting grayer after all this.
Thanks to everyone for their input.
Bob aka southernbob
Ray
Here is a nudge to get discussion moved over to the SX forum, where it belongs
http://forums.parallax.com/showthread.php/158635-RAM-comparison-SX28-BS2-and-the-Propeller-1?p=1305947#post1305947
Simply put, the Propeller 1 has 32K bytes of RAM for combined program and variable allocation. In many cases, larger table of variables are useful and I have generate useful table up to 4K that worked well controlling complex stepper motor motions.
On the other hand, the SX-28 has merely 136 bytes of variable space and the BS2 has only 32 bytes of the same.
Choices eventually come down for the need of more variable space resources.
And of course, the Propeller just runs faster in special instances; such as video and multi-tasking.
But I do admit, the Propeller runs at 3.3VDC and the SX can run at 3.3VDC or 5VDC. Some of us just want to stay with 5VDC.
and decide whether to pursue the SX option or the Propeller option. I have downloaded and sent to my Kindle and
Android tablets the G. Daubach manual on the SX/B now I have to find time to read it. The Propeller option
is more confusing to me since to program it there is SPIN, PASM, Propeller IDE, Simple IDE, (are they one
and the same?), BasicProp, and probably a few others. I have never programmed any higher language.
only Stamp Basic and PC Assembler and that was years ago.
Questions:
1. Can the Propeller Mini do I2C since the pins devoted to I2C aren’t brought out (before finding the SX hardware
I was considering getting a Mini but saw the I2C pins weren’t available)?
2. If I decide to go with the Propeller, what programming would be best for a beginner (also long term)
to go with?
I personally started with Spin, just like everybody else, but now I prefer C, because now there are a lot of drivers available, especially for the Activity Board. You also have access to learn.parallax.com, which has lessons for the C beginner.
There are other choices, you might want to do a search of the propeller forum for PropBasic, like I mentioned in the other thread, this is basic to be used for the Propeller. Or you can go with Forth, if that suits your tastes. Lots of choices, you will have to do some research, also keep in mind there is a Propeller II that is going to show up one of these years.
Ray
2, I am nearly 73, and my language of choice is Spin. Like you, I have no formal training in any software and with obex and the propellar forum support, I have been able to do most of what I want to do. just wish I had more time to do it!
Jim
Historically, the BS2 was a huge success and so there was and still is a lot of material provided for it. And historically, just about everyone has used Basic in one form or another.
Assembler on a PC is quite a different animal that assembler on an SX. It becomes obvious when you look at the fact that all Assemblers are very close to their CPU architecture and a PC is comparatively complex device with BIOS calls and storage. The SXes are amongst the small end of the CPU architectures.
Dealing with the language barrier...
If you want to stay with Basic, by all means do so. SX/B and PropBasic both had signicant contribution by Bean. So he may help you. The SX/B ended up with documentation the compiler and is no where near as in depth as what PBasic provides. I am not sure of the status of PropBasic.
If you want an interactive language rather than a write-compile-load language for the Propeller, there are some. I find that the interactive languages are more fun than write-compile-load languages; and adequate for many learning sessions.
You might consider Forth on the Propeller for an interactive language. There are actually 3 choices --- Pfth, PropForth, and Tachyon. All are pretty good, but styles of support drastically varies. I have some experience with all three, and strong personal preferences about which I like (which I won't share). But the simple fact is Forth on the Propeller might be a real confidence booster as results are immediate and it certainly allows one to explore the Propeller's potential in a very user-friendly way.
I hate to believe that there is a SPIN barrier as a language...
If you don't know where to begin, there is a SPIN tutorial in pdf form that came out of the Ver 1.0 of Propeller Manual. They took this out of the up-dated manuals as of Ver 1.1, and when to providing the tutorial in the compiler (like was done with SX/B). Personally, I'd rather have a PDF than documentation within the compiler, but these choices were made by others.
If you use SPIN, you really need to learn to use the OBEX for objects that help you build.
And if you want to learn PASM, it really requires you learn to manage SPIN first as even the Propeller's PASM is compiled within a SPIN code object.
I have 2 SX keys that I am willing to part with! See PM.
Jim
Go with the Propeller. The SX, for all intents and purposes, is dead (Editorial: Ubicom sucks), hence you won't find any new conversations about it here in the forums.
1. Yes, the Propeller can do I2C on any set of pins. Many of us have written I2C drivers for the Propeller. Mine (and I suspect the others) are used in commercial products.
2. Stick with Spin. It's elegant, easy to learn, and the only language that does not have to be crowbarred into the Propeller. It was designed for the Propeller, and allows one to easily learn and exploit the Propeller's architecture. After getting proficient in Spin (which does not take long), it will be easier to use the other languages.
About the ONLY real reason to stay with the SX-28 is a desire to learn how to create and manage Interrupt Service Routines. The Propeller has true parallel processing and avoids using interrupts.
I think most of us are happy to put interrupts behind us in exchange for full-duplex serial, bigger i/o buffers, generally more speed, and far more project diversity.
Nonetheless, I do hang on to my own SXes. What's paid for has a way of nagging one into a desire to fully master it. Of course, I have on my BasicStamps for similar reasons.
With the BasicStamps, they can often make quick work of a tiny task without much thought. Or they are easily shared with a friend that desires and easy starting point. I can't say that is the same with the SXes. I feel that SX/B was a bit confusing compared to PBasic (as it required some knowledge of clock timing). And Scenix/Ubicom made example code horrible to read by trying to make all demos conditional to work with all chips and any crystal speed. Guenther's book is a much saner entry point.
Still, I try to be open-mined about people wanting to learn with what they have.
up a temporary work table with both type of boards. I also put a couple of my Basic Stamps/Scribbler1
projects on the work table to take a picture of the old and the new. Hopefully I can attach a picture of it.
Thanks for all the comments.
1. Propeller Quickstart board.
2. Propeller Demo board
3. SX Tech Board
4. A 3.5 volt & 5 volt power supply plugged into small breadboard
5. Parallax USB to Serial adapter
6. Dial-a-voltage power supply (3/4.5/6/7.5/9/12 volts)
7. Scribbler1 with target sensing tower
8. top of tower for #7 with IR sensing (control with remote)
9. Basic Stamp 2P board with everything I could think of connected to it.
PcJr IR Keyboard, LCD display, RTC w/battery, Agilent displays,Dallas Static
memory w/battery, LEDs, switch inputs, serial connection to DOS PC, etc
10. PcJr IR keyboard
11. BOE-Bot
12. IR Sensor for keyboard from IBM PcJr
13. LCD display
Much depends on your choice of a RTC chip.
You just have to be careful to add a series resistor (3.9K to 4.7K will work fine) on any 5VDC logic attached to Propeller inputs. Going the opposite direction does not require resistors.
Stamp 2P board shown in a previous post. So, I ordered one of these board on EBAY.
Arduino I2C RTC DS1307 AT24C32 Real Time Clock Module For AVR ARM PIC SMD
Hopefully it will work with the Propeller or SX, if not it wasn’t that expensive.
I was also wondering whether the Propeller itself could be used as a clock instead of using a RTC.
I was also wondering whether a Atomic Clock Module (US – WWVB signal) could be used.
The only module I could find was from Merry Ole England (EBAY). Of course right now my
knowledge of SPIN/Asm is about as confusing as Einstein theory on ‘Worm Holes’ (saw
a program on History Channel at lunch time about that, and how Alien spacecraft could
use that method to travel thru space). Over time I may be able to somewhat master SPIN
but I don’t think I will ever understand ‘Worm Holes’
The clock/eeprom module doesn't care which microcontroller it's attached to; I use the DS1307 in many Propeller designs -- like this one:
-- http://www.cameraturret.com/genesis.htm#Camera
Let me editorialize here: The Arduino is like a plague; okay, not deadly, but something being branded "Arduino" is meaningless -- intended for a vast majority of the Arduino audience that doesn't want to be bothered learning about components.
Absolutely -- done it dozens of time (and, depending on code construction, one can do a simple RTC without consuming another cog). The advantage of an external RTC is date functions and battery back-up of time and date when the rest of the system is powered down.
This is temporary (won't last forever) and temporal (in your head).
Do you know why that plague called the Arduino spread so fast? Because they teamed with O'Reilly publications to tell everybody it's "easy." Smile! I was trying to port some candle code I do in the Propeller to the Arduino and wanted to jump out of my window. The only reason I didn't is that I live on the second floor and it just would have hurt (not put me out of my Arduino misery).
Take it from me -- an actor (how many rocket scientists do you see on the red carpet?) -- the Propeller is easy to program. And five minutes after you've started when you want to do something substantial, the Propeller is a hell of a lot easier than the Arduino . Period.
So far everyone of the Arduino add-ons I have purchased came without documentation and often with a manufacturer that seems to not participate in the World Wide Whatever.
It will work fine. Dallas Systems documents the chip. You might have to poke around on the internet for someone that already figured it out.
I must admit that I got spoiled by Parallax rigorously documenting everything they sell.
I do admit I have one of those Arduino RTC boards around here --- too inexpensive to pass up.
++++++++++++
You really have to options with using it.
A. Write a program to read once at start-up and have the Propeller run a clock internally that never calls it again unless power is lost.
B. Write a program that checks with the RTC each and every second for an update.
Option A might be a bit more interesting. It is the solution I would prefer.
Setting the time in the RTC is yet another issue, and that can almost be a separate program unto itself.
Another option:
C) Write some code that reads time from the RTC. Call that whenever your program actually needs to know the time.
I'm not happy with your option A) as it means I have to have Propeller code that counts seconds, minutes, hour, date etc to maintain a time/date value. Why do that when the RTC chip does it already? Especially becomes a pain if I want to have all COGs paused for power saving or want to slow the Prop clock for the same reason.
I'm not happy with your option . Polling anything is inefficient and in elegant. I can see that it might be required if the process that needs to know the time also needs to loop really fast and has no time for reading the RTC directly.
1. A main section(cog) which will control everything.
2. A section (cog) to control the RTC and report back to the Main section when a new minute has occurred.
3. A section(cog) to update the RGB LEDs every minute plus day/month
4. A section (cog) to change the time/date on RTC. I was thinking of using a Propeller Quickstart and using
the touchpads as slow/fast change of time and date.
I am not sure at this point, in my Propeller education, about cog-to-cog communication.
I need to study more code and the manual,
Using 8 RBG LEDs Such as Adafruit strip of 8 NeoPixels or 8 Parallax WS2812B modules. I wanted to use 8 boxes with the colors in them as the example but I don’t seem to have a ‘Paint’ program,
so I hope the following made sense.
Example:
HMD = Brown
LMD = Red
HDD = Brown
LDD = Violet
HHD = Black
LHD = Green
HMD = Yellow
LMD = Orange
Month = 12
Day = 17
Hour = 05
Minute = 43
I guess you are thinking that reading the RTC every minute is going to gain you accuracy. Or it is going to conserve resources on the Propeller. I doubt that either is really going to be achieved.
I would read the RTC once at power up and convert the day and date to one 32bit number representing seconds (in Unix Time) - http://en.wikipedia.org/wiki/Unix_time, set up a Propeller 'tick' for each second to advance the Unix Time number.
That would be the core of your clock inside the Propeller, just a second tick and one 32bit register representing time.
From there, you could do very simple conversions to get the time. Calendar conversions would take a bit more code due to the 365 day year and leap year.
The advantage with Unix Time is that you can use it for timers, clocks, and/or calendars. And you learn that a 32bit clock is much easier than the 8bit format that the RTC provides. In other words, it will be a lot easier to extend your code. AND, you will waste a lot less time and code resource that reading the RTC every second would require.
I suppose you could check RTC if you feel the Propeller is less accurate, but the reality is they are just about the same. So why bother?
Call UpdateClock as often as you want - it can be more or less often than every second, as long as you call it at least every 2^31ish ticks (~25-30 seconds).
In your case of your clock, you can replace the repeat while with an if because you will always be calling this function at least every second, but as a general solution for unix timekeeping without using a separate cog, you should normally use a repeat while here.
So, just to get TIME, you have to read three 8bit registers and convert over to Unix Time. DAY and DATE even require more reads. Synthesis into UnixTime is going to be a little tedious. (I really wish that someone would make a UnixTime RTC that just provides one 32bit Long)
Making the clock code is the easiest part. It just has to increase at one second ticks.
Setting the DS1307 and/or setting the Propeller in UnixTime are the bulk of the work. In theory, one could set the DS1307 from something else, like a BS2 and it would keep time while being transferred physically from one device to another.
For the DS1307 (and maybe the older DS1302), the format is this
Seconds (7 bits total) out of a byte read.
Minutes (7 bits total) out of another byte read.
Hours (6 bits for the actual hours plus one bit to flag 24/12 hour format)
I suppose that some feel strongly that once they finally got the DS1307 providing info, it is just easiest to set up a cycle to re-read it every so often. But you are going to have to select a polling cycle (1 second, 10 seconds, 30 seconds) and be late by that amount. And you are going to have to store Seconds, Minutes, and hours separately. Since the Propeller is a 32bit machine, this becomes a bit of a nuisance.
So I go with a 'one read' at power up and conversion to UnixTime. If the set time is not quite right, you can tweak the Unix time by adding or deducting from what was read.
And, it any event --- setting the clock still remains more code work than reading the time. The 8 bit registers of the RTC devices never envisioned how a 32bit device might come along and make everything simpler.
A chip like the DS1307 only has a one second resolution. So if that is good enough just read it when you need it.
The DS1307 has 8 bytes of interesting data. 64 bits clocked at 100KHz can be done in less than a millisecond. That's a lag three orders of magnitude smaller than the available clocks resolution which should do nicely.
Now. If one really wants time in terms of the unix epoch that is not exactly hard. Assuming one is content with a solution that only works till 2099, uses only UTC and knows nothing of daylight saving, one can use solutions like this: http://codereview.stackexchange.com/questions/38275/convert-between-date-time-and-time-stamp-without-using-std-library-routines
I'm sure other solutions can be found. date/time to epoch and the inverse conversion would make a nice object for OBEX.