Shop OBEX P1 Docs P2 Docs Learn Events
What is a µ-controller with OTP memory type? — Parallax Forums

What is a µ-controller with OTP memory type?

FlotulFlotul Posts: 24
edited 2006-03-19 13:57 in BASIC Stamp
Hello,

Having a look at the Basic Stamp's FAQ document, I can see that the BS2 model is fitted with a PIC16C57.

In the data sheet from MICROCHIP, it is stated that·this µ-controller·has an "OTP" memory type.

In my understanding, OTP stands for One Time Programmable. But in fact, as far as I can use my differents stamps up to today, I can reprogram them any time I like.

I'm confused.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Roger

Savigny, SWITZERLAND (french speaking part)

Comments

  • BeanBean Posts: 8,129
    edited 2006-03-15 12:11
    Roger,
    The PIC16C57 contains the basic interpreter NOT you basic program. Your program is stored in an EEPROM that is also on the BS2.

    The interpreter code in the PIC reads your program from the EEPROM and performs whatever action it requires.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Wise men know when they're right. The wisest also·know when they're wrong."
    ·
  • FlotulFlotul Posts: 24
    edited 2006-03-15 12:37
    Okay, sounds clear to me.

    Thank you, Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Roger

    Savigny, SWITZERLAND (french speaking part)
  • JohnnyBJohnnyB Posts: 13
    edited 2006-03-16 18:27
    Bean....so what you are saying is the BS2 doesn't utilize the program storage of the PIC16C57 at all?· That the program storage takes place outside the PIC16C57? And the PIC16C57 just runs the commands it recieves from outside?
    Is the PIC16C57 used in the BS2 different from the standard OTP, or does the BS2 just not use it's internal program storage?
    Thanks,
    JohnnyB
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-16 18:32
    The only "storage" space in the PIC that your program gets is RAM space for variables; all program code resides in the EEPROM. The interpreter (programmed into the PIC) fetches/decodes/executes those tokens. The PIC is indeed an OTP; once the interpreter is put into it, it's there forever.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Tom WalkerTom Walker Posts: 509
    edited 2006-03-16 18:36
    JohnnyB,
    The PIC does use the "storage space", as you refer to it, of the 16C57...but only to hold the PBASIC interpreter. As you have noted, this is a One Time Programmable part so nothing in the PIC is changing (in the program space). Thi PIC is running a program, Parallax's Intellectual Property, which fetches PBASIC "tokens" from the EEPROM and interprets them. These "tokens" are created from your source code by the .dll which Parallax generously provides for third party use and is part of the IDE and then they are downloaded to the EEPROM as part of the programming process...again by the .dll.

    HTH

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • JohnnyBJohnnyB Posts: 13
    edited 2006-03-17 15:59
    Thanks guys...that clears it up for me.

    Next question:
    So if I create a program in a prototype project that runs on a BS2, is there anyway to boil this down to the code necessary to burn it right to an off the shelf PIC16C57?
    Just having the token code wouldn't do it because that still requires the interpreter?

    The end game here would be using the BS2 to prototype a circuit and program code that could then be used in a product that doesn't require a BS2, but just the PIC16C57 with a permanent program installed.
    JohnnyB
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-03-17 17:05
    There may be a Basic Compiler out there that can do it for you, but I can promise you that it won't be cheap...

    Do you need to use a PIC?
    If your concern it the relatively high cost of a BS2 compared with a 'off the shelf' PIC, you may want to consider the SX chips instead, as they can be programmed in SX/B, a Basic-language that you DO compile onto blank chips.

    Simplicity of Basic, speed like a greased ferret...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-03-17 17:18
    JonnyB -

    The closest you're going to come is to use the PIC Basic Pro Compiler from Micro Engineering Labs. There you can use their compiler to create native PIC object code to later be "burned" in a PIC. Here is their web site, but bring your wallet:
    http://www.melabs.com/

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • JohnnyBJohnnyB Posts: 13
    edited 2006-03-19 09:07
    So the main expense is primarily the compile software? I've seen the actual hardware to burn the chips pretty cheap...even build it yourself.

    SX sounds like a decent option too.

    In the final analysis it would probably turn out that in the volumes I'd be talking (low) a BS with it's onboard circuitry would probably be the best bang for the buck.

    I have a lot of learning to do before I can come anywhere close to making any realistic estimates of feasibility, cost, etc.

    Thanks guys,

    JohnnyB
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-03-19 13:57
    Silicon is just sand, it is the people that provide the intelligence to make it do wonderful things.
    The primary expense is to keep the doors open and the knowledge flowing.

    Many of us just naturally start out thinking that 'reverse engineering' a BasicStamp would be a piece of cake, but begin to find out that there is a lot of experience and history behind it.

    While I may be near to doing so than three years ago, I am not sure I would want to. I would probablly have to eat and sleep computers for another few years and then taking it to market would still be far behind the competiton [noparse][[/noparse]Parallax of course]

    If you want to do Basic and get into some Assembler, the SX-28 at $3USD each is way ahead of the BasicStamp in cost. But, there is a lot more learning eventually involved.

    It is the journey, not only the destination that is rewarding.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
Sign In or Register to comment.