Shop OBEX P1 Docs P2 Docs Learn Events
Accessory Boards — Parallax Forums

Accessory Boards

msrobotsmsrobots Posts: 3,701
edited 2019-02-01 02:12 in Propeller 2
Mine arrived today, I had to file down the corners with a nail file to get them past the enclosure, but that worked fine.

OK, documentation to be found here https://docs.google.com/document/d/1FTGV1Mn1hwayEaKut5Ej6vmWdjirVlP9TQqyA0wRs34/edit# seems to be open for edit?

Some are cool some have issues:

First of all, they connect very sturdy and providing a mounting hole for a stand off is very thoughtful. Simple and useful.

-Control Board.

why is the numbering of the LEDs in different order as the numbering of the buttons? This makes no sense to me that

the LED next to button 1 uses Basepin+0 while the button uses Basepin+7
the LED next to button 2 uses Basepin+1 while the button uses Basepin+6
the LED next to button 3 uses Basepin+2 while the button uses Basepin+5
the LED next to button 4 uses Basepin+3 while the button uses Basepin+4

why not in the same order?

-Serial Host. This one is just nice.

-LED Matrix.

First thought was why 8x7 not 8x8 but then I saw charlieplexing. So it needs constant refreshing if more then one line is used. Not really nice, but usable.
Having a shift register or two would ease that pain, but it is what it is and @"Peter Jakacki" already writes Characters on it...

-Digital Video Out. This one is just nice.

-Mini Prototyping Board. Way to small, needs to be longer/wider with a stand off on the end.

-Serial Device. This one is just nice.

-Goertzel. Absolute no clue what this may be for, But looks nice!

-A/V Breakout.
This one is just wonderful. It is quite large and will need the stand off hole provided.
But all connectors are very solid and good reachable, just wonderful.

So thanks Parallax, I am quite happy with the set .
I just need to figure out what the Goerzel is usable for. Hand waving? Gestures? 3D positioning?
What was the name of that instrument using hand waving?

Is there any plan to produce more of those modules? I would like to have 7 more of the LED modules, just for giggles...

Enjoy!

Mike
«134

