Help with a Stamp2 Family Socket-based Prop form.

I am drafting in KiCAD ANOTHER project(I need to finish some of them one of these days.), which is a Propeller 1 form factor designed to snap into a BASIC Stamp 2 family socket. My questions are:
Which regulator should I use to bring Vin down to 3.3v?
How should I make a transistor-based(or resistor based) voltage shifter for the I/O?
Can I use the programming pins in the stamp socket for programming the prop?
Is this just absolutely preposterous?
Windows 10 Home:
Propeller Tool 1.3.2, BASIC Stamp Editor 2.5.4, Javelin Stamp IDE x.x.x, Arduino IDE, PST
Hardware:
BASIC Stamp Board of Education, Propeller Board of Education, Propeller Project Board, Propeller Mini

Me, a programmer in English class, asking for grammar help: “What is the syntax for this statement?”

Comments

  • jmgjmg Posts: 13,932
    Which regulator should I use to bring Vin down to 3.3v?
    There are shiploads to choose from.
    Package may determine it - do you want gull wing, or is DFN ok (new releases tend to be DFN ) ?
    Do you want any voltage margin ? - many regulators are designed for 5.5V max, which helps keep the cost down, but are less tolerant than higher voltage units.
    Do you want a Power Good (reset signal for Prop?)

    If DFN is ok, I like the NCP187AMT330TAG for 5.5V/PG/1.2A and the LDFM33PVR is 16V/PG/500mA

    How should I make a transistor-based(or resistor based) voltage shifter for the I/O?

    Resistor shift is simple, but not very flexible and it is slow.
    Better may be the chips designed for level shifting, with Auto-direction, which are often series N-FET in design. that acts as a low-Z up to 3v3, and then floats somewhat to be 5V tolerant.
    A low on either side is rapidly transferred to the other side.

    Examples :
    http://www.ti.com/logic-circuit/voltage-level-translation/auto-bidirectional-voltage-translation/products.html

    eg PCA9306, NVT20x series - pick a package you can handle and one that routes well. Some PCBs sprinkle more of smaller parts.
  • There are few things that are absolutely preposterous, but this doesn't make sense. Bringing Vin to 3.3V is the easy task. You still need +5V for a reference for the voltage translation. Adafruit has several different voltage translators. You might look at their website and educational material for discussions of the several possible solutions. One easiest involves a MOSFET transistor and two resistors for each bidirectional signal. In terms of programming, the Stamps require three pins (ATN, Sin, and Sout). The Propeller also needs 3 (DTR, Rx, Tx) with about the same uses.

    Look at the schematic for the Prop-mini for power and programming. I don't know how you'd fit the voltage translators for 16 I/O pins in the package you're thinking about. Resistors will only work for inputs
  • Regulator: I will look at the ldfm33pvr and check it’s package size. I’d like this thing to be drop-in compatible with almost any stamp environment.

    Shifter: I will follow that link and research later.

    Programming: I guess support(and everyone here) must think I’m crazy. My guess is that it all comes down to I/O voltage levels and what firmware is on the chip. I will see if I can find out more.

    Mike, I have the whole backside for that stuff.
    Windows 10 Home:
    Propeller Tool 1.3.2, BASIC Stamp Editor 2.5.4, Javelin Stamp IDE x.x.x, Arduino IDE, PST
    Hardware:
    BASIC Stamp Board of Education, Propeller Board of Education, Propeller Project Board, Propeller Mini

    Me, a programmer in English class, asking for grammar help: “What is the syntax for this statement?”
  • The programming protocol for the Propeller is already well described. It's quite different from the protocol for the Stamps. ATN is used like the Propeller's /RST. DO look at the Propeller-Mini documentation.
    BOOT SEQUENCE
    -------------
    
    PC:	set 115200-8-N-1
    	DTR low
    	wait at least 10ms
    	DTR high
    	wait 100ms (+-10% tolerance)
    	send $F9 (%0100111111 timing calibration)
    	LFSR: taps = $B2, initialy = "P"
    	send bitwise LFSR[250] ($FF/$FE)
    	send $F9[250+8] for bitwise responses ($FE/$FF)
    	receive bitwise LFSR[250] + version[8] within 50ms
    		if timeout or mismatch, done (hardware not found error)
    	send encoded command long (up to 3 bits sent per serial byte):
    
    		0 = shutdown
    		1 = load ram, then run
    		2 = load ram+eeprom+verify, then shutdown
    		3 = load ram+eeprom+verify, then run
    
    		if command 0, done (okay)
    
    	send encoded length long
    	send encoded data longs
    	send $F9 every 10ms for bitwise response(s):
    
    		if command 1-3,	receive bitwise checksum pass/fail within 10(?) seconds
    					if timeout, done (connection error)
    					if checksum fail, done (checksum error)
    
    		if command 1,	done (okay)
    
    		if command 2-3,	receive bitwise program pass/fail within 5 seconds
    					if timeout, done (connection error)
    					if program fail, done (program error)
    				receive bitwise verify pass/fail within 2 seconds
    					if timeout, done (connection error)
    					if verify fail, done (verify error)
    				done (okay)
    
    
    CHIP:	<reset>
    	wait for up to 150ms @20MHz for $F9 + bitwise LFSR[250]
    		if timeout or mismatch, EEBOOT
    
    	use incoming $F9 bytes to convey bitwise LFSR[250] + version[8]
    
    	receive encoded command[32]:
    
    	    if command 0, 4+: SHUTDOWN
    
    	    if command 1..3:
    
    		receive encoded length[32]
    		receive encoded data[32], dump into $0000..length<<2-1
    		fill length<<2..$7FFC with $00
    		write dbase @$0008 structure: long[dbase-4] = $FFF9FFFF, long[dbase-8] = $FFF9FFFF
    		bytewise sum $0000..$7FFF for checksum verify
    			if checksum failure, convey error on next $F9, SHUTDOWN
    			else, convey okay on next $F9
    
    		if command 1, LAUNCH
    
    	    if command 2-3:
    
    		program eeprom from ram
    			if eeprom timeout (10ms @20MHz), convey error on 2nd $F9, SHUTDOWN
    			else, convey okay on next $F9
    		verify eeprom against ram
    			if verify fail, convey error on 2nd $F9, program $0004 to $00 in eeprom, SHUTDOWN
    			else, convey okay on next $F9
    
    		if command 2, SHUTDOWN
    
    		if command 3, LAUNCH
    
    
    EEBOOT:		read eeprom into ram
    		LAUNCH
    
    LAUNCH:		if word at $0004 is not $0010, SHUTDOWN
    		setclk(byte[15] & $78)
    		wait 50ms at 20MHz
    		setclk(byte[15])
    		launch interpreter from $0004 in current cog
    
    SHUTDOWN:	dira=0, setclk($01)
    
    
    The voltage translation is based on an application note from Philips for use with I2C. Again, there's lots of information on this on Adafruit's and SparkFun's websites. A number of level shifters are for 4-bits, so you'd need 4 of them. The programming is done at 3.3V, so you won't need level shifting for ATN, Sin, or Sout. You will need to use a PropPlug or equivalent instead of the Stamp's USB to serial adapter for programming. If you want the devices to be strictly Stamp hardware equivalents, you'll need another voltage translator for Sin and Sout. You may need a couple of capacitors and resistors for ATN. You also may need a package of 3.3V inverters. The Prop's programming protocol is not at all similar to that of the Stamps and is in masked ROM.

    The Propeller could be programmed to behave like a Stamp. It would start up in a Stamp loader and load Stamp interpretive code into part of the 64K Propeller EEPROM. You'd need to write a Stamp interpretive code interpreter. Unfortunately, I'm not aware of any public documentation on the interpretive code. Maybe you could convince Ken or Chip to make it available for this project.
  • Well, I was on email with Miguel earlier. Got much of Parallax’s experience trying this out with the SpinStamp. I will need to get ahold of a set of flat pins to avoid stretching the pins on the stamp socket.

    As anything aside from the experience, this would be a bust.
    Windows 10 Home:
    Propeller Tool 1.3.2, BASIC Stamp Editor 2.5.4, Javelin Stamp IDE x.x.x, Arduino IDE, PST
    Hardware:
    BASIC Stamp Board of Education, Propeller Board of Education, Propeller Project Board, Propeller Mini

    Me, a programmer in English class, asking for grammar help: “What is the syntax for this statement?”
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 22,442
    edited 2019-08-02 - 18:52:32
    You don't necessarily need "flat" pins. Something like these would work just as well:

    https://www.ebay.com/itm/US-Stock-10pcs-2-54mm-Male-40-Pin-Single-Row-Round-Header-Strip-Gold-Plated-New/401261238204

    They're called round-pin header strips, and the pin diameter is much less than the 0.025" square pins you're familiar with.

    In my experience, the edge-soldered flat-pin connectors are almost impossible to source.

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • Thanks!
    Windows 10 Home:
    Propeller Tool 1.3.2, BASIC Stamp Editor 2.5.4, Javelin Stamp IDE x.x.x, Arduino IDE, PST
    Hardware:
    BASIC Stamp Board of Education, Propeller Board of Education, Propeller Project Board, Propeller Mini

    Me, a programmer in English class, asking for grammar help: “What is the syntax for this statement?”
  • jmgjmg Posts: 13,932
    edited 2019-08-02 - 20:37:58
    ... I will need to get ahold of a set of flat pins to avoid stretching the pins on the stamp socket....

    We used to use a sacrificial DIP socket, to transition from square pins to DIP image.
    The square pins can be persuaded to go into a Dual wipe DIP socket, but do deform it, so a dedicated 'bridge' socket protects the host socket(s) and is very low cost and easy to find :)

    Where you have top-bottom conflicts, we used to apply 'special treatment' to the inner pins on adapters, using standard square pin headers, sometimes with longer pins.
    The std header was made a snug (almost press fit) into the outer thru holes, and the inner few pins that needed to be one-sided were either bent to gull-wing them, or in very tight cases just clipped flush with PCB plane, and then soldered onto a oval pad.
  • Huh. Cool!
    Windows 10 Home:
    Propeller Tool 1.3.2, BASIC Stamp Editor 2.5.4, Javelin Stamp IDE x.x.x, Arduino IDE, PST
    Hardware:
    BASIC Stamp Board of Education, Propeller Board of Education, Propeller Project Board, Propeller Mini

    Me, a programmer in English class, asking for grammar help: “What is the syntax for this statement?”
  • It is 100% possible, but is a daunting task. This is how I did it 7 years ago: The "Prop-BSC" was a BASIC Stamp Compatible Propeller 1 module that included 5v and 3.3v switching power supplies and very fast voltage translators for the I/O. Plugs directly into the Board of Education as seen on one of the posts. This gave a perfect way to upgrade a BOE-BOT to the Propeller.

    SpinStamp2_Module_Prototype.jpg

    https://forums.parallax.com/discussion/143318/35-mini-propeller-module-propbsc-cancelled/p1
  • I for one, am impressed, AC. Andrew, I suspect your idea had staying power, but... Such is life. As for the other thing on that thread that Martin brought up. I won't mention my thoughts, consider them at your own risk.



    And this message is being sponsored by the Jacksonville Alligator society, specializing in fence climbing, and freely available security services.
Sign In or Register to comment.