Shop OBEX P1 Docs P2 Docs Learn Events
Open Letter on Prop 2 Polishing — Parallax Forums

Open Letter on Prop 2 Polishing

Invent-O-DocInvent-O-Doc Posts: 768
edited 2012-10-02 14:06 in Propeller 1
There is a lot more to a successful microcontroller platform than the chip, which is essentially done. The thing has to be made into a product. Here is my take on doing prop 2 boards and library for what it is worth. I'd like to hear what other people think about these ideas.


Propeller 2 Suggested Form Factors

One big problem with propeller 1 boards is that there are too many of them and it causes a great deal of confusion because there is no commonality. Although Arduino boards are proliferating and starting to have the same problem, many of them share the same form factor so it doesn't matter so much. Also, the third parties mostly develop shields and prototype surfaces for the Arduino reference platform. Using shields lets people do a lot of different things with the same board.

I would choose some common dimension for most of the boards too, either Arduino size, propeller platform size or 4”x3” like we use now. Every board should have two sets of 40-pin holes (one on each side) for 80 pins that can be accessed. Those pin holes can be filled with a 40-pin female connector to allow for stackable expansion/boards. Notice that I’m only recommending two prop 2 boards (the pro one is really a shield).

Here are suggested form factors:

Prop 2 Proto Board – Keep it very similar to the existing one. Prop 2, crystal, power supply, +/- USB prog, VGA holes. Remove keyboard/mouse holes and put voltage regulators there. Have prototyping space in middle. Have 40 pins of holes at top and bottom of board for a total of 80 pinouts (maybe less than 80 for data pins). (adding a female header to one or both sides makes this into a quickstart sort of thing). Notice absence of external ram, kb/mouse pin space and SD-card holder (although it might be worth pricing it out.) If used with headers, can use same shields as prop 2 board.

Prop 2 Board – standard form factor. This board contains all prop proto board stuff except prototyping space. It has two sets of 40 pin female headers at top and bottom for stackable expansion. Has onboard external RAM and SD-Card socket. Think new BOE lite for prop 1. Have VGA and maybe composite & kb/mouse connectors. This will be the main board that people use and main basis for adding shields. Example shields: protoboard, servos/more power, etc… Any other cool expansions - just develop or have third parties develop shields. Expansion boards for prop1 quickstart might work with it.

Prop 2 Professional Development Board – same size as last one but no prop2 connected. It is raised off the ground with standoffs and a regular prop 2 board goes underneath to provide the microcontroller. Have pins come out at both Left upper and right lower sides (40+ each). Include 8 digit seven seg display (or 14 seg prewired), sound amp, speaker (please) and a bunch of other stuff of your choosing. Consider pre-wiring some or all peripherals you place. Having the prop 2 board/prop 2 proto board underneath gives more prototyping space at the cost of doing two boards. Think of the prop 2 PPDB as a way over sized shield.


Propeller 2 SPIN Interpreter/Compiler

SPIN is daunting for less experienced users to get started, despite the fact that it really gets easier over time as you learn the concepts and learn to take advantage of the object library. Its biggest weaknesses are the difficult string handling and syntax involved in string and floating point operations by using imported objects. Here is a practical solution:

STRINGS – have a built in string variable type. Essentially include a string library inside spin that only loads if the user declares a string variable somewhere (you can still do null terminated bytes for memory scarce use). That way, you can avoid all the cumbersome string methods and allow for operations within normal syntax. (IF strA == strB THEN, strA := strB (strcopy), MID$ etc…)

FLOAT – add a float variable type that only loads the methods if one is declared in the program. That way people can type in regular math operations without having to resort to the cumbersome syntax of external objects. (a := b * 2.5)

OTHER

TIMER object and delay methods should be built in and easier.

Also, I assume there will be analog pin functions and maybe things to control pin timers and automated PWM, etc.

Consider defaulting local COG color table memory for local variable use unless statement included to reserve it for color table or other specific purpose.

Maybe find way to hide upfront complexity of crystal, PLL settings, etc.

RESET method


Propeller 2 Library Items

