Shop OBEX P1 Docs P2 Docs Learn Events
Hot Rod Stamp — Parallax Forums

Hot Rod Stamp

HumanoidoHumanoido Posts: 5,770
edited 2008-11-19 09:06 in BASIC Stamp
Is it possible? Back in the days of the Apple II series computers (6502 chip), we hot rodded the CPU by running it at a faster clock speed. The IIe had the ZIP chip and later, the Macintosh LE had a similar mod to the crystal circuit. It made a world of difference in computing applications. I have an app where I'd like to have a basic stamp run slightly faster. Aside from all the "not recommended" comments this post will get, how about some comments on the feasibility?
«1

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-10-23 00:03
    Try it.·

    Would definitely throw off all of the timing-related commands (PULSIN/OUT, SERINOUT, etc.)
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2008-10-23 00:11
    Yes, it can be done but there are limits since the SX chip usually has a settings defined for the specific resonator being used. Also, it throws off the programming software so you need to program it at the original speed or load your code in the EEPROM by some other means. As Mr Allen already mentioned you'll have to make the appropriate adjustments in your code for anything that a change in clock speed will affect.

    This is much easier to do if you are building up your own module using the OEM BASIC stamp chips from Parallax. If you want to go that route I have a PCB that can be used to carry their BS2p40 OEM chip.

    Best Regards,

    Robert
  • ercoerco Posts: 20,256
    edited 2008-10-23 03:05
    The Spin Stamp is an intermediate step between the Stamp and Propeller:

    http://www.parallax.com/Store/Microcontrollers/PropellerTools/tabid/143/CategoryID/19/List/0/SortField/0/catpageindex/2/Level/a/ProductID/448/Default.aspx

    And there is always the SX/B Basic compiler for the SX chip if you love Basic.

    Both·the Propeller and SX chips are faster, cheaper, and more versatile than any Stamp, if you want to learn·the new·language. I've been putting it off, but just last week, Paul Baker from Parallax came to visit my company. He·gave us a dynamite presentation on the Propeller, and I'm convinced that's the way to go.

    If I may play avocatus diaboli for a minute, there are non-Parallax alternative chips that use compiling to increase execution speed:

    The BasicX-24·is BS2 pin-compatible and·claims 83,000 instructions per second, compared with 4,000 for the BS-2 and 10,000 for the BS2-SX. http://www.basicx.com/·But their Yahoo-hosted support forum is not nearly as dynamic as this Parallax forum.

    There is the Atmel-Based CubLoc CB220, 36,000 instructions per second, programmable in Basic and BS2 pin-compatible: http://www.comfiletech.com/index.asp?PageAction=VIEWPROD&ProdID=4

    There is the BasicAtom24, BS2 pin compatible, runs at 33,000 instructions per second http://www.basicmicro.com/·Their forum gets pretty lonely.

    Then·there is the C-Stamp, which claims 10,000,000 instructions per second, if you want to learn C. http://www.c-stamp.com/index2.htm·Not BS2 pin-compatible.

    Interesting options, but nowhere will you find the support and cameraderie of this forum. Stick with Parallax, the original and still the best.·We know 'em and·we love 'em!



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • HumanoidoHumanoido Posts: 5,770
    edited 2008-10-23 08:47
    I was thinking of pumping up the Basic Stamp 2. I do have an OEM kit that would be perfect for the modification. If I had the knowledge to come up with a circuit, I would love to build it. I remember the circuits had a faster crystal, some 20 to 30% faster. It could run the commands that are not timing dependent. It would also have a switch to take it back to standard speed mode for loading of software. Is this a pipe dream?

    It uses a 20Mhz ceramic resonator as seen in the attached schematic. Aside from replacing it with a faster one, what other circuit changes would be required?
    267 x 210 - 11K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-10-23 16:12
    You're probably out of luck with the BS2. The PIC16F57 chip it uses is only rated for 20 MHz, so it's at its top end now.

    -Phil
  • Jesse HastyJesse Hasty Posts: 29
    edited 2008-10-23 16:27
    If I were doing this I would remove the 20 MH resonator(no small feat with SMT) and put in a 3 prong receptacle. Then I would prepare a 20 MH and a 24MH resonator with plugs to put into the receptacle. All the leads need to be very short to cut down on noise. I would guess that the PIC chip can be overclocked at least 10%. It would be foolish to manufacture chip which only worked on the very edge of the spec.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-10-23 17:28
    By the time you go to all that trouble — for a mere 20% uptick — you could be well on your way to learning Spin!

    -Phil
  • HumanoidoHumanoido Posts: 5,770
    edited 2008-10-24 01:00
    Phil, it's no trouble at all. Really, it's a wonderful challenge, and a very interesting project. Spin is highly interesting too but I'll just have to hold out until the PBASIC shows up for it. Erco, great research! - you're right - lots of options out there, but thanks no thanks - the Basic Stamp is the one that has captured my heart. Jesse, how about clocking it to 32Mhz? That's the resonator size I see offered by Parallax, closest to the original 20Mhz. Wasn't there a simple way to build a resonator circuit?
  • Jesse HastyJesse Hasty Posts: 29
    edited 2008-10-24 01:29
    You could try 32Mhz, but with an 60% overclock the PIC will almost certainly not work, i.e it will hang up. If it does work it will generate several times as much heat. You can get a resonator for just about any frequency. Let me know how it works. You may not be able to program the BS2 because the timing will be all messed up. As Robert said, you will almost certainly have to program it at 20 MHz.· I doubt that any commands concerning the SRAM will work except the read commands.

    Post Edited (Jesse Hasty) : 10/24/2008 1:37:22 AM GMT
  • $WMc%$WMc% Posts: 1,884
    edited 2008-10-24 01:32
    humanoido

    Have You thought about Parallel processer's ???. __Its just a thought__, But I have been thinking of away to use a BS2P for a (host controller) to control ( 8 )or more BS2's ..This would run along the lines that the Propeller uses. By "lines" I mean ( COG's ) or #of BS2's to control, asinging a BS2 to run for example a (keypad), another BS2 for a LCD , etc. I feel each BS2 could run a lot more than what I've listed, This is just a start and I'm tring to keep it simple in It's Idea... This would use shared RAM and EPROM and would use PBASIC lingo (something most of Us can write in) "A big plus for ME"
    Take A look @ "Supercomputeing" in the Propeller forms "by Chip G.

    _________________$WMc%_________________________IN___________________
  • HumanoidoHumanoido Posts: 5,770
    edited 2008-10-24 06:04
    $WMc% said...
    Have You thought about Parallel processer's ???. __Its just a thought__, But I have been thinking of away to use a BS2P for a (host controller) to control ( 8 )or more BS2's ..This would run along the lines that the Propeller uses. By "lines" I mean ( COG's ) or #of BS2's to control, asinging a BS2 to run for example a (keypad), another BS2 for a LCD , etc. I feel each BS2 could run a lot more than what I've listed,...
    Actually I have already done that, and I'm writing up the article to appear in one of the upcoming issues of Penguin Tech Magazine, which will be posted in the robot section of this forum when complete. Each BS2 (or other stamp variant) can run on a single wire (or optics) and that leaves 15 ports open. Most sensors, keyboard, display, RAM expansion, data logger, etc. are serial one wire devices, therefore yes a lot more can run off each microcontroller. Of course the circuits need to pay attention to other variables such as current draw, etc. What you may wish to do is begin thinking about useful, original, and creative apps for such a system, and plan various combinations of sensors and peripherals.

    Post Edited (humanoido) : 10/24/2008 6:10:19 AM GMT
  • HumanoidoHumanoido Posts: 5,770
    edited 2008-10-24 06:18
    Jesse Hasty said...
    You could try 32Mhz, but with an 60% overclock the PIC will almost certainly not work, i.e it will hang up. If it does work it will generate several times as much heat. You can get a resonator for just about any frequency. Let me know how it works. You may not be able to program the BS2 because the timing will be all messed up. As Robert said, you will almost certainly have to program it at 20 MHz. I doubt that any commands concerning the SRAM will work except the read commands.
    I expect to have a switch engagement for two clock frequencies, one for programming, one for turbo mode. It's also expected that a large amount of heat will be generated, above the design of the original chip configuration. A large heat sink or heat sink and fan combination should take care of it. I was looking at the resonator frequencies offered by Parallax. Granted, the timing related commands will be offset. Once I get it working, that condition can be examined for a possible solution. I have all the parts except the crystal. The ones in my parts box are all too slow.
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-10-24 12:44
    If you're working with a 'stock' 'plain' BS2, Parallax already sells the BS2SX which runs faster.
  • Jesse HastyJesse Hasty Posts: 29
    edited 2008-10-24 21:49
    It wouldn't surprise me if the only real difference between the two chips was the graphics.
  • $WMc%$WMc% Posts: 1,884
    edited 2008-10-25 01:08
    Humanoido Overclocking the BS2$

    I knew it could be done.and useing the PIC16C57C and a home made board would keep the cost$ down.I asume this is what You've done... : What bus wid. did You end up w/ ??? : Did You run the BS2's in sync. or phase shift them ??? : What was the Bus speed ???


    Inquireing Minds would like to know....________________%WMc$___________________________????_______________
  • TimCTimC Posts: 77
    edited 2008-10-25 03:32
    If you are serious about fast then do a search for "arm stamp". Some of the results have the same pinout as a stamp.

    Arm chips are way harder to get started on but they run at 70Mhz and are 32bit devices so you could be seeing
    10million lines of basic code a sec! Not sure how that compares with the fast 8 core Propeller which is simple to get started with.

    Regards
    Tim
  • HumanoidoHumanoido Posts: 5,770
    edited 2008-10-25 04:47
    allanlane5 said...
    If you're working with a 'stock' 'plain' BS2, Parallax already sells the BS2SX which runs faster.
    Now that's a surprise. I did a copy of the schematic for the BS2 and the BS2sx. You could exactly superimpose the two, only the BS2sx has the higher speed 50Mhz resonator.
    Jesse Hasty said...
    It wouldn't surprise me if the only real difference between the two chips was the graphics.
    What do you mean by graphics?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-10-25 04:54
    The BS2 uses a PIC while the BS2sx uses an SX processor. That's how it can use the high frequency resonator.
  • $WMc%$WMc% Posts: 1,884
    edited 2008-10-25 05:30
    TimC

    The Fun in "HAVING FUN" is when they say "It can't be done " or "Its Not gona work";"It will never work"..."Your wasting Your time"..It's the deviation from the norm. That drives this hobby!!!....Anything else would be "work related".......


    ______________________________$WMc%_________________out__________________________________________________________________
  • HumanoidoHumanoido Posts: 5,770
    edited 2008-10-25 08:39
    Thanks, Mike. I was looking at these drawings,
    one for a BS2 and the other for a BS2sx. What
    threw me off was the exact drawing for the
    processor. But now that you mention it, I do see
    the fine print differences. So the suggestion is
    to get a BS2sx and hot rod that for even
    greater speed...
    372 x 441 - 32K
    366 x 447 - 30K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-10-25 17:11
    You won't be able to speed up the BS2SX with another resonator. 50MHz is about the limit for those. You could theoretically use an external 75MHz clock, however, to drive the crystal input pin, with the resonator and feedback resistor removed. The SX will get quite hot, though, and may require more current than the onboard regulator can source.

    What is your real objective here, Humanoido? At first you were satisfied with the possibility of a 32 MHz BS2. Now, all of a sudden, the much speedier 50MHz BS2SX isn't fast enough. If you want ultimate speed from a BS2SX module, just leave the resonator in place, and make a clip-on connector that you can use with an SX Key to reprogram the SX firmware using SX/B.

    -Phil
  • Mike GreenMike Green Posts: 23,101
    edited 2008-10-25 17:34
    You need to be careful about your goals. If it's to experiment with a BS2 or BS2sx just to see how fast it will work, that's one thing. If it's to suggest to others that they try it or if you really want something to use that's faster than a "stock" BS2 or BS2sx, I'd advise against it. There's a lot of variation between individual microprocessors. Some may run faster and some may not. It will depend on ambient temperature and on the exact voltage put out by the regulator. As Phil mentioned, the supply current requirement goes up rapidly with increased clock frequency and the built-in regulator may not be able to supply it. If you can get a particular module to run at a particular frequency one day, it may not work the next day. If you want to actually use it for something, you will run into reliability problems. If you try to reprogram the microprocessor in SX/B and you have problems, you won't be able to restore it to be used as a Basic Stamp.

    If you want a speedy module with a lot of memory to use in a 24-pin Stamp socket, I'd also suggest that you consider a Spin Stamp. You do have to be careful about the I/O pin voltage since the I/O pins are 3.3V rather than the 5V of the Basic Stamps, but it's not a big deal for most circumstances.
  • $WMc%$WMc% Posts: 1,884
    edited 2008-10-25 21:43
    humanoido

    Do you have a link for Penguin tech mag???????????.All I found on a search was jiberish...


    _______________________$WMc%____________?????
  • HumanoidoHumanoido Posts: 5,770
    edited 2008-10-25 22:33
  • HumanoidoHumanoido Posts: 5,770
    edited 2008-10-25 22:59
    Mike, thanks for pointing out key points that deserve consideration.
    I'm doing experiments and learning, as you 1st mentioned. I don't
    recommend anyone try this at home. I also appreciate Phil's suggestion
    that the regulator may not be able to handle the current. There's no
    plan to sacrifice any stamps, as their condition and preservation is a
    top priority, and the power requirements will be researched in detail
    before proceeding with any experiments. The Basic Stamp 2 is the main
    consideration, but would not rule out studying other Stamp versions.
  • $WMc%$WMc% Posts: 1,884
    edited 2008-10-26 18:42
    Thanks humanoido

    for the link:I'll check it out

    _________$WMc%__________
  • HumanoidoHumanoido Posts: 5,770
    edited 2008-10-26 22:55
    Is there any circuit explanation of "turbo" mode? mentioned for these stamps

    BS2p24
    BS2p40
    BS2pe
    BS2px

    in this document

    www.parallax.com/Portals/0/Downloads/docs/prod/stamps/BASICStamp2px.pdf
  • Mike GreenMike Green Posts: 23,101
    edited 2008-10-26 23:00
    These (and the BS2sx) all use the SX microprocessor. Read the SX Manual for an explanation of "turbo mode".
  • HumanoidoHumanoido Posts: 5,770
    edited 2008-10-26 23:45
    thanks Mike. First it states the sx chip is rated conservatively.

    "11 Appendix A: SX Features
    SX-Key/Blitz Development System Manual 2.0 · Parallax, Inc. · Page 109
    11 Appendix A: SX Features
    11.1 Introduction
    The SX chip is a fully static CMOS MPU conservatively rated for DC to 50 (or 75) MHz operation. The
    SX provides 2K words of on-chip E²Flash program memory (4K words in SX48/52). In Turbo mode, all
    instructions are single ..."

    then it says:

    "· DC to 50 MHz operation (75 MHz on selected chips)"


    any idea what they are talking about, "selected chips?"
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-10-27 01:54
    The "selected chips" bit is dated info. The SX20 product page states that all chips are capable of 75MHz operation.

    -Phil
Sign In or Register to comment.