Introduction: Getting Started With the Pocket Mini Computer
About a month and a half ago, I created a project called the Pocket Mini Computer and wrote an Instructable on how to build it. This Instructable takes the entire project a step further by helping you Get started with your Pocket Mini Computer. Haven't built one yet? I've included both a link to kit which has everything you need, and complete schematics on the last page for those who want to "Roll their own".
You can think of this as the "Users Guide" to the Pocket Mini Computer.
(It's alternate title might be: Why would I possibly build on of these?!)
The Pocket Mini Computer Instructable Table of Contents:
- Features and Specifications of the hardware and BASIC
- Getting started with BASIC
- Adding microSD support
- Adding and using DOS
- Adding and using the full-screen editor
- Running external non-basic binaries
- Adding and using extended memory (SRAM)
- Using the Wii Controller & Expermenter's ports
- Adding an IR (Infrared) reciever
- Support and Links
- Schematics (in the back of the guide, like the old days.)
Update! August 2014
The PMC has been completely updated with a new product. The Propeller Experimenter's Board makes the PMC a single board kit, easier to build with new features. This new PEB/PMC 2014 is completely compatible with the original PMC 2013 and can be obtained from Propellerpowered's Tindie Store.
Update! September 2014
We've just released version 4 of the PMC project with a board called the Micromite Companion. By adding a Micromite to the PEB or obtaining our dedicated Micromite Companion Kit, you can do more with your projects than ever before. Completely compatible with our original PMC/PEB projects, the MMC now offers a very robust MMBASIC with 54K of free memory at boot-up.
Why on earth would I want to program in BASIC? This is a nostalgia toy right?
I won't deny it! The Pocket Mini Computer started out as a simple nostalgia item. It's friendly big text and bright colors are a fun way to time travel back to a time when computing was simple. For older users, it's a blast to past! For younger users it's an opportunity to experience computing as it was. (Without playing with creaky old hardware and floppy disks)
The Pocket Mini Computer has had several new features added recently which give it the power to do things which may not have been possible in COLOR BASIC due to memory restrictions. In fact, it's currently heading in a direction which will make it much like a BASIC STAMP or PICAXE, only you don't need to program it from another PC. It's a way to get into microcontrollers without having to become a programming geek. (Be warned, this stuff is addictive and soon you'll want to do more. This project will do it!)
Grab a ready-to-go Kit, or build your own from scratch!
If you have a favorite Propeller board already, and are comfortable with creating your own version of the Pocket Mini Computer, I've included both complete schematics and I/O configuration details on the last page of this Instructable. Complete source code is also available for download. (See step three) This is a fun project if you are building the Pocket Mini Computer or "Rolling your own" from the schematics, read on!
Step 1: Pocket Mini Computer Features
The Pocket Mini Computer features:
- 32K RAM
- 64K EEPROM
- VGA Output
- PS/2 Keyboard/Mouse port
- Right/Left audio out
- Wii Nunchuck/Classic connection
- I/O Experimenter's port
- Extended Ram (SRAM) socket
- Optional IR receiver connection
- Optional microSD connection
The BASIC firmware features:
- 4094 available bytes free
- 64 colors
- 1 "SIDlike" audio channel
- 127 character re-programmable character set
- plot, line, and box graphics commands
- I/O access commands
- 95+ BASIC Commands, operators, and functions
- SD operating system
- Full screen editor (requires a microSD card.)
- Ability to execute non-basic binary programs
- Extended memory features (requires a 23K256 SRAM chip)
Just added! Here's a project to control X10 devices (and more!) from the Pocket Mini Computer
The Pocket Mini Computer can be powered by either a USB connection to a PC USB port, or USB power supply. (A power supply with USB micro connection supplying 5v at 500ma-1000ma should work fine.)
When you first power up the PMC, a friendly boot message appears and flashing cursor telling you the system is ready for input.
The central processing unit of the PMC is a Parallax Propeller Microcontroller. PROPELLER COLOR BASIC uses around 28k of of the microcontroller's available memory, leaving us around 4k for BASIC programming.
To give you an idea of the scale you are operating at:
1KB = 1,024 bytes
1MB = 1,048,576 bytes
1GB = 1,073,741,824 bytes
KB = Kilobyte, MB = Megabyte, GB= Gigabyte
While this 4096 bytes doesn't seem like much in today's computing world, it represents the ability to accept around 8 full pages of BASIC code. (That's a lot of typing!) There's also a couple other tricks we can do if we run out of memory, but we'll save that for later.
Any time you want to know how much available memory is left, simply type PRINT MEM and press [ENTER].
Step 3: Making Sure You Have the Latest Firmware
Type VER and [ENTER]
At the time of this writing of this guide, 2.2k is the latest version of the BASIC.
Updates to the code: http://www.propellerpowered.com/library (see PropellerBASIC)
You can update your BASIC firmware by doing the following.
- Download the BASIC-X_Xx-archive.XXXXXXXXX.zip and extract it to a folder.
- Connect the USB cable from the power supply to the computer.
- Use Propeller Tool to send "BASIC.spin" to your Pocket Mini Computer using F11.
- If using the microSD module, copy BASIC.BIN from the archive to your SD card.
Step 4: The BASICs of BASIC
HELLO WORLD is the programming standard for being the first program you write in any language.
Type 10 PRINT "HELLO WORLD" and press [ENTER]
Type RUN and press [ENTER]
Type LIST and press [ENTER]
Maybe you've just created your first BASIC program. Maybe you haven't done this in years!
A complete Color Basic Language Reference has been created to all of the BASIC Commands, functions, and statements. I highly recommend trying the character REDEFINE, PLOT, BOX, and LINE functions first.
If you are the type of person who learns by example, there are a bunch of great code examples in this thread, and source code.
Psst.. I've added a second picture that has a neat program for displaying the available colors. Don't worry if you can't completely read it in the picture, it's included in the two links above.
Step 5: Mass Storage (Big Things That Come in Small Packages)
The addition of a microSD card to your Pocket Mini Computer is highly recommended.
It adds the following features:
- The ability to LOAD/SAVE basic programs
- The ability to execute non-binary programs from SD.
- The ability to use the full-screen editor.
- The ability to add a DOS binary to your PMC.
The addition is as simple as adding the Parallax microSD module (pictured) to your Pocket Mini Computer.
(Newer batches of PMC kits have the Unversal MicroSD Module Kit included.)
It is recommended that you use 2GB (or smaller) microSD cards with your Pocket Mini Computer.
Reformatting them to FAT with 32K allocation units it recommended.
From a DOS prompt on your PC, type FORMAT X: /FS:FAT /A:32K (X: being the letter of your inserted microSD card)
A schematic for the microSD circuit used by the Pocket Mini Computer is included at the end of this guide.
Step 6: DOS (microSD'isk Operating System)
If you've added the recommended microSD feature talked about on the last page, you now have the ability to launch non-basic binary files, temporary replacing the BASIC in memory with other programs. Don't worry, the BASIC is stored on the 64k EEPROM chip and restarts when the PMC is rebooted.
DOS is one of these external programs you can add.
KyeDOS was created by Kwabena Agyeman and James Moxham. It demonstrates the a little of the actual power of the Parallax microcontroller that powers the Pocket Mini Computer. Even 80's style, Atari font is replaced by one that you might expect in a DOS system.
Grab a copy of the DOS.BIN file from this archive and copy it to your microSD card.
Reboot the Pocket Mini Computer and type DOS and [ENTER], this will launch the Disk Operating System.\\
Typing help and [ENTER] will display the list of avaible dos commands.
Some of the commonly recognized (and most useful!) commands include DIR, CD, RM, and REBOOT.
Step 7: Using the Full-screen Editor
Typing BASIC programs in line-by-line can be a little tedious. If you make a mistake, BASIC will force you to re-type the entire line over to correct the error. If you have added the microSD module to your Pocket Mini Computer, there is an easy full-screen editor which can be accessed at the press of a button to create & edit your BASIC programs.
BASEDIT is another external programs you can add.
Grab a copy of the BASEDIT.BIN file from this archive and copy it to your microSD card.
Once installed, you can jump to the full-screen editor by pressing F1 from BASIC.
Pressing F1 from the editor will return to BASIC and autostart your program.
Inside the editor, you can cursor around your program, insert and delete lines and code.
Step 8: Exploring Non-BASIC Binary Programs
Because the Pocket Mini Computer is built on the Parallax Microcontroller, it is capable of using any program written for that platform which supports the features on your PMC board.
There are several non-basic binaries in this archive which are compatible for with your Pocket Mini Computer.
Here are some of the highlights:
* * * * SIDPLAYER * * * *
The SID player program SIDPLAYR.BIN is a re-creation of the Commodore 64 SID player.
It's SID emulation is so good, you'll swear you are listening to the real thing!
To use SIDplayer, you'll need to create a folder called DMP on your microSD card and copy a bunch of the SID .dmp files to it. (There are a bunch of .DMP SID files in the archive.)
Launch the SIDplayer with BRUN "SIDPLAYR.BIN"
* * * * ZORK * * * *
Take an adventure in the "Great Underground Empire" and play some ZORK.
To use ZORK, copy both ZORK1.BIN and ZORK1.DAT to your microSD card and BRUN "ZORK1.BIN" from BASIC.
* * * * LOGO * * * *
Remember Turtle graphics? Here's a version of LOGO for your Pocket Mini Computer.
To use LOGO, copy LOGO.BIN to your microSD card and BRUN "LOGO.BIN" from BASIC.
* * * * RANQUEST * * * *
Ranquest is a full NES style Zelda-type adventure you can play on your PMC.
To use RANQUEST, copy RANQUEST.BIN, and extract ranquest_sdfiles.zip to your microSD. BRUN "RANQUEST.BIN" from BASIC.
Step 9: Adding Extended Memory
By adding a 23K256 chip (and recommended .01uf cap) to your Pocket Mini Computer, BASIC will detect and allow you to use the additional 32k as extended memory using PEEK and POKE commands. Additionally, the extended memory can store information when executing and returning from other BASIC and non-basic binary programs.
Once the chip is installed in the socket provided on the Pocket Mini Computer, BASIC will automatically detect and add the line:
32K EXTENDED MEMORY BYTES FREE
to the BASIC boot screen.
There are three new BASIC commands that are available one the chip is installed:
POKE <address>, <value>
The POKE command affects a byte of SRAM at the specified address. The address value may be 0 to 32767.
The PEEK function returns a value from SRAM from the specified address. Address values may be locations from 0 to 32766.
The CLEAR function clears all values stored in SRAM to zeros.
A schematic of this circuit is included at the end of this guide.
Step 10: Wii Connection & Experimenter's Port
The Wii Controller Connection:
A Wii Nunchuck/Classic/Classic Pro controller connected is located on the right side of the top PMC board. There are also two optional "pull-up" resistor pads located behind V33 and P12 on the right edge. (Look for the two sets of holes that look like "tron cycles") Two 1.1k resistors can be installed for full compatibility with all controller drivers.
Not all Wii controller objects require these optional pull-up resistors. COLOR BASIC does not require these pull-ups and is only compatible with Wii Classic/Classic pro controllers due to memory constraints.
Note: The controller should always be plugged in with the notched end up as shown in the photo. Plugging the controller in upside down will cause the Quickstart not to start.
The Experimenter's Port:
Just above the Wii Controller Connection are a row of five connection points labeled, P14, P13, P12, V33, and Vss. There are access points to external I/O pins which can be controlled from BASIC for controlling or reading information from the outside world. If you are going to use this port, it is recommended that you install a five pin, male or female pin header into this connection.
A fun experiment to try using this port is controlling an LED from BASIC.
Carefully insert an LED between P12 and V33. (Insert the shorter led into P12)
Type in the following program and RUN it.
10 FOR X = 1 TO 10
30 PAUSE 100
50 PAUSE 100
60 NEXT X
The LED should flash on and off 10 times, then stop.
Here's a thought. If you can control and LED from BASIC, you can control a transistor. If you can control a transistor, you can control a relay. If you can control a relay, you can control ANYTHING. (evil laugh)
It's just as easy to read information from the outside world as well. For instance a switch could be read using the INA command.
Read up on both OUTA and INA in the Color BASIC Language Reference.
Why use P12, P13, and P14? The Propeller Microcontroller has a ton of great programs and games which are designed to work with a TV or composite screen. By adding three resistors to these points, you can create a video output port that works with AV-in. (Discussion and schematic about adding the AV-out video circuit can be found in this Instructable.)
Step 11: The IR (infrared) Port.
While there isn't direct support in the BASIC firmware (yet), there is a very nice replacement keyboard driver which can be substituted in the BASIC source code allowing you to use a WebTV keyboard from across the room, instead of the PS/2 keyboard which is currently compiled in BASIC. The Propeller Microcontroller also has several IR objects (code) which can be used to read remote controls.
This is a feature that will be implemented as "standard" eventually, but is certainly not out of reach for anyone who wants to tinker with it now.
Installing the IR support requires:
- TSOP 4838 IR Receiver
- 3.3k resistor
Step 12: More Links and Information
The Pocket Mini Computer project is ongoing. Many features mentioned in this Instructable have been created since it's release two months ago. (Many more features are in the works.) If you are building a kit version of the PMC, or "rolling your own" from the schematics, I want welcome you to the forums and resources listed below.
POCKET MINI COMPUTER SUPPORT AND LINKS
The Pocket Mini Computer is available as a kit from Propellerpowered:
Pocket Mini Computer Assembly Instructions:
PMC Assembly Instructions
Forum support and discussion for the Pocket Mini Computer:
The Pocket Mini Computer is capable of running Propeller binaries. (Games and programs)
A collection of programs which are compatible with the Pocket Mini Computer can be found at:
Information on ongoing updates and improvements to COLOR BASIC:
BASIC code examples:
Step 13: Schematics
I wanted to insure 100% success for anyone attempting this project, so we created a kit, but have received a lot of positive encouragement to also provide a schematic for those who want to take a shot at "rolling their own" Pocket Mini Computer.
The brain (CPU) behind the Pocket Mini Computer is a Parallax P8X32A microcontroller, so grab your favorite Propeller board and dig in!
We'll be using the following I/O pins for connected devices:
- P0 - P3 SD or microSD connection
- P5 Optional iR Connection
- P6 - P9 Optional SRAN 23K256 Socket
- P10- P11 Stereo audio connections
- P12-14 Optional AVout/Experimenter's Port
- P24, P25 Wii Classic Controller connection
- P26, P27 PS/2 Keyboard Connection
- P16-P23 VGA connection
- P4 & P15 Unused
- P28-29 Quickstart EEPROM
- P30-31 Programming/USB Communication
Schematics for all of the I/O circuitry used in the Pocket Mini Computer.
Higher resolution .PDF versions of both the core circuit and extended features can also be downloaded.
If you get stuck, don't hesitate to jump into the forums and ask questions!
We have a be nice policy.
Please be positive and constructive.