HackerBox 0061: Props

Introduction: HackerBox 0061: Props

Greetings to HackerBox Hackers around the world!

HackerBox 0061 brings you the Parallax Propeller 8-Core Microcontroller. Assemble the exclusive Prop Kit, and experiment with parallel programming, game development, the Propeller Spin programming language, keyboard/mouse interfacing, game controllers, basic surface mount soldering, audio/video signal generation, audio/video signal capture, and brush up on the applications of matrix math.

HackerBoxes is the monthly subscription box service for enthusiasts of electronics and computer technology - Hardware Hackers - The Dreamers of Dreams.

There is a wealth of information for current and prospective members in the HackerBoxes FAQ. Almost all of the non-technical support emails that we receive are already answered there, so we really appreciate your taking a few minutes to read the FAQ.

Supplies

This Instructable contains information for getting started with HackerBox 0061. The full box contents are listed on the product page for HackerBox 0061 where the box is also available for purchase while supplies last. If you would like to automatically receive a HackerBox like this right in your mailbox each month with a $15 discount, you can subscribe at HackerBoxes.com and join the revolution!

A soldering iron, solder, and basic soldering tools are generally needed to work on the monthly HackerBox. Box 0061 can use an old PS/2 Keyboard and PS/2 Mouse, but these are not absolutely necessary. A computer for running software tools is also required. Have a look at the HackerBox Deluxe Starter Workshop for a set of basic tools and a wide array of introductory activities and experiments.

Most importantly, you will need a sense of adventure, hacker spirit, patience, and curiosity. Building and experimenting with electronics, while very rewarding, can be tricky, challenging, and even frustrating at times. The goal is progress, not perfection. When you persist and enjoy the adventure, a great deal of satisfaction can be derived from this hobby. Take each step slowly, mind the details, and don't be afraid to ask for help.

Step 1: Parallax Propeller Microcontroller

The Propeller is a microcontroller from Parallax Inc. Its eight cores each have access to all 32 I/O pins and internal shared memory for simplified system integration and data conveyance among processes. A central hub and common system clock preserve shared memory integrity by allowing one core at a time to access main RAM in a round-robin fashion, optionally augmented by eight lock bits. Each core has its own memory for independent code and data processing, and a pair of configurable counter modules, a video generator, and I/O registers that can be utilized as a variety of software peripherals.

The Parallax Propeller is known in the hardware hacking community for its use in some very cool projects such as the JTAGulator and the DEF CON 22 Badge.

The HDL source files for the Propeller chip itself have been released under GNU Public License. Not that you'd probably want to roll your own Propeller chip, but it is quite interesting to see the inner workings. Also, the source might be useful for an FPGA project.

As of late 2020, there is a new Propeller 2 chip finally entering the market, and quite possibly coming to future HackerBox near you!

Step 2: Propeller Chip Documentation

You can download the Propeller Manual, and one or both of these...

Programming and Customizing the Multicore Propeller Microcontroller

Game Programming for the Propeller-Powered HYDRA

Step 3: HackerBox 0061 Prop Kit

The exclusive HackerBox 0061 Prop Kit is based on the Propeller CPU running eight PIC-like CPU cores each with 496 32bit-words of workspace plus a shared 32kB RAM and 32kB ROM. The kit also features a 24LC512 serial EEPROM chip with a capacity of 512Kb (or 64KB).

The Prop Kit also includes an FT232 USB interface with a MiniUSB programming port. Other ports include two SNES Compatible Game Ports, a PS/2 Keyboard Port, a PS/2 Mouse Port, a 3.5mm TRRS A/V Jack providing audio and composite video output, and an I/O header configured to support a MicroSD card module.

HackerBox 0061 Prop Kit Components:

  • Exclusive Custom PCB
  • Parallax Propeller Chip P8X32A-D40 DIP 40
  • FT232RL Module - switch jumper to 3.3V
  • 24LC512 Serial EEPROM DIP 8
  • Two SNES Game Controller Sockets
  • Two Mini DIN 6 pin PCB Sockets
  • Micro SD Card Module
  • 10MHz HC49 Crystal
  • AMS1117-3.3 LDO Voltage Regulator
  • Tactile SMD Reset Button
  • Five 10K Resistors 1206 SMD
  • Four 100R Resistors 1206 SMD
  • Three 270R Resistors 1206 SMD
  • Three 560R Resistors 1206 SMD
  • One 470R Resistor 1206 SMD
  • Four 0.1uF Ceramic Capacitors 1206 SMD
  • Two 10uF Tantalum Capacitors 1206 SMD
  • 3.5mm TRRS Female Socket
  • 5mm Red Diffused LED
  • DIP IC Socket 40 pin
  • DIP IC Socket 8 pin
  • 40 pin Single Row Header
  • Four 3M Adhesive Rubber Feet