It is assumed that we will continue to use default pins for various library object purposes like with prop 1 (pins for video, keyboard, debug, sound, etc).


SD-Card file system & DOS

The SD file system and driver in the default library needs to be really easy to use and should be robust, including ability to play various WAV files.

A DOS like PropDOS (equivalent to Atari SpartaDOS or really CP/M command line) would be great to include in default build. With SD-cards, I imagine that people will load lots of programs onto a Prop 2 and load them at will using the prop and a keyboard/monitor or through serial terminal. This should be largely developed already for prop 1, but just needs some refinement and inclusion into the IDE library.

Decide if file system obliterates memory when new executable loaded (including its own copy of file system, etc) like current prop 1 implementations do, or if you want to assign first cog and memory spaces for file system/dos like computers. No strong opinion here.

Consider file system / SD card driver as part of multithreaded driver to include kb/mouse IO and basic communications (serial, I2C, etc)


Video Drivers

I assume one will include tile text drivers for VGA, NTSC/PAL and Component HD. That is cool, but make sure the methods that access them and do text are more robust as far as feature set, include scrolling and have changeable character sets. Built in video generation is a major propeller competitive advantage over other inexpensive microcontrollers.

Bitmap graphics drivers that use built in 128k RAM can learn from Atari/Amiga 16 bit computer for pretty good graphics without need for external RAM. I’m sure you or someone else will build something even better that uses external RAM. Go for modes that use 32k or 64k of RAM. You can get 320x200x16, 640x200x4, 640x400x1 for around 32k. 64k gets you VGA resolution with 640x400x16 colors and TV resolution with 256 colors. 640x480x1 takes 38k, 640x480x16 takes 75k without need for tiles.

Ease of color selection in object is important to making graphics objects easy to use as well. Consider color palate with 8-bit color definitions (top nibble hue, bottom nibble luminosity).

Graphics Object (most important to me): Needs to be more feature laden, robust and easy to use. Should include normal plot, line, line thickness as well as shapes like rectangles, stars, circles and filled variants. Fill method. Copy rectangular screen memory. Sprites (easier to use, maybe collision). (I’ll make a turtle graphics library) Don’t neglect text methods for graphics screens. Easy graphics commands are really important – especially for beginner/intermediate users that can do something that looks nice very easily.

Tortilla Maker Control Object: Just kidding.
«1