Comments

  • msrobots wrote: »
    What was the name of that instrument using hand waving?

    Mike

    Theremin?
  • msrobots wrote: »

    -Mini Prototyping Board. Way to small, needs to be longer/wider with a stand off on the end.

    That mini proto was for little things like a few leds, buttons, small IC or simple connector. That sort of thing.

    The larger (longer & wider) proto board you may desire is here : https://www.parallax.com/product/64005-es


    ps. thanks for the thorough feedback.
  • Here's about a few dozen lines of TAQOZ code that implement a scrolling display on the charlieplexed LED matrix board. I fixed up the orientation to 8 columns of 7 rows (I thought I had it that way the first time, apparently not), and now a new character is written into the non-visible part of the 2 character buffer while the Charlieplexing task will start scrolling this character into view when it detects it. The software takes about 330 bytes of code including the table but rather than doing a simple message buffer, this is a proper TAQOZ output device where we can redirect all output to it as we would to the serial console like this:
    PLEXLED ." Hello World! " 500000000000000000. SQRT . 
    



    		*** CHARLIEPLEX DECODE TABLE ***
    
    0 TABLE plx --- create a table for 56 encoded high/low pairs
    	$73747576 , $67707172 , $62636465 , $56576061 ,	$51525354 , $45464750 , $40414243 ,
    	$34353637 , $27303132 , $23242526 , $16172021 , $12131415 , $05060710 , $01020304 ,
    
    		*** PHYSICAL LED DRIVER ***
    
    8 := leds	--- base pin of LED display
    
    --- light an LED (only one at a time)
    : XYLED	( x y -- )	0 DIRA COG! 3 << + plx + C@ DUP 7 AND leds + LOW 4 >> leds + HIGH ;
    
    		*** LED PIXEL BUFFER ***
    
    14 	bytes 	ledbuf	--- holds displayed character + new character to be scrolled in
    	byte	scol	--- columns to scroll
    	byte 	scnt 	--- scrolling speed counter
    10	:= 	sspd 	--- scrolling speed
    
    --- scroll the matrix by one column left
    pri SCROLL		ledbuf 7 ADO I C@ I 7 + C@ 8<< + 2/ DUP I C! 8>> I 7 + C! LOOP ;
    
    		*** LED REFRESH & SCROLLING TASK ***
    
    --- run this task in a cog -
    --- NOTE: a background timer could call the central part of this every 1ms and still not notice any flicker
    pri PLEX.TASK
    	BEGIN
    	  0 DIRA COG! --- blank in case buffer is empty
    	  7 0 DO ledbuf I+ C@
    	    8 0 DO DUP I |< AND IF I J XYLED 200 us THEN LOOP
    	  DROP LOOP
    ---	delay done? if columns to scroll? scroll then reset scroll delay else time the delay
    	scnt C@ 0= IF scol C@ IF scol C-- SCROLL THEN sspd scnt C! ELSE scnt C-- THEN
    	AGAIN
    	;
    
    --- Init the PLEX task if not already started
    pri !PLEX		1 TASK W@ 0= IF ' PLEX.TASK 1 RUN ledbuf 14 ERASE THEN ;
    
    	*** PLEXLED CHARACTER OUTPUT DEVICE ***
    
    --- Make the PLEXLED the console output device
    pub PLEXLED		!PLEX EMIT:
    --- use this entry point to directly write a character to the matrix
    pub PLEXCH ( ch -- )
    ---	lookup font and transfer to ledbuf when scrolling is done
    	7 * FONT5X7 + ledbuf 7 + 7 
    	BEGIN scol C@ 0= scnt C@ 0<> AND UNTIL CMOVE
    	7 scol C!
    	;
    
  • Humdinger!
  • Wish I could try it! My package is still being held hostage by the Postal Service.
  • Ahle2Ahle2 Posts: 1,178
    It would be nice if we could agree on some kind of "standard" for which add on should go to which header. Like what the P1 demo board pin configuration become back in the days! It would ease the pain when testing different things from different authors on the eval board all the time.
  • Ahle2 wrote: »
    It would be nice if we could agree on some kind of "standard" for which add on should go to which header. Like what the P1 demo board pin configuration become back in the days! It would ease the pain when testing different things from different authors on the eval board all the time.

    In the case of this display and driver this is configured dynamically by changing the pin constant.
    8 := leds	--- base pin of LED display
    
    So even though this is a "constant", it is linked to by the code so that if you can rewrite the constant, then the code will also use the new pin, even while it is operating.
    The general method for rewriting the constant is to find the code address of it with a ' symbol and then store the new value in the parameter field.

    An easier way is to just create a new word that you would use like this to change it to say the P16 group:
    16 LEDPINS
    

    Just paste this line in to define LEDPINS.
    : LEDPINS ( pin -- )	' leds :=! ;
    
  • Just got my boards an hour ago. Just a note on the large Proto board, you are going to have to solder the SMD connector on yourself. Does not look hard as there is plenty of pad and the connector has pins to fit the holes in the board to center it. It's a great time to try my brand new toaster over.
  • msrobots wrote: »
    I would like to have 7 more of the LED modules, just for giggles...

    Me too !

    One on each header, and send messages (or bouncing balls!) around the outside of the P2-EVAL !!

  • Publison wrote: »
    msrobots wrote: »
    What was the name of that instrument using hand waving?

    Mike

    Theremin?

    yes, thanks. That was it. It seems that one could use the goerzel board for one. Chip had some demo somewhere using a scope...

    Mike
  • Ahle2 wrote: »
    It would be nice if we could agree on some kind of "standard" for which add on should go to which header. Like what the P1 demo board pin configuration become back in the days! It would ease the pain when testing different things from different authors on the eval board all the time.

    Yes Ahle2,

    I certainly agree with you. It will be next to impossible, but at least we could give it a try, with reasoning.


    Lets see how I did it, and the reasons for.

    I have the LED board on 0-8 because I usually use them to test stuff and 0-8 is easy to remember.

    00-07 = LED board, because I usually use them to signal stuff and 0-8 is easy to remember.
    08-15 = prototype board, or other use
    16-23 = control board with buttons nicely at the front.
    24-31 = the goerzel thing, should be at the front, I guess. or other use
    32-39 = serial host, nicely at the same right side as the PC-USB
    40-47 = serial client, nicely at the same right side as the PC-USB
    48-55 = HDMI or AV board, nicely on the back so wires can run next to usb
    56-63 = free - used for boot pins so not really a place for a module

    but that is just my suggestion, because of the wires and my ES sitting right to my monitor
    Enjoy!

    Mike
  • Ahle2Ahle2 Posts: 1,178
    msrobots, That will work and it was not just random assignment either. I like your reasoning. :thumb:
  • Really, hard-coding pin numbers is poor practice and it's not that hard to start your example code with basepin := xx so the user can alter it for whatever header they want to use.
  • Ahle2Ahle2 Posts: 1,178
    I agree on the hard-coding bit, but still It's not forced in anyway. just a convenience.
  • It worked for Arduino for years now. They always hard coded there pins because the board had functions assigned to them.

    The propeller on the other hand is handy since you can use whatever pin so you have to define them at the start of your program so people know how to hook them up.

    Mike

  • dgatelydgately Posts: 1,621
    edited 2019-02-04 20:31
    Here's a cheesy, little spin program that displays characters on the LED Matrix accessory board. Fastspin was used to compile as P2...

    EDIT: a new version of the main source file is attached. It uses Cluso99's mini font, which displays much nicer on the LED Matrix board!

    The source and 2 OBJ files are attached as an archived zip file. Excuse the ugly font, included in the DAT section.
    $ fastspin -2 draw_char_to_LED_Matrix.spin2
    Propeller Spin/PASM Compiler 'FastSpin' (c) 2011-2019 Total Spectrum Software Inc.
    Version 3.9.17-beta-6ddd3acf Compiled on: Jan 30 2019
    draw_char_to_LED_Matrix.spin2
    |-Pins.spin2
    |-SmartSerial.spin2
    draw_char_to_LED_Matrix.p2asm
    Done.
    Program size is 3488 bytes
    $ loadp2 -p /dev/cu.usbserial-P2EEI8V -b 115200 -l 115200 -SINGLE draw_char_to_LED_Matrix.binary
    

    o.jpg
    x.jpg

    dgately
    479 x 507 - 50K
    532 x 573 - 68K
  • Cluso99Cluso99 Posts: 18,066
    If you want a font there’s one in my vga 2920x1080 thread (not the last code I posted as I removed most of the font)
  • dgatelydgately Posts: 1,621
    edited 2019-02-04 20:32
    Cluso99 wrote: »
    If you want a font there’s one in my vga 2920x1080 thread (not the last code I posted as I removed most of the font)
    Thanks... That's an 8x8 font, correct? With the LED Matrix being a 7X8, I'll need to convert a bit, but it's definitely a much better font than what I used! I may just shift characters up or down 1 row, where there's a %00000000 at top or bottom of the character.

    EDIT: New source that uses Cluso99's font is attached to my original post!

    dgately
  • Cluso99Cluso99 Posts: 18,066
    Depends on which way you want to orient the 7x8 matrix. Since its a single char, you could drop the top line out of the font, else ignore either first/last column.
    BTW It wasn't my font - IIRC it was hippy (AI..) and I just mod'd it to suit my needs.
  • Cluso99 wrote: »
    Depends on which way you want to orient the 7x8 matrix. Since its a single char, you could drop the top line out of the font, else ignore either first/last column.
    BTW It wasn't my font - IIRC it was hippy (AI..) and I just mod'd it to suit my needs.
    For character drawing, orientation with 7-wide by 8-high format works well on the LED Matrix (else the characters are very wide and not very tall). I dropped the bottom lines of the font except a few characters that dropping the top-most line worked better.

    Well thanks to you (& hippy), it displays much better!

  • Here's the game of life on an 8x7 LED matrix. I converted dgately's Spin2 program to C, and then implemented the life game. It runs under p2gcc, but it shouldn't be too hard to get it to run under spin2gui.

    I also created a drawByteImage() function that works with a 8x7 byte matrix. It implements gray scale by varying the amount of time an LED is on as a function of the byte value. I don't use that feature in the life program, but it might be useful.
  • Dave Hein wrote: »
    Here's the game of life on an 8x7 LED matrix
    Excellent! I'll use this C variant for further experiments...

    dgately

  • Dave Hein wrote: »
    Here's the game of life on an 8x7 LED matrix. I converted dgately's Spin2 program to C, and then implemented the life game. It runs under p2gcc, but it shouldn't be too hard to get it to run under spin2gui.

    I also created a drawByteImage() function that works with a 8x7 byte matrix. It implements gray scale by varying the amount of time an LED is on as a function of the byte value. I don't use that feature in the life program, but it might be useful.

    Nice! It won't compile in the released version of spin2gui because of some missing functions (rand() and srand()) but the git version of fastspin has those now. I also had to add some #include's to the top of life.c:
    #include <stdlib.h>
    #include <string.h>
    #include <unistd.h>
    

    which exposes a weakness of fastspin's reliance on having the header files point to the code. I'll have to think about that.
  • localrogerlocalroger Posts: 3,451
    edited 2019-02-07 17:27
    Here is a version of dgately's demo which shows how to charlieplex a regularized bitmap 7 LED's at a time, so it is actually visible in a lighted room. This also smooth-scrolls the message, and includes a 5x7 font I drew a long time ago for a dot matrix printer with a couple of lowercase characters moved up to remove descenders.

    Edit 2: Modified program to automatically work properly with any basepin.
  • localroger wrote: »
    Here is a version of dgately's demo which shows how to charlieplex a regularized bitmap 7 LED's at a time...

    Not getting any result other than P57 blinking (BTW: I mod'ed to use P32 as base)...


    dagately
  • localrogerlocalroger Posts: 3,451
    edited 2019-02-06 20:16
    I'm not using Pins, so you have to change the outas to outb's to use basepin 32 or greater.
    edit: Added a comment to this effect to the source file
  • localroger wrote: »
    I'm not using Pins, so you have to change the outas to outb's to use basepin 32 or greater.
    edit: Added a comment to this effect to the source file
    Good news... Works!

  • Rather then spend $10 on an expansion board I decided to do the $1 DIY board instead.

    Now if only the P2 had fonts in ROM so I could print some letters on the OLED display.

    Mike
    2560 x 1440 - 1M
  • dgatelydgately Posts: 1,621
    edited 2019-02-06 20:56
    iseries wrote: »
    Rather then spend $10 on an expansion board I decided to do the $1 DIY board instead.

    Now if only the P2 had fonts in ROM so I could print some letters on the OLED display.
    I did the same for VGA, until the Accessory boards showed up!

    There are several fonts in the programs that I and localroger attached to this discussion... Look at the bottom of the sources.

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2019-02-06 21:47
    Here's the 5x7 font I made up for VGA and also use on the LED. I can dump in any suitable format, all it needs is a good one-liner in TAQOZ!
    BTW, my last iteration of the LED display gives all 56 LEDs the same delay regardless if they were active or not so that the brightness is even for all characters and the scrolling smooth. The previous version was brighter but that varied depending upon the number of LEDs that were active.
    TAQOZ# font5x7 $20 7 * + 96 7 * ADO CRLF I 7 ADO I C@ .B ." ," LOOP 8 EMIT SPACE 7 +LOOP   --- 
    $00,$00,$00,$00,$00,$00,$00 
    $04,$04,$04,$04,$04,$00,$04 
    $0A,$0A,$0A,$00,$00,$00,$00 
    $0A,$0A,$1F,$0A,$1F,$0A,$0A 
    $04,$1E,$05,$0E,$14,$0F,$04 
    $03,$13,$08,$04,$02,$19,$18 
    $06,$09,$05,$02,$15,$09,$16 
    $06,$04,$02,$00,$00,$00,$00 
    $08,$04,$02,$02,$02,$04,$08 
    $02,$04,$08,$08,$08,$04,$02 
    $00,$04,$15,$0E,$15,$04,$00 
    $00,$04,$04,$1F,$04,$04,$00 
    $00,$00,$00,$00,$06,$04,$02 
    $00,$00,$00,$1F,$00,$00,$00 
    $00,$00,$00,$00,$00,$06,$06 
    $00,$10,$08,$04,$02,$01,$00 
    $0E,$11,$19,$15,$13,$11,$0E 
    $04,$06,$04,$04,$04,$04,$0E 
    $0E,$11,$10,$08,$04,$02,$1F 
    $1F,$08,$04,$08,$10,$11,$0E 
    $08,$0C,$0A,$09,$1F,$08,$08 
    $1F,$01,$0F,$10,$10,$11,$0E 
    $0C,$02,$01,$0F,$11,$11,$0E 
    $1F,$11,$10,$08,$04,$04,$04 
    $0E,$11,$11,$0E,$11,$11,$0E 
    $0E,$11,$11,$1E,$10,$08,$06 
    $00,$06,$06,$00,$06,$06,$00 
    $00,$06,$06,$00,$06,$04,$02 
    $08,$04,$02,$01,$02,$04,$08 
    $00,$00,$1F,$1F,$00,$00,$00 
    $02,$04,$08,$10,$08,$04,$02 
    $0E,$11,$10,$08,$04,$00,$04 
    $0E,$15,$15,$0D,$01,$11,$0E 
    $0E,$11,$11,$11,$1F,$11,$11 
    $0F,$11,$11,$0F,$11,$11,$0F 
    $0E,$11,$01,$01,$01,$11,$0E 
    $07,$09,$11,$11,$11,$09,$07 
    $1F,$01,$01,$0F,$01,$01,$1F 
    $1F,$01,$01,$0F,$01,$01,$01 
    $0E,$11,$01,$1D,$11,$11,$1E 
    $11,$11,$11,$1F,$11,$11,$11 
    $0E,$04,$04,$04,$04,$04,$0E 
    $1C,$08,$08,$08,$08,$09,$06 
    $11,$09,$05,$03,$05,$09,$11 
    $01,$01,$01,$01,$01,$01,$1F 
    $11,$1B,$15,$15,$11,$11,$11 
    $11,$11,$13,$15,$19,$11,$11 
    $0E,$11,$11,$11,$11,$11,$0E 
    $0F,$11,$11,$0F,$01,$01,$01 
    $0E,$11,$11,$11,$15,$09,$16 
    $0F,$11,$11,$0F,$05,$09,$11 
    $1E,$01,$01,$0E,$10,$10,$0F 
    $1F,$04,$04,$04,$04,$04,$04 
    $11,$11,$11,$11,$11,$11,$0E 
    $11,$11,$11,$11,$11,$0A,$04 
    $11,$11,$11,$15,$15,$15,$0A 
    $11,$11,$0A,$04,$0A,$11,$11 
    $11,$11,$11,$0A,$04,$04,$04 
    $1F,$10,$08,$04,$02,$01,$1F 
    $07,$01,$01,$01,$01,$01,$07 
    $01,$01,$02,$04,$08,$10,$10 
    $1C,$10,$10,$10,$10,$10,$1C 
    $04,$0A,$11,$00,$00,$00,$00 
    $00,$00,$00,$00,$00,$00,$1F 
    $02,$04,$08,$00,$00,$00,$00 
    $00,$00,$0E,$10,$1E,$11,$0E 
    $01,$01,$0D,$13,$11,$11,$0F 
    $00,$00,$0E,$01,$01,$11,$0E 
    $10,$10,$16,$19,$11,$11,$1E 
    $00,$00,$0E,$11,$1F,$01,$0E 
    $0C,$12,$02,$0F,$02,$02,$02 
    $00,$1E,$11,$11,$1E,$10,$0E 
    $01,$01,$0D,$13,$11,$11,$11 
    $04,$00,$06,$04,$04,$04,$0E 
    $08,$00,$08,$08,$08,$09,$06 
    $01,$01,$09,$05,$03,$05,$09 
    $00,$06,$04,$04,$04,$04,$0E 
    $00,$00,$0A,$15,$15,$15,$15 
    $00,$00,$0D,$11,$11,$11,$11 
    $00,$00,$0C,$12,$12,$12,$0C 
    $00,$00,$0D,$13,$11,$0F,$01 
    $00,$00,$16,$19,$1E,$10,$10 
    $00,$00,$0D,$13,$01,$01,$01 
    $00,$00,$0E,$01,$0E,$10,$0F 
    $00,$04,$1E,$04,$04,$04,$08 
    $00,$00,$11,$11,$11,$11,$0E 
    $00,$00,$11,$11,$0A,$0A,$04 
    $00,$00,$15,$15,$15,$15,$0A 
    $00,$00,$11,$0A,$04,$0A,$11 
    $00,$00,$11,$11,$0A,$04,$06 
    $00,$00,$1F,$08,$04,$02,$1F 
    $0C,$04,$04,$03,$04,$04,$0C 
    $04,$04,$04,$04,$04,$04,$04 
    $06,$04,$04,$18,$04,$04,$07 
    $00,$00,$0A,$05,$00,$00,$00 
    $1F,$1F,$1F,$1F,$1F,$1F,$1F  ok
    
Sign In or Register to comment.