You are on page 1of 12

Food Living Outside Play Technology Workshop

Pocket Mini Computer User's Guide


by Propellerpowered on September 3, 2012

Table of Contents

Pocket Mini Computer User's Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro: Pocket Mini Computer User's Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1: Pocket Mini Computer Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 2: .................................................................................................................. 3

Step 3: Making sure you have the latest firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 4: The BASICs of BASIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 5: Mass storage (Big things that come in small packages) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Step 6: DOS (microSD'isk Operating System) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Step 7: Using the full-screen editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Step 8: Exploring non-BASIC binary programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Step 9: Adding Extended Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Step 10: Wii Connection & Experimenter's Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Step 11: The IR (infrared) port. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Step 12: More Links and Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Step 13: Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

http://www.instructables.com/id/Pocket-Mini-Computer-Users-Guide/
Intro: Pocket Mini Computer User's Guide
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.

You can think of this as the "Users Guide " to the Pocket Mini Computer.

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.)

A lot has happened in a month and a half!

The project has moved from being sold by Gadget Gangster to being supported and sold directly by the author/creator of the project (me) at Propellerpowered.com. Kits
for this project can be had from Propellerpowered , and a full support forum has been added. Several new features have been added since the creation of the "Build
Instructable", and several more features are still in the works.

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 kit will
do it!)

If you are building the Pocket Mini Computer or "Rolling your own" from the schematics, read on!

Step 1: Pocket Mini Computer Features


While the Pocket Mini Computer behaves like a classic 1980's microcomputer when running BASIC, in reality it is an extremely powerful computing device, based on the
Parallax Propeller, capable being programmed in Assembly, C, and Spin when connected to a computer.

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
http://www.instructables.com/id/Pocket-Mini-Computer-Users-Guide/
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)

Step 2:
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] .

http://www.instructables.com/id/Pocket-Mini-Computer-Users-Guide/
Step 3: Making sure you have the latest firmware
One of the first things you should do before going further into this guide is to make sure that you have the latest version of the BASIC firmware installed on your Pocket
Mini Computer. Regular updates and features are added to BASIC giving it more ability.

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.

1. Download the BASIC-X_Xx-archive.XXXXXXXXX.zip and extract it to a folder.


2. Connect the USB cable from the power supply to the computer.
3. Use Propeller Tool to send "BASIC.spin" to your Pocket Mini Computer using F11.
4. 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.

http://www.instructables.com/id/Pocket-Mini-Computer-Users-Guide/
Step 5: Mass storage (Big things that come in small packages)
In the 80's computers which sported versions of BASIC like the one you've been playing with used 5.2/5 floppy disks that really didn't hold much information. The Pocket
Mini Computer supports the use of a microSD card which has the capacity to hold the equivalent of hundreds of the old floppy disks' worth of information on a single card.
The microSD card is literally smaller than a postage stamp! (How technology has changed.)

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 Adapter Module (pictured) to your Pocket Mini Computer.

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.

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 .

http://www.instructables.com/id/Pocket-Mini-Computer-Users-Guide/
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"

http://www.instructables.com/id/Pocket-Mini-Computer-Users-Guide/
* * * * 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

Syntax:
POKE <address>, <value>

http://www.instructables.com/id/Pocket-Mini-Computer-Users-Guide/
Description:
The POKE command affects a byte of SRAM at the specified address. The address value may be 0 to 32767.

PEEK

Syntax:
PEEK <address>

Description:
The PEEK function returns a value from SRAM from the specified address. Address values may be locations from 0 to 32766.

CLEAR

Description:
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
20 OUTA[12]=0
30 PAUSE 100
40 OUTA[12]=1
50 PAUSE 100
60 NEXT X
http://www.instructables.com/id/Pocket-Mini-Computer-Users-Guide/
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.

Step 11: The IR (infrared) port.


There is another optional port on the Pocket Mini Computer. The IR "Infrared" port. This is an advanced feature right now.

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

http://www.instructables.com/id/Pocket-Mini-Computer-Users-Guide/
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:


http://propellerpowered.com/shop/?page_id=234

Pocket Mini Computer Assembly Instructions:


PMC Assembly Instructions

Forum support and discussion for the Pocket Mini Computer:


http://propellerpowered.com/forum/index.php?board=5.0

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:
http://www.propellerpowered.com/library

Information on ongoing updates and improvements to COLOR BASIC:


http://propellerpowered.com/forum/index.php?topic=15.0

BASIC code examples:


http://propellerpowered.com/forum/index.php?topic=18.0

http://www.instructables.com/id/Pocket-Mini-Computer-Users-Guide/
Step 13: Schematics
Remember when the schematics were ALWAYS at the back of the book when you bought something?

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
P10, P11 Stereo audio connections
P24, P25 Wii Classic Controller connection
P26, P26 PS/2 Keyboard Connection
P16-P23 VGA connection

Here's the 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!

Jeff

http://www.instructables.com/id/Pocket-Mini-Computer-Users-Guide/
Related Instructables

Building your Build your own


Calling Bulletin own retro style Pocket SID
Board Systems microcomputer. Audio Player by DB9 serial break Making Music
by jeffledger
Build your own (BBS) by Propellerpowered out cable. by with an Atari
pocket mini Propellerpowered Computothought Punk Console
computer by by
Gadget Gangster JamecoElectronics

http://www.instructables.com/id/Pocket-Mini-Computer-Users-Guide/

You might also like