Shop Learn
KISS Eval board (general discussion) - Page 3 — Parallax Forums

KISS Eval board (general discussion)

13»

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: 11,933
    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: 11,933
    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,289
    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,033
    @Publison any of these still available?
  • PublisonPublison Posts: 11,892
    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: 306
    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.
Sign In or Register to comment.