Comments

  • jazzedjazzed Posts: 11,803
    edited 2012-09-28 13:01
    I beg Parallax to pick a board size with hole dimensions that will fit in some cheap and common off the shelf ABS plastic enclosure.

    Thanks,
    --Steve
  • gergtechgergtech Posts: 7
    edited 2012-09-28 13:22
    I have to agree with Invent-O-Doc,
    Although the P8x32A is a good cheap starting point for designs, I find my self looking for a board layout I can also use with shields to get my project from concept to market (similar to Gadgets Gangsters Propeller Platform module (with design help from Jonny Mac). The current BOE, Professional Development Boards and quickstart modules, all of which I own a couple of each, are great for initial prototyping but are poor form factor for final production. In my business, my clients only have need for quantity of under 2-5 units for the entire project, making it hard for me to large runs of PCBs. Currently I have to use my own designed Prop shield, which I also have to solder and QC. I would rather pay a company like Parallax or Gadget Gangster(still cant wait until there Prop Platform boards come back into stock) since I'm sure they could keep there costs lower than mine since they have access to large runs and access to the equipment to manufacture complete SMD boards and I still have to make my boards by hand.

    I am not asking for an equivalent to the Industrial Stamp Board with a cost of over $200+ but I would be willing to pay $60-$90 for a GOOD shield based mother board, and design my own shields for my projects.

    Just my $0.02
  • Mike CookMike Cook Posts: 829
    edited 2012-09-28 13:54
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-09-28 14:18
    jazzed wrote:
    I beg Parallax to pick a board size with hole dimensions that will fit in some cheap and common off the shelf ABS plastic enclosure.
    I agree 100%. You should always start with the enclosure and work backwards from there. It astonishes me how few people do it that way, though. Custom boards are way easier to do than custom enclosures.

    BTW, enclosures that use separate flat panels for connector and control cutouts are the easiest to work with.

    -Phil
  • Peter KG6LSEPeter KG6LSE Posts: 1,383
    edited 2012-09-28 14:18
    to add.. the Pre wired ports are a good Idea .. a 3 row Pin .01 header to use IDE Drive jumpers to Tie pre set Pins to the outputs is way more clean then Male wires in a set of holes




    If you jumper the prop row ( 2 ) to any on row (1) the Pins go to VGA ect . Ig you put them on 2 to 3 then they hit the female Headers that are common .


    and this way you can clean Set if its a normal Hole on a bread board OR a to a On the board port
    and as a side advantage !

    you can use COTS SCSI 50 Pin down to 4 Pin cables to jumpper from male Pin board to a daughter board

    or cut said cables and have Nice easy to get al in one header to single wire harnessess at any computer shop and this lets you Plug in a board

    Its Very close to the way the LCD was added to the Stamp PDB up in the corner ..

    I got the 2 way Idea from a motherboard on a PC where you can jumper USB to some future Front USB plugs or the ones on the back in place ...
    Odd but it really sparked my head
    peter
  • jazzedjazzed Posts: 11,803
    edited 2012-09-28 16:22
    I agree 100%. You should always start with the enclosure and work backwards from there. It astonishes me how few people do it that way, though. Custom boards are way easier to do than custom enclosures.

    BTW, enclosures that use separate flat panels for connector and control cutouts are the easiest to work with.

    -Phil

    Indeed.

    I like this one for example. http://www.hammondmfg.com/pdf/RM2015S.pdf Approximate dimensions: 1) enclosure 4x5x1.2", 2) PCB mounting holes 3.15x2.362" Size achievable with Free Eagle or other CAD packages. Front and back panels are easily crafted with laser cut services using Inkscape art (front-panel concept attached). RM2015S are cheap ($3 each 50 at a time) and I have some to give away if someone would like one.
    439 x 90 - 9K
  • RaymanRayman Posts: 14,670
    edited 2012-09-28 16:38
    Thomas, You mentioned Arduino... Maybe an Arduino compatible board for Prop2 would be a good idea...
    With GCC finished, that should offer a way for all those Arduino guys to migrate over when they need more power...
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2012-09-28 17:36
    OK, so it sounds like there is some agreement on the type of form factor (something with female headers that accommodates a shield). The idea of mounting holes that match common cases is a great idea I didn't think of.

    What about the idea of Professional developer board as a giant shield? What about the software/object side?
  • jmgjmg Posts: 15,173
    edited 2012-09-28 17:51
    Propeller 2 Suggested Form Factors

    One big problem with propeller 1 boards is that there are too many of them and it causes a great deal of confusion because there is no commonality. Although Arduino boards are proliferating and starting to have the same problem, many of them share the same form factor so it doesn't matter so much. Also, the third parties mostly develop shields and prototype surfaces for the Arduino reference platform. Using shields lets people do a lot of different things with the same board.

    I like the superset that freescale did, the original Ardunio seems to have far too few IO pins
    See here :

    http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=FRDM-KL25Z&tid=vanFRDM-KL25Z
    Prop 2 Proto Board – Keep it very similar to the existing one. Prop 2, crystal, power supply, +/- USB prog, VGA holes. Remove keyboard/mouse holes and put voltage regulators there. Have prototyping space in middle. Have 40 pins of holes at top and bottom of board for a total of 80 pinouts (maybe less than 80 for data pins). (adding a female header to one or both sides makes this into a quickstart sort of thing). Notice absence of external ram, kb/mouse pin space and SD-card holder (although it might be worth pricing it out.) If used with headers, can use same shields as prop 2 board.

    The simplest board needs to be a Breakout style, enough HW to actually run, but little else, and if it does have 'extra fruit' like touch buttons, they should be saw-able.
    PCB lands for connectors are a good idea, but the cheapest version should not fit all connectors.

    Note that FRDM-KL25Z is $12.95, and it has a quite nice folder-model, for download.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-09-28 19:23
    I don't use my PPDB much. Never really used the display. VGA/HDMI may better translate to a shield/plugin that can go into a prototype case. Things seem to be headed more toward plug in comparable modules rather than a big developer smorgasbord. That's just me.
  • jazzedjazzed Posts: 11,803
    edited 2012-09-28 19:37
    I have 2 empty PPDBs on my desk collecting dust. A huge PCB is expensive - makes sense if it has circuits on it though. Just buy a breadboard and put a propeller on it like the PEKit.
  • Bill HenningBill Henning Posts: 6,445
    edited 2012-09-28 20:09
    It's not just you; and as Steve mentions below, the PPDB's huge PCB cost a lot more.

    I like "motherboards" with small modules.
    mindrobots wrote: »
    I don't use my PPDB much. Never really used the display. VGA/HDMI may better translate to a shield/plugin that can go into a prototype case. Things seem to be headed more toward plug in comparable modules rather than a big developer smorgasbord. That's just me.
  • cavelambcavelamb Posts: 720
    edited 2012-09-28 20:37
    Rayman wrote: »
    Thomas, You mentioned Arduino... Maybe an Arduino compatible board for Prop2 would be a good idea...
    With GCC finished, that should offer a way for all those Arduino guys to migrate over when they need more power...


    Martin has one on the shelf!
    ASC - Arduino Shield Compatible.

    With SD card, 64K EEPROM, and WinBond chip.

    What more do you want??
  • pedwardpedward Posts: 1,642
    edited 2012-09-28 23:51
    What would you think of a Eurocard (160x100) sized board? Extruded cases for that size are very easy to get. That size motherboard would permit 2 2x3 daughterboards to fit, with connectors on the edges for power and standard I/O (serial, VGA, keyboard/mouse, terminal block).

    FWIW, I have a bunch of leftover Megasquirt cases that are this size, so I thought it would be useful.

    I like the dual 40pin DIL layout, that gives you something like 64bits of I/O and a bunch of interleaved power, and it's really easy to layout. For those that want simple board layouts, the low ordered 32bits could be on the inner row of pins, with the 32-63 on the outer rows of pins.

    After looking, it seems that the Propeller Platform pinout could be adapted to this. 40pin DIL would give you all the PP pins except Vin, which is great! Seems the PP layout can be extended to support 64I/O for the P2.
  • WBA ConsultingWBA Consulting Posts: 2,934
    edited 2012-09-29 01:41
    jazzed wrote: »
    I beg Parallax to pick a board size with hole dimensions that will fit in some cheap and common off the shelf ABS plastic enclosure.

    Thanks,
    --Steve

    +infinity

    I don't have many pet peeves about development products, but one is a readily sourced box to fit it in. I actually have a full Propeller design (that was shelved for other priorities) that is Propeller Platform compatible and fits in the Polycase AG-54 enclosure. That particular choice works great as a handheld or a desktop enclosure. The Gadget Gangster PP-USB fits reasonably nice in both the AG-43 and the VM-35 with minimal modification (shaving the edge of the board a bit). I think Polycase would be a wise choice to partner with. I have worked with them on many projects with great success and they at least see the value in this type of market. They can do machining and silkscreen at excellent prices. In volumes, the costs are more than reasonable. Don't take my word for it, check out their Raspberry Pi case..... ($16, fully machined, silkscreened on multiple sides, and includes light pipes for the LEDs)
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-09-29 02:35
    For what it is worth, here are a few suggestions for a board. I realize the Propeller II is a 128 pin chip, so there is going to be a lot of concern about wiring. We are NOT going to get a DIP solution, so we need something that really allows users that are not SMT savy to get immediately into the device.

    1. The barrel plug can exist, but allow the user to solder on a simple alternative. There are times that one wants to insert a board in a generic box and that barrel plug messes with the whole construction looking clean.

    2. Don't bother with proto-typing space on the board. Go back to Parallax roots with the BasicStamp and make the board a supported micro-control product. And don't feel Parallax has to make this a stackable module for everything in its future (that is an impossible goal)

    3. Don't try to off load I/0 interface to ribbon cables UNLESS it is an LCD interface (as LCDs support the other end of the ribbon cables.

    Instead, just provide for .1 spacing in a line for cables that can have 8, 16, 32 ports and so on. I used these kind of cables to break out pins and to reorganize sequence (in lieu of making a printer circuit board, Very, very handy).

    Put the I/O off load at appropriate edges of the board, maybe with means to add a solderable connector.

    Why are ribbon cables such a big issue for me? They stagger the numbering sequence while other devices to them just have a linear sequence. Ribbon cables and two row fittings rarely work out as hoped for AND they make a huge hassle for the user to get the right hole when looking at wiring a board by hand. If you don't believe, try using a GPIO interface for hobby projects.

    I am NOT saying that stackable boards should not be accomodated, but there are plenty of occassions when a flexible cable really is as good or better as a solution and should be accommodated as well. A stackable expansion board for soldering DIPs would be a very good thing.

    BTW, I am sorry but my spelling checker has suddenly refused to help with corrections. Some words may just be spelled wrong.

    Someone will build an Arduino compatible board for the Propeller II. It doesn't have to be Parallax. I'd prefer a stand-alone microcontroller with power support, ROM, etc AND a motherboard with RTC, SRAM, etc as the two best initial releases.
  • prof_brainoprof_braino Posts: 4,313
    edited 2012-09-29 17:13
    How about some kind of carrier board with 32 pins brought to each edge?
    That way, we could stick a bread board under each edge while prototyping. Daughter boards under or over for final designs.
    The main board would only need the basic support circuitry like power, SD slot, and board layout for video, audio, and A/D options.
    As long as its cheap and generic, there could be a volume benefit?
    I just want one size board to deal with.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-09-29 17:49
    Parallax is already setup to create BASIC STAMP style versions of the Prop2. These would make a good equivalent to Propeller DIP chips.


    Jeff
  • T ChapT Chap Posts: 4,223
    edited 2012-09-30 07:30
    Regarding enclosures, I stumbled across these guys the other day and spoke to them about making some parts.

    http://www.envplastics.com/

    They sent a sample of the box shown(the black abs versions) and it is really nicely done. I do not have a need for custom boxes as you guys are wanting, but since it has been mentioned the idea of an enclosure, this might be a good idea for a 'group' design which has all the features built in, or even options per order. They do their parts by machining, bends, and glue only, no molds or lasers. The set up charges might be in the few hundred dollar range to design a custom enclosure, and low quantities would be pricey, but as the volume goes up they might get closer to the prices of those molded boxes already mentioned. The advantage being, a custom forum design as a starting point for your projects, versus taking something that Hammond makes which may or may not be the most ideal.
    404 x 366 - 17K
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2012-10-01 16:36
    Ok, I get that there are a lot of great ideas on propeller 2 form factors,and have also heard that a stamp-like version is coming. That said, a platform is more than a form factor. Any thoughts about what you would like to see in the default library or in the new spin interpreter that does not exist now? Anything you have now in those things that you wished were better or easier?
  • 4x5n4x5n Posts: 745
    edited 2012-10-01 17:22
    I'd like to see a board with headers that I can connect to like the quickstart, the old prop platform, etc. In the case of a stamp like carrier I could see only bring 32pins out with the "boot" eeprom on chip. By my way of thinking it would be an experimenters type thing and 32pins would be more than than enough for that type of application. Don't always need to bring out all the pins!!
  • Dave HeinDave Hein Posts: 6,347
    edited 2012-10-01 18:36
    Any thoughts about what you would like to see in the default library or in the new spin interpreter that does not exist now?
    I would like to see the addition of types and pointer declarations. This would make the Spin compiler a much more effective tool by enforcing variable types to match between the caller and the called method. This would be a great help to newbies who are often confused about the use of pointers and strings.

    Another nice feature would be the addition of structures. This would provide an alternative to using VAR variables.
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2012-10-02 06:15
    Interesting thoughts Dave,

    Do you think that structures can be done in a low memory space? I've only seen them on 'big' computers.
  • Heater.Heater. Posts: 21,230
    edited 2012-10-02 06:48
    structures can be done in low memory machines. Back in the day we used PL/M on 8 bit Intel (8085) it had structutures and we used them. Old 8 bit 64K RAM machines running CP/M had C compilers, with structures of course. And today you have C for the Propeller, no problem.

    Structures pretty much mean enforcing a type system, byte, word, long etc else you are going to get into a mess with pointers to structures, structures as parameters etc.

    Whilst you are at it we need unsigned types as well, and floats.

    Very soon you have a language that starts to look like C, all be it, with white space block delimiting instead of braces. But Spin has "objects" and so as you have pointers to structures you may as well have pointers to object instances and soon you have a language that looks like C++.

    I'm kind of thinking it's better not to go down that road. Keep Spin simple as it is. If you want/need those things it's time you moved on to C.
  • Dave HeinDave Hein Posts: 6,347
    edited 2012-10-02 09:01
    Once it's compiled, a structure access is no different than an array access. Let's say a new keyword struct were added. It would be used something like this
    stuff struct my_struct
      long a
      word b
      byte c, d
    
    pub test1
      test2(@stuff)
      stuff.b := stuff.c + stuff.d
      stuff.a := stuff.b
    
    pub test2(my_struct pstuff)
      struct[pstuff].a := 0
      struct[pstuff].b := 1
      struct[pstuff].c := 2
      struct[pstuff].d := 3
    
    Using the current Spin syntax, the equivalent code would look like this:
    VAR
      long stuff[2]
    
    pub test1
      test2(@stuff)
      word[@stuff][2] := byte[@stuff][6] + byte[@stuff][7]
      stuff := word[@stuff][2]
    
    pub test2(pstuff)
      long[pstuff] := 0
      word[pstuff][2] := 1
      byte[pstuff][6] := 2
      byte[pstuff][7] := 3
    
  • Heater.Heater. Posts: 21,230
    edited 2012-10-02 09:44
    Yes but is it not the case that when you have a structure of bytes, words, longs etc the compiler has to keep track of all those types so that it knows what code to generate. Further, when passing structures to methods or accessing them via pointers the compiler has to know what structure the pointer is pointing at. Better the compiler checks all this at compile time and issues errors if you are doing the wrong things. Currently Spin has byte, world, long declarations but really has little idea of type checking.

    Eventually all the syntax required to support this would make Spin look like C. So why not just use C and keep Spin simple for beginnners to programming forwhom all that syntactic noise is confusing?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-10-02 10:09
    It's really not as ugly in Spin as Dave's example makes out. By defining a few constants, it can be made much more readable, viz::
    CON
    
      A = 0
      B = 2
      C = 6
      D = 7
    
    VAR
      long stuff[2]
    
    pub test1
      test2(@stuff)
      word[@stuff][B] := byte[@stuff][C] + byte[@stuff][D]
      stuff := word[@stuff][2]
    
    pub test2(pstuff)
      long[pstuff][A] := 0
      word[pstuff][B] := 1
      byte[pstuff][C] := 2
      byte[pstuff][D] := 3
    

    Back in 2006, I came up with a better notation for implied Spin structures, but it's locked away in a private forum that's probably no longer online. I'll see if I can either find some notes on it or recreate it.

    -Phil
  • Dave HeinDave Hein Posts: 6,347
    edited 2012-10-02 10:11
    If we want to keep Spin simple we shouldn't add types and structs. If we want to improve Spin we should add types and structs. I think I agree with you that you can't keep Spin as simple as it is right now and add types and structs.

    However, I think that type-checking would be beneficial to beginners, and also veteran programmers for that matter.
  • Bill HenningBill Henning Posts: 6,445
    edited 2012-10-02 10:50
    Spin should get:

    - full string support
    - full float support
    - structures
    - a pre-processor

    Proper string support would make life easier for beginners, as would proper float support.

    Beginners can ignore structures until they are ready for them; however the current pseudo-object handling already uses the name.ident notation, so referring to structure members that way is not a big stretch.
  • rod1963rod1963 Posts: 752
    edited 2012-10-02 11:03
    Might as well port Oberon to the Prop. It's has all the high level structures and types Spin is missing, plus it's simple.
Sign In or Register to comment.