Step 4: Prop Kit - FT232 and Initial Assembly

VOLTAGE

The red FT232 module features a MiniUSB connector and a FT232RL chip (datasheet) to support USB to serial UART interfacing. The Prop Kit is also powered through the USB port of the FT232 module. The FT232 module has a 5V/3.3V jumper which must be set to 3.3V

OPTIONAL FT232 MODIFICATION

Since the six right-angle pins on the top of the FT232 module are not used, they can be desoldered to make the board look a little cleaner. This is totally optional since leaving the pins in place will not affect operation in any way. The pins are easier to desolder if the header's plastic insulators are first removed or cut apart. Similarly, the three pins for the voltage jumper switch can be removed as long as the two pins for selecting 3.3V are shorted together with a blob of solder to configure the FT232 module for 3.3V operation.

MINIMAL INITIAL PROP KIT ASSEMBLY

It's choose your own adventure time... You can follow the procedure in this step to set up and test a minimal initial assembly of the Prop Kit board. Or you can jump right into the full assembly by following the procedure in the next step. The choice is yours!

  1. Perform the FT232 modification above or set the jumper to 3.3V
  2. Break off two nine pin lengths from the 40 pin header
  3. Use the cut pin headers to solder the FT232 module to the Prop Kit PCB (Optionally remove the insulators from the header if you want the FT232 module to sit flat against the PCB)
  4. Solder the AMS1117 LDO regulator
  5. Solder the red LED (orient the short pin closest to the flat side on the PCB silkscreen)
  6. On the bottom of the PCB, find pads for the 270 Ohm resistor closest to the LED (about 5mm away) and install one of the resistors marked "271" which means 27*10^1 (or 270) - resistors may be oriented in either direction
  7. Match the half circle notch indicator on the 40 pin IC socket to the same shape on the PCB silkscreen and solder the IC socket into place
  8. Match the half circle notch indicator on the 40 pin Propeller IC to the same shape on the IC socket and carefully press the IC into the socket (sometimes it helps to bend the two rows of IC pins very slightly closer together by laying the chip sideways on the table and gently forcing each row of pins towards the center of the IC about 1mm)

These few parts are all that is needed to program the Propeller and blink the LED, so now we're ready to jump ahead to the "Hello World Blinky" example.

Step 5: Prop Kit - Full Assembly

Solder time! You may want to review the online guide from our Soldering Workshop paying particular attention to the surface mount soldering pointers in Step 6. If this is all very new, you may want to watch the Learn to Solder video in Step 1.

  1. Start by placing all of the 1206-sized SMT devices according to the PCB markings
    • Two 10uF Tantalum Capacitors (yellow with brown stripe) - orient the brown stripe towards the silkscreen marking with chamfered corners
    • Four 0.1uF Ceramic Capacitors (light brown, no markings) - may be oriented either way
    • Five 10K Resistors (marked "103") - may be oriented either way
    • Four 100R Resistors (marked "101") - may be oriented either way
    • Three 560R Resistors (marked "561") - may be oriented either way
    • Three 270R Resistors (marked "271") - may be oriented either way
    • One 470R Resistors (marked "471") - may be oriented either way
  2. Solder AMS1117 LDO regulator
  3. Solder reset button
  4. Solder the red LED (orient short pin closest to the flat side on the PCB silkscreen)
  5. Solder 10MHz crystal may be oriented either way
  6. For both IC sockets, match the half circle notch indicator on the socket to the same shape on the PCB silkscreen and solder the IC sockets into place
  7. For both IC chips, match the half circle notch indicator on the IC to the same shape on the IC socket and carefully press the IC into the socket (sometimes it helps to bend the two rows of IC pins very slightly closer together by laying the chip sideways on the table and gently forcing each row of pins towards the center of the IC about 1mm)
  8. Perform the FT232 modification from the previous step or set the jumper to 3.3V
  9. Break off two nine pin lengths from the 40 pin header
  10. Use the cut pin headers to solder the FT232 module to the Prop Kit PCB (optionally remove the insulators from the header if you want the FT232 module to sit flat against the PCB)
  11. The six pins on the lower left corner of the PCB can be used as an I/O expansion header, or a Micro SD Card Module may be installed (optionally remove the insulators from the header of the Micro SD Card Module if you want the module to sit flat against the PCB)
  12. The five connector sockets go exactly where you think they do
  13. Place the adhesive rubber feet on the bottom of the PCB, one in each corner

