Shop OBEX P1 Docs P2 Docs Learn Events
A suggestion for a future BASIC Stamp - Page 2 — Parallax Forums

A suggestion for a future BASIC Stamp

24

Comments

  • jmgjmg Posts: 15,175
    brucee wrote: »
    Some power MOSFETs do require higher than 3.3V, but that can be accomplished with a pullup, something the P1 can not do.
    Yes, better than P1, but still a kludge, as you cannot get fast PWM rise times from a resistor pullup, and you have bumped the BOM significantly, as well as compromised the static Icc specs.

    Many parts that claim 5V tolerant, are actually NOT tolerant of 5V when un-powered.
    - and as mentioned ADC/DAC stop at 3.3V.

    It just all adds up to a lot of explaining to do with novices, all when using a 5V device is just simpler to do.
    One with VccIO can even interface to any voltage subsystem.

  • Heater.Heater. Posts: 21,230
    I'm curious. Why not use an STM32 F4. Like the tiny Espruino: http://www.espruino.com/Pico http://www.espruino.com/EspruinoBoard

  • jmgjmg Posts: 15,175
    Heater. wrote: »
    I'm curious. Why not use an STM32 F4.

    Already suggested a Cortex M4 MCU, but smarter for this application is one that is 5V operating, not merely 5V tolerant.
  • I dug through the Nuvoton NUC123 specs, which would be a similar part. Yes the analog goes 0-5V, but it looks to me like the digital IOs don't. I could be mistaken (ah that never happens :) ) , but there does not seem to be a Voh spec, but they do spec source currents with Vs of 2.4V.

    But really the choice of parts is really immaterial, there are lots of alternatives, and the questions involve more of what features would make a successful follow on to the BASIC Stamp.

    In my own mind, cost is a real issue, as educators are buying pencils for their students, so obviously they don't have a lot of money kicking around.
  • jmgjmg Posts: 15,175
    brucee wrote: »
    I dug through the Nuvoton NUC123 specs, which would be a similar part. Yes the analog goes 0-5V, but it looks to me like the digital IOs don't. I could be mistaken (ah that never happens :) ) , but there does not seem to be a Voh spec, but they do spec source currents with Vs of 2.4V.
    Yes, they have a strange spec as they have a Quasi-bidirectional mode copied from the 80C51, and that gives them specs at mid-drive.
    The Push-Pull specs do give high currents at that point of -24mA, so they are a PFET to Vcc.

    brucee wrote: »
    But really the choice of parts is really immaterial, there are lots of alternatives, and the questions involve more of what features would make a successful follow on to the BASIC Stamp.
    Agreed - & one of those features for 'a successful follow on to the BASIC Stamp' is 5V operation :)
    brucee wrote: »
    In my own mind, cost is a real issue, as educators are buying pencils for their students, so obviously they don't have a lot of money kicking around.

    The NUC123 is a smaller sibling to the M4, it is (supposedly) cheaper, and has smaller package choices, but it also is M0 core and lacks FP.
    Checking the price finds not much in it....
    NUC123ZD4AN0 QFN33 68 KB 20 KB 490 $2.5097
    vs the
    M453RE6AE LQFP64 128KB 32 KB CAN 10000 stock 250 $2.46

    There are also 5V operating M4's from Spansion (FM4), but they are maybe $1 more, but have more MHz and more Flash.

    The M453 specs an impressive loader choice :
    * 16 KB embedded ROM
    * Supports Nuvoton native In-System-Programming (ISP) for UART0, SPI0, I2C0, CAN and USB

    To me, the M453 looks good value, but it's probably easy to trail FM4 parts too.
  • brucee wrote: »
    No this is not an open source compiler. While not invulnerable there is a firmware code that includes subroutines (like printf, divide ...) and a bootloader that can be read protected.
    Is the compiler going to remain closed source or do you intend to make it open source eventually? What about the runtime?

  • bruceebrucee Posts: 239
    edited 2016-01-08 14:41
    No plans to go open source, not sure why I would want to do that, it would be a lot of work to clean it up to make it presentable. We have been crawling around the code for a long time so we are pretty familiar with it, and at present there are no known bugs.
  • Heater.Heater. Posts: 21,230
    Why open source?

    Because it's well into the 21st century and that is what we do. If you want to attract developers and users, especially for educational purposes, open source platforms are expected. See the phenomenal success or the Adruino, Raspberry Pi, Espruino and others.

    Because we have just spent five years and more getting Parallax on board with the Open Source idea.

    Because closed source is just another closed road with a dead end.

    Because, well, why not? Who cares about "presentable"?

    Because you might find collaborators popping up to contribute to clean ups and optimizations or new features.

    What's to lose? Much to gain.

    I'm somewhat surprised to see Parallax wanting to use an ARM for a STAMP remake rather than a Propeller. But, hey , I have no idea about STAMP users, applications or that market.








  • jmgjmg Posts: 15,175
    edited 2016-01-08 19:55
    Heater. wrote: »
    I'm somewhat surprised to see Parallax wanting to use an ARM for a STAMP remake rather than a Propeller. But, hey , I have no idea about STAMP users, applications or that market.
    At first glance the Prop is the natural next step, however the hard 3v3 limit on that is pretty much a 'drop dead' problem in the STAMP upgrade sector.
    That same issue (plus sheer package size) will also remove P2 from the list, so Parallax do need to look around for something to bring STAMP into this millennia.

    I have seen P1 PCBs with level shifters added, a bit of a kludge, but they also have failed to hit critical mass.

    Heater. wrote: »
    I'm curious. Why not use an STM32 F4. Like the tiny Espruino: http://www.espruino.com/Pico

    I do like the form factor of the Pico, at least the 0.1"/Edge-SMD dual choice. That's becoming common.

    The USB tongue I'm in two minds about - it bumps the PCB to 2.0mm, and it impacts the compatible-outline, but it is cheap.
    Micro USB connectors are more 'expected', and do not need to impact the compatible-outline.


  • Heater.Heater. Posts: 21,230
    What is the obsession with 5v? When nothing runs at 5v anymore?
  • jmgjmg Posts: 15,175
    edited 2016-01-08 21:13
    Heater. wrote: »
    What is the obsession with 5v? When nothing runs at 5v anymore?
    Err,.... the BASIC Stamp it hopes to replace for one, does.
    If 'nothing runs at 5V' why do these companies bother doing 5V ARMs ? (that can also run on 3,3V, if the user wants)

    This is what Freescale (NXP) says on the topic of 5V:

    "The 5V Kinetis E series MCUs, based on the ARM Cortex-M0+ core, are designed to maintain high robustness for complex electrical noise environments and high-reliability applications."

    Yup, you quickly find a lot of Automotive and industrial stuff likes 5V. ( also USB is 5V, Phone chargers are 5V...)

    Ever tried driving a High Power MOSFET with a feeble 3.3V ? ;)
  • Heater.Heater. Posts: 21,230
    Well, OK.

    You are talking to a guy who started out with 300v tube circuits and was later running TTL off a 12v motorcycle battery. For a while :)

    I kind of miss the 4000 series CMOS logic days. Low power, wide supply range.

    Where did it all go wrong ?
  • jmgjmg Posts: 15,175
    Heater. wrote: »
    I kind of miss the 4000 series CMOS logic days. Low power, wide supply range.

    Where did it all go wrong ?
    :) 4000 logic is still alive and well, and can be the best choice for RFI immunity.

  • I guess I am somewhere in the middle on 5V. Last place I consulted 5V tolerance was designed into almost all microcontroller parts, it just makes interfacing easier. The big push there and other places these days is for battery operation which means voltages 3.3 (Li battery) and below, often down to 1.8V. And even then the IOs were 5V tolerant.

    For most things where 5V logic CMOS was involved, if it was a couple lines, a pullup was good enough, but for buses, a bus driver/level translator was used. Lots of those to chose from these days, as often there are a number of different power rails around even in small handheld devices.

    Yes I know a MOSFET wants more drive, but these days I use gate drivers for big and or fast MOSFETs, and those almost all handle 3.3V.

    As for what I perceive the DIY and educational market place to be, there is a lot of 5V stuff out there, and I think 5V tolerance would be on that requirement list.

    On the analog side 10V ADC/DACs are still prevalent in industrial control, and pretty much everyone just does that with external parts.
  • Heater.Heater. Posts: 21,230
    Looks like the future BASIC stamp is here today: http://www.esp8266basic.com/
  • Heater. wrote: »
    Looks like the future BASIC stamp is here today: http://www.esp8266basic.com/
    There is quite a bit of flash space on the ESP8266-01 module so it should be possible to do some interesting things with it.

  • @Heater: I tried to use that Basic, but couldn't get it to save programs. Have you had any luck with it? I ended up switching over to Lua with NodeMCU. Maybe I should give it another try. But I want to spend some time trying out Piper Minecraft with my daughter first. (Anyone with a Pi and some spare parts can download an SD image and try it out.)

    One thing that I don't understand is what would be wanted in an update of the BasicStamp. Is this being considered due to to parts being EOLed, or to update the environment? Do you keep complete backwards compatibility, but then add optional extensions for advanced users? e.g. Offer a PWM alternative to PULSOUT for servo control. If you don't keep backwards compatibility and thus the ability to make use of all of the educational materials that have been developed, then do educators really want yet another flavor of a tethered Basic?

    I think that the Micromite flavor of Basic is interesting. And it has the ability to accept custom code like the Basics I used growing up. So you can basically poke in machine code. There was some interest around it here on the forums. But there are so many shiny things to distract one these days. I replaced those chips with ESP8266s.
  • tonyp12tonyp12 Posts: 1,951
    edited 2016-01-09 19:48
    5V ARM from Cypress or NXP/freescale.
    http://www.mouser.com/Semiconductors/Embedded-Processors-Controllers/Microcontrollers-MCU/ARM-Microcontrollers-MCU/_/N-a85pcZscv7?P=1yzu0h8Z1yzvtb9Z1yy9vtfZ1yzrjtmZ1z0wti1Z1z0w7e7&Ns=Pricing|0

    Create a C precompiler that hides a event machine in main.c and set up timers for functions to use for their delays
    no while(wait for pin) or cycle_delay(>100) allowed.
    And all event functions need to use a state machine, the precompiler will change the state allies names to case : xx
    There are pre-defined state flags like, state.init and state.restart
    As switch-case allows break anywhere or fall through to next case, any person can write code for it even if it's in C it looks very Basic like.

    I have created system just like that on a msp430G2553 (no precompiler that hides the manual setup though)
    Allows me to have 16 task that all multi-task nicely.
    IRQ are mostly used to set flags for the main.c eventmachine, or very short routines so other IRQ's can trigger fast too.

    There is no hardwait while() or __cycle_delay(), so when there it's nothing to do, the mcu and dco shuts down automatically,
    and system is consuming 1uA while waiting for a timer or gpio event.


  • jmgjmg Posts: 15,175
    edited 2016-01-09 20:45
    KeithE wrote: »
    One thing that I don't understand is what would be wanted in an update of the BasicStamp.

    First, we glance at a Stamp spec

    * ~4,000 PBASIC instructions/sec
    * RAM Size: 32 Bytes (6 I/O, 26 Variable)
    * ~500 PBASIC instructions (2 KBytes)
    * PBASIC Commands: 42

    Now, apply the questions
    KeithE wrote: »
    Is this being considered due to to parts being EOLed, or to update the environment?
    With 26 Bytes and 500 Instructions, that gives less user resource than a 31c Microcontroller, which is orders of magnitude faster.
    An update is clearly needed.

    Even just 32bit VARs, (lots more) and (lots) more code, plus the significant boost in speed.

    ADC (and possibly DAC) will come for free.
    KeithE wrote: »
    Do you keep complete backwards compatibility, but then add optional extensions for advanced users? e.g. Offer a PWM alternative to PULSOUT for servo control. If you don't keep backwards compatibility and thus the ability to make use of all of the educational materials that have been developed, then do educators really want yet another flavor of a tethered Basic?

    Yes, Backwards Compatibility is clearly high on the list for any replacement, for all the reasons you list, and more..
    That's one reason 5V ARM is mentioned.
    KeithE wrote: »
    I think that the Micromite flavor of Basic is interesting. And it has the ability to accept custom code like the Basics I used growing up. So you can basically poke in machine code. There was some interest around it here on the forums.

    It really should not be hard to create a backward compatible language, and give users the choice of interpreter, or compiler.

    Even a Spin-Bytecode handler would fit in the code space as well, in the smallest candidates.

    Then there is Debug ....
    KeithE wrote: »
    But there are so many shiny things to distract one these days. I replaced those chips with ESP8266s.

    Yes, RF links would be high on a list, but best managed as an option. There is still quite an impact on size and price from adding Wireless (Wifi, bluetooth et al)

    Some of these systems already have a form of Basic - see heater's link above and BlueGiga have optional BGScript :

    https://bluegiga.zendesk.com/entries/22412436--REFERENCE-What-is-the-difference-between-BGScript-BGAPI-and-BGLib-

    Atmel approach modules with a separate CPU and RF block, which is probably the best path for an optional add-on.
  • jmgjmg Posts: 15,175
    edited 2016-01-09 20:45
    tonyp12 wrote: »
    5V ARM from Cypress

    Good point, I keep forgetting about Cypress.
    Their PSoC4 is 1.8~5.5V and has just added BLE, and they keep 1.9~5.5V Spec- sampling 256K now.

    http://www.cypress.com/products/psoc-4-ble-bluetooth-smart

    I find CY8C4127LQI-BL473 for $2.331/1k at 128kF 16kR 48MHz M0 Core.

  • Heater.Heater. Posts: 21,230
    KeithE,
    I tried to use that Basic, but couldn't get it to save programs. Have you had any luck with it?
    Sorry no. I was done with BASIC in 1973.

    If I had some ESP8266 on hand I'd probably be tinkering in Lua or Javascript on them.

  • I got your module in the mail today. I'm going to download your IDE and try it later. Thanks!
  • Don't forget to look at the Microchip dsPIC30F which runs at 5 volts. They have up to 8K of RAM and 144K of program memory. But you gets lots of I/O and peripherals.

    Only problem is that they are rather pricey at about $10 in singles.

    On the bright side they are available in DIP and TQFP packages.

  • David Betz wrote: »
    I got your module in the mail today. I'm going to download your IDE and try it later. Thanks!
    I installed the CBasic folder on my Win10 laptop and tried running ParallaxIDE but I couldn't get it to talk to the stamp module. It sees the serial port but it doesn't seem to communicate.

  • Win10 is a moving target right now. I have not turned off auto-update, not sure you can. But over the past 3 weeks, I have seen all connections to network printers disappear and reappear. One old program I had did not work correctly, now seems to be, but crashes in certain operations. The same holds true for serial. TeraTerm seems to have no issues talking to the ARMstamp, but my Tcl based program I use for testing was working fine now is not. And I have seen issues with the Qt based terminal program based on propterm.

    Some of the issues Parallax may have run into, but so far haven't had any info sharing from Parallax. We based our code on version 0.30.1 of Parallax IDE. One thing we saw was that both Win8 and Win10 take a long time to release a USB serial port on close. This is an issue for the load/execute cycle on propterm and propload of that version. We got around it by keeping the serial port open and merging those 2 programs.

    But you should at least see COM3 seems to be the typical serial port assigned to the LPC USB serial driver. If you hit STOP you should see Welcome message

    com_3.jpg

    So for now, I'll patiently wait for the next auto-updates of WIn10com_3.jpg
    761 x 481 - 83K
  • I think "upgrading" from Win7 to Win10 was a big mistake. Unfortunately, I can't really undo it now. I can't get Tera Term or PropTerm to work. As you say, I'll have to wait for an update.
  • Yeah Win10 is an improvement over 8, not so sure on 7. To see if we are on the same page, start up TeraTerm, open COM3 (baud rate is ignored), and type in ctl-C, which is the reset to this version of the board. See if you get the welcome message.

    If you have been working on Qt Parallax IDE on the Mac, I'd be willing to work on getting that up. What version of gcc were you using for the Propeller?
  • brucee wrote: »
    Yeah Win10 is an improvement over 8, not so sure on 7. To see if we are on the same page, start up TeraTerm, open COM3 (baud rate is ignored), and type in ctl-C, which is the reset to this version of the board. See if you get the welcome message.

    If you have been working on Qt Parallax IDE on the Mac, I'd be willing to work on getting that up. What version of gcc were you using for the Propeller?
    I've played with Qt a bit on the Mac. I've built SimpleIDE on occasion as well as some other stuff. Also, my current WiFi loader for the Digi Xbee module is written using Qt.

    I'm currently using PropGCC build from my propeller-gcc repository: https://github.com/dbetz/propeller-gcc

    I believe this uses Eric's latest version of GCC and binutils.


  • I went looking for a Macintosh OS X driver for this NXP chip but couldn't find one. Do you know if one exists?
  • I guess we can't get very far without that, I will check with my NXP contacts.

    I don't want to muck with Parallax github, so I won't post the code there, I guess I could setup a parallel one, though I really haven't been tracking code changes and my stuff was based on version 0.30.0.
Sign In or Register to comment.