Shop OBEX P1 Docs P2 Docs Learn Events
KISS Eval board (general discussion) - Page 3 — Parallax Forums

KISS Eval board (general discussion)

135678

Comments

  • To test the boards I've written an automatic self test. It tests for shorts between adjacent pins (solder bridges) and shorts against ground or VIO. I don't test connection to the breadboard headers because everyone has to solder them in by themselves and I trust the flying probe test of the PCB manufacturer. Pins #58..63 are tested by the flash procedure.
    #include "propeller2.h"
    #include "stdbool.h"
    #include "stdio.h"
    
    #define pinDTX  62
    #define pinDRX  63
    #define pinLed  57
    
    //                E      D          M    P  C  S
    //20MHz modePll 0b1_000000_0000001000_1111_10_11 // 180 = 20 * 9
    #define modePll 0b1_000100_0000100011_1111_10_11 // 180 = 25 * 36/5
    
    #define _XTALFREQ   25_000_000
    #define _CLOCKFREQ 180_000_000
    #define delay100   (_CLOCKFREQ / 10)
    #define clksPerMs  (_CLOCKFREQ / 1000)
    
    #define _BAUD 	  230400	// serial debug port
    
    
    #define pwmFreq  500
    #define pwmFrame 0x1000
    #define pwmBase  _CLOCKFREQ / (pwmFreq * pwmFrame)
    
    void BlinkPwm ()
    { // nice logarithmic dimming "heartbeat" blink
      _pinstart (pinLed, 0b01_01001_0, (pwmFrame<<16)+pwmBase, 0);
      for (;;)
      {
        for (int i=0; i<=12; i++) 
        {
            _wypin (pinLed, (1<<i)-1);
            _waitms (20);
        }
        for (int i=12; i>=0; i--)
        {
            _wypin (pinLed, (1<<i)-1);
            _waitms (20);
        }
      }
    }
    
    bool ok= true;
    
    void TestPin (int p)
    {
      _wrpin (p, 0b0011_000011011_00_00000_0); // weak 150k drive
      _pinh (p);
      _waitus (10); // wait for pin capacitance to charge
      if (!_pinr (p)) 
      {
        printf ("pin #%d stuck low\n", p);
        ok= false;
      }
      else 
      {
        _wrpin (p+1, 0); // strong drive
        _pinl (p+1);
        _waitus (10);
        if (!_pinr (p)) 
        {
          printf ("pin #%d shorted to pin #%d\n", p, p+1);
          ok= false;
        }
      }
      _pinl (p);
      _waitus (10);
      if (_pinr (p)) 
      {
        printf ("pin #%d stuck high\n", p);
        ok= false;
      }
      _wrpin (p, 0);
    }
    
    void TestAllPins ()
    {
      for (int p=0; p<pinLed; p++) TestPin (p);
    }
    
    void main()
    {
      _clkset (modePll, _CLOCKFREQ);
      _setbaud(_BAUD);
      TestAllPins ();
      if (ok) BlinkPwm (); // signal success
    }
    
  • RaymanRayman Posts: 14,744
    edited 2020-11-12 18:48
    Interesting code, I might have to use that.
    Is "stdbool" new?

    BTW: I was just reminded that there are some predefined constants for the smartpin modes that can make it prettier, like:
    P_NCO_FREQ+P_OE
    
  • In strict ANSI C (flexc) you have to #include stdbool.h. C++ has it built in.

    BTW, the P2 documentation is still a mess. I know that they exist but I can't find anything about all those predefined constants we can use for smart pin and PLL modes instead of those ugly 0b010101 patterns...
  • RaymanRayman Posts: 14,744
    It's in the Spin2 Docs: https://docs.google.com/document/d/16qVkmA6Co5fUNKJHF6pBfGfDupuRwDtf-wyieh_fbqw/edit#

    Near the bottom, search for P_NCO_FREQ
  • The boards have hit American soil!

    16 boards were delivered with .1 headers. I am shipping three which leaves 13 boards available. OK, I may take one leaving 12.
    3456 x 4608 - 4M
  • I think a couple of those are mine. I can’t remember if I paid my share of the shipping yet. I’ve ordered so much stuff lately I can’t keep track of it all.

    Doc
  • doggiedoc wrote: »
    I think a couple of those are mine. I can’t remember if I paid my share of the shipping yet. I’ve ordered so much stuff lately I can’t keep track of it all.

    Doc

    Yours are packed along with your KISS boards to be mailed today. We are going to work out shipping later. I may hit up people for a buck or two later on PayPal.
  • Publison wrote: »
    The boards have hit American soil!

    16 boards were delivered with .1 headers. I am shipping three which leaves 13 boards available. OK, I may take one leaving 12.

    Yes! Looking forward to getting mine!

    Thank you for handling US re-shipping.
  • Publison wrote: »
    ... I may hit up people for a buck or two later on PayPal.
    I sent you a little something now. I might be broke after Christmas!
  • doggiedoc wrote: »
    Publison wrote: »
    ... I may hit up people for a buck or two later on PayPal.
    I sent you a little something now. I might be broke after Christmas!

    Too kind. You may get yours very soon! :)
  • Dave Hein and David Betz asked about different pinout options so that consecutive pin numbers are available on the breadboard. I'm sorry, this is not possible with the current layout and I won't change it. It's hard to please everyone...

    For the available options with the current layout please refer to this post. In the third picture you can see the outer rows occupied with pin headers pointing downward and the inner rows pins pointing upward.

    You can use the pins of the outer row (even numbers) directly inserted into the breadboard and the inner row (odd numbers) with Dupont wires if needed. Routing all the pins to single row headers would take up much to much board area.
  • Sorry for starting this discussion. I was just trying to understand if buying this module would be useful to me since I already have a P2 Eval board. Being able to plug it into a breadboard would have given me an option I don't have with the P2 Eval board so I asked the questions. The board certainly looks useful in its current form and I would order one if I didn't already have the P2 Eval board. Thanks for your work on this!
  • Dave HeinDave Hein Posts: 6,347
    edited 2020-12-18 18:15
    David, do you have a P2 Edge? I have an adapter board that brings out about half the I/O pins to a DIP format. This can be plugged into a solderless breadboard.
  • Dave Hein wrote: »
    David, do you have a P2 Edge? I have an adapter board that brings out about half the I/O pins to a DIP format. This can be plugged into a solderless breadboard.
    Not yet but I have one on order that I believe has already been shipped. I also ordered a JonnyMac breadboard.

  • hinvhinv Posts: 1,255
    @Publison any of these still available?
  • PublisonPublison Posts: 12,366
    edited 2020-12-22 00:15
    hinv wrote: »
    @Publison any of these still available?

    Yup, got 7 here ready to ship.

    To order please send me an email to "nicolas@benezan.de" with your complete postal address. I'll send you a Paypal link.
  • BTW, has anybody actually done anything with his board apart from blinking the LED with the test program?

    I hope we all become a bit less busy the next days and can have a little fun with developping new ideas, hacks, experiments...
  • MaciekMaciek Posts: 675
    edited 2020-12-22 17:02
    Are you kidding ?

    The very first thing I did was to figure out how not to boot with the blinking LED test program from flash :).
    It only took a single 10k Ohm resistor.

    I am a forth user so at the moment I'm trying to make friends with TAQOZ while waiting for some motor control and mems sensor boards with the delivery scheduled for tomorrow.

    This board is a real gem.
  • I like your board really and it is working fine. But I have found one thing which should be revised if you plan to produce new boards.
    One can use the P2 EVAL accessory boards, except the P2 WX Adapter on the header X8 (P56-63) like on the Parallax boards. It would be nice if you would also use RESET incl. protect circuit on pin 11 on this header instead of 5V. As the KISS board is multi layer one cannot cut this pin off.
  • Oh, the P56-63 header of the Parallax board has a different pinout than the others? I didn't notice.

    You could cut the 5V pin of that header and solder an additional pin at the Reset pin of the ProgPlug header and then use a dupont wire as jumper.
  • Oh, the P56-63 header of the Parallax board has a different pinout than the others? I didn't notice.
    On new boards, yes, so that wireless programming can be supported via the ESP32 module.
  • ErNaErNa Posts: 1,752
    edited 2021-07-18 18:37

    Every extra will create extra cost. But it would be nice to have a footprint for a sd-card ;-) To me this board should just be an simplified P2D2 that can be thrown in everywhere needed without any complains about the price-tag
    And a footprint for an oscillator replacing the crystal

  • Basically, @ErNa , you are asking ManAtWork to redesign his KISS board while it already is in production.
    While adding the footprints you propose might sound like a simple task, it may not necessarily be so and there will still be people complaining it does not have a USB>serial or a dedicated reset button to name a few. Then there will be a choice of components, reprogramming the P&P machine, more testing etc. I would advise against these changes. I'm optimistic but rather on the more conservative side of things.

  • An SD card slot costs only $0.10 but it takes board area. If I place it on the bottom side it adds an extra assembly and soldering run. Maybe I just add the landing pads and if somebody really needs it he/she can solder it in.

    I definitely won't add a full USB programming port. That would make every board more expensive. I prefer paying only once for a prog plug and keep the P2 board as simple as possible.

    What are the advantages of an oscillator compared to a single crystal? Can you suggest one with a small footprint and affordable price?

    I already have 100 empty PCBs with the old layout. Discarding them would mean $69 loss but that's not much if the upgrade is woth it. Producing 100 simple and 100 extended versions would be another option.

  • ErNaErNa Posts: 1,752

    To me the landing pads are fine, the oscillator creates less jitter, but as I was running my motors with the P1's simple ADC the jitter to me is academic.

  • Cluso99Cluso99 Posts: 18,069

    IMHO this oscillator stuff is Smile.
    The crystal works fine on my board and other board too. If there really is a bug in the P2 such that it cannot successfully use a crystal then IMHO the P2 has a major design flaw. Gone are the days where micros had crystal oscillator problems - this was solved in the 80’s by even the poorest of chip designs.
    And the argument that you can get a tighter tolerance is Smile too! You’ll need a caesium clock to tell the difference. I don’t expect many, if any, to be used in the Hadron Collider or anything similar.

  • jmgjmg Posts: 15,175
    Cluso99 wrote: »
    IMHO this oscillator stuff is Smile.
    The crystal works fine on my board and other board too. If there really is a bug in the P2 such that it cannot successfully use a crystal then IMHO the P2 has a major design flaw. Gone are the days where micros had crystal oscillator problems - this was solved in the 80’s by even the poorest of chip designs.
    And the argument that you can get a tighter tolerance is Smile too! You’ll need a caesium clock to tell the difference. I don’t expect many, if any, to be used in the Hadron Collider or anything similar.

    I wonder why anyone bothers making TCXOs at all then ? If it is all Smile, as you claim, then the market size should be zero !
    Perhaps what you really meant to say, is your use cases are happy with lower performance ?
    Hint #1 : A 1pps from a cheap GPS is more than enough to discover differences between Crystals and Oscillators and TCXOs
    Hint #2 : 1ppm is only 20 bits of precision, 10ppm is 17 bits, and yet the P2 is a 32 bit CPU with 32 bit timers and 64 bit maths.

  • jmgjmg Posts: 15,175
    ManAtWork wrote: »
    What are the advantages of an oscillator compared to a single crystal? Can you suggest one with a small footprint and affordable price?
    Oscillators provide more tolerance to crosstalk on adjacent pins, and they allow much better precision clock choices.

    Common sizes are 2016 and 2520, examples of 10ppm oscillator are
    https://lcsc.com/product-detail/Oscillators_Yangxing-Tech-OT201620MJBA4SL_C669079.html
    https://lcsc.com/product-detail/Oscillators_Yangxing-Tech-OT252020MJBA4SL_C669067.html

    then, you can move up the performance curve, so for example
    ECS International ECS-TXO-2016-33-200-TR TCXO 20MHz ±2ppm (Tol) ±2.5ppm (Stability) HCMOS 3.3V $1.584/100


    These have a good price 500+ of 47c for 1.5ppm
    https://www.digikey.com/en/products/detail/suntsu-electronics-inc/STC22K33Q38-20-000MT/12315829

    and these spec ±500ppb -40°C ~ 85°C STC32K33F48A-20.000MT $1.61/1k
    Clipped Sine need to AC couple into XI..
  • The topic here is how to make a simple evaluation and experimentation board. I won't discuss caesium clocks and other academic stuff, here. The crystal I use has 10ppm tolerance. If nobody convinces me that an oscillator is required for a standard application (for example, beacuse there is visible pixel jitter on an HDMI screen) then I'll keep the crystal. Serving 90% of the applications is anough for me. If 10% need a better clock they can always buy more expensive boards elsewhere.

    Same thing for the USB/FTDI programmer. Some of the boards will only be used for development where you need a programmer all the time. But others will only be programmed once or few times and then will run stand-alone in the application. And some (as my servo and induction heating project) will even require isolated programming because they are connected to high voltage. So keeping the prog plug separate makes more sense to me. However I agree that a USB connector for +5V power is better than a screw terminal because it prevents most people from connecting the wrong voltage or polarity.

  • @ManAtWork said:
    The topic here is how to make a simple evaluation and experimentation board. I won't discuss caesium clocks and other academic stuff, here. The crystal I use has 10ppm tolerance. If nobody convinces me that an oscillator is required for a standard application (for example, beacuse there is visible pixel jitter on an HDMI screen) then I'll keep the crystal. Serving 90% of the applications is anough for me. If 10% need a better clock they can always buy more expensive boards elsewhere.

    Same thing for the USB/FTDI programmer. Some of the boards will only be used for development where you need a programmer all the time. But others will only be programmed once or few times and then will run stand-alone in the application. And some (as my servo and induction heating project) will even require isolated programming because they are connected to high voltage. So keeping the prog plug separate makes more sense to me. However I agree that a USB connector for +5V power is better than a screw terminal because it prevents most people from connecting the wrong voltage or polarity.

    I'm with you 100%.

Sign In or Register to comment.