Step 6: Hello World Blinky

Install the Propeller Tool software from the Parallax Download Page.

Plug the Prop Kit board into a USB port.

From within the Propeller Tool, hit F7 (or menu to Run > Identify Hardware)

The tool will report "Propeller Chip found on COM n"

Paste the following code into the workspace:

PUB main
  dira[0] :=1
  repeat
    outa[0] := 1
    waitcnt(clkfreq + cnt)
    outa[0] := 0
    waitcnt(clkfreq + cnt)

Save the Code to create a file.

Hit F10 (or menu to Run > Compile > Load RAM)

This will load the code into RAM and run it, which will blink the LED on P0.

Since the code is in RAM, it will disappear when you cycle power. Hitting F11 is similar to F10, but stores the code onto the EEPROM.

Obviously, F11 will fail if the board doesn't have an EEPROM chip yet, so if you jumped to this step from the minimal build, go back and assemble the rest of the Prop Kit board.

Step 7: HYDRA Game Development

The Prop Kit implements many similar Propeller based features as the HYDRA Game Development Kit. A lot of the HYDRA code examples will run on the Prop Kit with little or no modification. Two major functional differences are in the PS/2 ports for keyboard and mouse. Switching to a different driver/library and specifying the I/O pins as shown in the modified examples below will often suffice to reuse a piece of HYDRA code.

If you haven't already done so, download the Game Programming book linked earlier. Also grab this zip file of the HYDRA CD-ROM. The folder Hydra/sources within the zip is filed with example code. Try some of these after making any of the noted modifications for keyboard and/or mouse.

  • FROGGER_DEMO_030 (video, sound, gamepad)
    • works as is
  • gamepad_demo_011 (video, gamepads)
    • works as is
  • keyboard_demo_010
    • "keyboard_iso_010.spin" to "keyboard"
    • key.start(3) to key.start(13, 15)
  • JTC_B_Buster_005 (video, sound, mouse)
    • "keyboard_iso_010.spin" to "keyboard"
    • "mouse_iso_010.spin" to "mouse"
    • key.start(3) to key.start(13, 15)
    • mouse.start(2) to mouse.start(9, 11)
  • hydra_test_rev_a (all the things!)
    • "keyboard_iso_010.spin" to "keyboard"
    • "mouse_iso_010.spin" to "mouse"
    • key.start(3) to key.start(13, 15)
    • mouse.start(2) to mouse.start(9, 11)
  • sound_demo_020 (sound, mouse)
    • "mouse_iso_010.spin" to "mouse"
    • mouse.start(2) to mouse.start(9, 11)
  • NS_deep_cavern_020 (video, sound, gamepad)
    • works as is with gamepad, or
    • modify two keyboard entries to use arrow keys
  • REM_LockNChase_012 (video, sound, gamepad)
    • works as is with gamepad, or
    • modify two keyboard entries to use arrow keys.

NOTE: Regarding the little green passive USB to PS/2 adapters that we all have lying around, these do not work with all USB keyboards. Some keyboards are designed to switch into PS/2 mode, and should work with the passive adapter. The keyboard that the adapter originally came with, for example. However, more and more newer USB keyboards do not support PS/2 interfacing as well as USB.

Step 8: Generating and Capturing Composite Video

Composite Video (Wikipedia) is an analog video signal format that carries standard-definition video (typically at 480i or 576i resolution) as a single channel. Video information is encoded on one channel, whereas the higher-quality S-video uses two channels and the even higher-quality component video uses three or more channels. In all of these video formats, audio is carried on a separate connection. Composite video is also known by the initials CVBS for composite video baseband signal or color, video, blanking and sync. It is also simply referred to as SD video for the standard-definition television signal it conveys. There are three dominant variants of composite video: NTSC, PAL, and SECAM.

Chapter 7 of the HYDRA Game Development book does an amazing job of explaining the generation of composite video on the Propeller Chip.

We can even generate a simple composite video signal using a humble 8-bit Arduino with the TVout Library and even more elegantly on the ESP32.

USB Audio/Video Capture Device

With televisions and computer monitors featuring composite video inputs becoming less and less common, we need a way to view (or capture) these video signals generated by our small embedded systems, classic computers, older game platforms, and even VCRs, camcorders, or aging set top boxes. An A/V capture device operable to bring these composite video signals into a modern computer is a good tool for any hardware hacker to keep on the bench. The one here is based on the MS2106 Macrosilicon chip. Captured video from the MS2106 dongle can be viewed (or saved) on most computers systems. On a Windows 10 system, run the camera application and switch the input to the AV Capture device. To hear the audio live, go into the system settings for sound, select the AV Capture device as the input (microphone), enter advanced settings, select the "Listen" tab, click the checkbox for "Listen", and hit "Apply". This seems rather circuitous, but it makes sense (in a weird Microsoft kind of way) once you think about it.

Step 9: Take the Red Pill...

you stay in wonderland, and I show you how deep the rabbit hole goes."

You will not regret kicking back with this video on the applications of matrix math. It is pleasantly accessible and we could all use a little more time in the matrix.

Step 10: HackLife

We hope you are enjoying this month's HackerBox adventure into electronics and computer technology. Reach out and share your success in the comments below or other social media. Also, remember that you can email support@hackerboxes.com anytime if you have a question or need some help.

What's Next? Join the revolution. Live the HackLife. Get a cool box of hackable gear delivered right to your mailbox each month. Surf over to HackerBoxes.com and sign up for your monthly HackerBox subscription.

12 People Made This Project!

Recommendations

  • Fix It Speed Challenge

    Fix It Speed Challenge
  • Photography Challenge

    Photography Challenge
  • New Year, New Skill Student Design Challenge

    New Year, New Skill Student Design Challenge

46 Comments

0
necronninetynine
necronninetynine

12 months ago

Only demos I can get anything but snow/distorted video out of so far are the game pad demo and the lunar lander video. Frogger looks like it is trying to display but the video is all scrambled. This is on a vintage TV with composite video as well as through the supplied video capture device to a video capture program under Ubuntu 18.04.

Only bit I really mucked up was the one 10uF cap by the USB interface. It flew off my desk never to be seen again.

I can load and run programs. And save them. I just can't sort out why my video is borked.


0
necronninetynine
necronninetynine

Reply 10 months ago

Just now revisiting this project to use the board for testing an old Samsung TXD1372 I picked up recently and came back here to see if anyone had posted about how to slow down Frogger as it seems to run a bit fast. When I did I realized I never posted the resolution to my issue.

I realized the issue goes away when I touch the crystal casing. So a ground issue somewhere I suppose.

0
kevhol
kevhol

11 months ago

What is the microSD card slot needed for?

0
DavidT581
DavidT581

1 year ago

Has anyone had an issue running on a win10 machine , no video output showing from the device? win10 sees the capture device, and it is selected and is "listening" per instructions, but nothing coming out of the device. I was using the Frogger30 sample on the propeller.

0
necronninetynine
necronninetynine

Reply 12 months ago

Did you ever solve this? I get no video from frogger through the video capture usb dongle but I do get terribly scrambled video to an actual composite capable tube tv.

0
mdlarussa1
mdlarussa1

1 year ago

"No Propeller found on any serial port" Trying to connect to the full build.
It lists the FTDI com port, but can't go any further. Is there someway I can debug this connection, maybe with a volt meter or scope? I'd really hate to have a paperweight with SNES ports on it. :D

0
HackerBoxes
HackerBoxes

Reply 1 year ago

Things to check:
FTDI jumper set to 3.3V
Measure Input to AMS1117 Regulator is 5V and output is 3.3V
Check Prop Pins (going into socket) are not bent under
Check all solder joints, but especially RX, TX, and RESET between red FTDI module and Prop Chip - Those three pins, working FTDI, and no pwr/gnd shorts are about all you should need to "see" the Prop Chip from the Prop Tool software.

0
lasvegasjose
lasvegasjose

Reply 12 months ago

Hi, I have the same situation as mdlarussa1. Buzzed all pins: they are OK. Jumper is set to 3.3V. Also checked the crystal and the capacitors next to the propeller, also OK. Only issue found is that the output voltage of the regulator is 4.4V. Would this make a difference? Oh the propeller chip is inserted correctly.

0
SteveMunson
SteveMunson

Reply 1 year ago

Double-check all your solder connections. Make sure your Propeller chip is inserted correctly. Measure the output voltage on your FT232RL.

0
anthonywylam
anthonywylam

1 year ago

Prop program sees Program just fine. It uploads progs to both RAM and EPROM. I have tested and working Video, snes con, and sound. BUT the serial monitor never sees anything and I get no anything from things like frogger. The Hello world blink works but still nothing on serial monitor. I am pulling my hair out trying to understand why I can't get frogger to work or an error to show up. P.S. REM_LockNChase_012 seems to work but the video is not centered and so part of the video that should be top shows on the bottom like an old crt with bad v.hold.

0
MornaStar
MornaStar

Reply 1 year ago

Were you ever able to get frogger working? I am in the same boat. Lock and Chase works just fine (I do not have the vhold problem that you seemed to have), but I get black screen with frogger. Thanks.

0
HackerBoxes
HackerBoxes

Reply 1 year ago

Hmm.. Maybe check the soldering on your crystal and the two related pins on the prop chip. Both video generation and serial output are clock dependent. Try the example below. It should give you terminal output (F12). Also Note: The examples in the Hydra download are already set up for 10MHz crystal, but many other Propeller code examples will need the _clkmode and _xinfreq copied over from the example below if they are generally not assuming a 10MHz crystal.

'try this code, it should echo KBD to Serial Terminal
'right after you hit F10 (or F11), hit F12 to pop up the Terminal
CON
_clkmode = xtal1 + pll8x
_xinfreq = 10_000_000
OBJ
kb : "keyboard"
pst : "Parallax Serial Terminal"
PUB Main | value, base, width, offset
'Set Parallax Serial Terminal to 115200 baud
pst.Start(115_200)
pst.Str(string("Keyboard Demo...",13))
'start the keyboard
kb.start(13, 15)
'echo keystrokes in hex
repeat
pst.Chars(kb.getkey,1)

0
anthonywylam
anthonywylam

Reply 1 year ago

Been looking all over for a ps2 kb and mouse (I know I have some in one of my many boxes) in the mean time I can't find any bad connections on any of my points. I've uploaded pics in case someone sees something I'm blind to by now.

IMG_20201215_215345005.jpgIMG_20201215_215357270.jpg128853127_3449000075176154_6576938886032187099_n.jpg
0
HackerBoxes
HackerBoxes

Reply 1 year ago

It is hard to fully troubleshoot soldering from a photo, but those look pretty nice. Nothing jumps out as a problem from what I see. That code will output the text "Keyboard Demo..." to the serial terminal even with no keyboard attached.

0
anthonywylam
anthonywylam

Reply 1 year ago

Tried the KB demo code but still nothing on serial. Update: The issue with the video looking odd with the Vhold was, I'm assuming, not enough power to the Av to usb as I had it plugged into a hub with three other things. Still no serial monitor action from anything and while it will compile/upload frogger is a black screen no sign of anything working. It really baffles me that the serial monitor is not showing anything when I can run some of the demos showing that the hardware is correct.

0
fullyloaded
fullyloaded

1 year ago

I pressed F7 and it showed the propeller on COM6.
I copied the blink program and pasted it into the Propeller Tool workspace.
I pressed F10. It said there was no propeller found on COM6.
I finally ended up saving the file to a location.
When I pressed F10 again it found the Propeller on COM6 and programmed the board correctly. So apparently you have to save the file first before trying to compile and load it into the board. Just FYI.

0
FrederickL31
FrederickL31

Reply 1 year ago

Lifesaver! Ran into this exact problem, and I was worried I had done something wrong. Pulled out the oscilloscope, and checked everything for connections/activity/power, no shorts, the works. Thank you so much for this tip!

0
ibyte8bits
ibyte8bits

1 year ago

Thought someone would like to go through the Programming and Customizing the Multicore Propeller Microcontroller but its source is written for a different circuit board. Here's a cross reference for the pins:

Cross Reference Pinout Hacker to Parallax Demo Boards.png
0
SteveMunson
SteveMunson

Question 1 year ago on Step 6

I built the minimal assembly, loaded the blink test code, hit F7 and it finds the Propeller. I hit F10 and it says no Propeller found on any serial port.

Screenshot 2020-12-03 113536.pngScreenshot 2020-12-03 113601.png
0
SteveMunson
SteveMunson

Answer 1 year ago

Fixed. You have to save the program first.