Sunday, July 5, 2009

Pico Projector with BeagleBoard


Pico Projector Development Kit


The Pico projector can display the video output from the Beagleboard. The Beagleboard needs to be configured in VGA display mode in order to interface to the Pico projector. A VGA-based Beagleboard SD card configuration is available for download. The SD card is configured with a video demo that starts when the Beagleboard completes booting up.


To get your Angstrom Distribution customized to PICO Development Kit, follow the steps mentioned in the following link:


Accessing GPIO

1. On and Off LED at the expansion pins of Beagle Board

10 easy steps for switching on and off the LED at expansion pins of BB.

It is assumed that you are having Angstrom distribution on your BB.

Make sure that you have mounted (soldered) the expansion connector on BB. You have a low powered LED. If you dont have low power LED, use multimeter instead. Connect the LED between pin 24 and 28 (GND). And now follow the steps below to on and off LED via expansion pin.

1. Open a Terminal (Applications >> Accessories >> terminal ).

2. Boot BB by writing command minicom.

3. Log-in as a root.

4. write command cd /sys/class/gpio

5. Enter command echo 168 > export (expansion port GPIO 168 = pin 24. You can also access User LED where 150 = usr1 LED and 149 = usr0 LED. For numbers refer http://http://elinux.org/upload/5/51/Bb-expansion.pdf ). That should create directory /sys/class/gpio/gpio150, with all the access you want.

6. Enter cd /sys/class/gpio/gpio150

7. Enter echo "high" > direction (Check the LED status. It should be on)

8. Enter echo "low" > direction (Check the LED status. It should be off)

Done! smile

If you want then to unmount the device, use unexport

9. Enter cd /sys/class/gpio/

10. Enter echo 150 > unexport

You can follow the above procedure to check the functioning of the other pins wink



2. Infinite loop - On and Off LED at the expansion pins of Beagle

So log in to your Beagle Board as root, and enter the following program into a file called strobe_gpio:

#!/bin/sh
#
# Blink the onboard LED

GPIO=$1

cleanup() { # Release the GPIO port
echo $GPIO > /sys/class/gpio/unexport
exit
}
# Open the GPIO port
#
echo $GPIO > /sys/class/gpio/export

trap cleanup SIGINT # call cleanup on Ctrl-C

# Blink forever
while [ "1" = "1" ]; do
echo "high" > /sys/class/gpio/gpio$GPIO/direction
sleep 1
echo "low" > /sys/class/gpio/gpio$GPIO/direction
sleep 1
done

cleanup # call the cleanup routine
The vi editor is included with the Beagle Board, so you can type " vi strobe_gpio", type "i" (to get into insert mode), then paste the program in. Next, press Escape (to get back into command mode), and type to save the file and ":w"":q" to exit from VI. This should drop you back into the Linux shell. (There are many vi tutorials External link mark in the universe if this is proving to be troublesome.)

Next, type " chmod 755 strobe_gpio". Then, insert an LED as shown (short end into pin 28, long end into pin 24) . Try the command"./strobe_gpio 168" and you should see the LED blinking.

Try this out also: type " chmod 755 strobe_gpio". Try the command "./strobe_gpio 149" or "./strobe_gpio 150" and you should see the user LED blinking wink

3. Reading Beagleboard User button or any GPIO


Here’s a shell script to read a GPIO and generate a square wave on the console (let's call the file read_gpio):

Start with " vi read_gpio", type "i" and paste the program below

#!/bin/sh
#
# Read a GPIO input

GPIO=$1

cleanup() { # Release the GPIO port
echo $GPIO > /sys/class/gpio/unexport
echo ""
echo ""
exit
}

# Open the GPIO port
#
echo "$GPIO" > /sys/class/gpio/export
echo "in" > /sys/class/gpio/gpio${GPIO}/direction

trap cleanup SIGINT # call cleanup on Ctrl-C

THIS_VALUE=`cat /sys/class/gpio/gpio${GPIO}/value`
LAST_VALUE=$THIS_VALUE
NEWLINE=0

# Read forever

while [ "1" = "1" ]; do
# next three lines detect state transition
if [ "$THIS_VALUE" != "$LAST_VALUE" ]; then
EV="|"
else
EV=""
fi

# "^" for high, '_' for low
if [ "1" = "$THIS_VALUE" ]; then
EV="${EV}^"
else
EV="${EV}_"
fi
echo -n $EV

# sleep for a while
sleep 0.05

# wrap line every 72 samples
LAST_VALUE=$THIS_VALUE
THIS_VALUE=`cat /sys/class/gpio/gpio${GPIO}/value`
NEWLINE=`expr $NEWLINE + 1`
if [ "$NEWLINE" = "72" ]; then
echo ""
NEWLINE=0
fi

done

cleanup # call the cleanup routine

Now, type ":w" to save the file and ":q" to exit from VI.

type " chmod 755 read_gpio". Try the command "./read_gpio 7"

now press the user button which will lead the output to the one similar as below.

*****************************************
root@beagleboard:~# ./read_gpio 7
_________________________________|^^^^|_____|^^^|_____________|^^^|___|^^^|_____
____|^^|________|^^|____|^|________|^^^|_______|^^|____________|^^^|______|^^|______.

root@beagleboard:~#
*****************************************

OS on Beagleboard

BeagleBoard gives you several choices for Operating System:



1. Ångström Distribution (Most widely used and recommended)

Here, we will discuss about the Ångström Distribution on BeagleBoard since you can find very big development community.

Beagleboard is very small but powerful, with the nice integrated Anstrom distribution, you can turn this little board to a desktop like environment! the beginner guide "HowToGetAngStromRunning" and successfully make it works within 30 minutes! The good things are that all the drivers are pre-built, so whatever you plug a USB-tp-ethernet, or a USB mouse or keyboard, all works like a charm.




2. Android for BeagleBoard (Google Mobile System)





















Peripherals for BeagleBoard



(left) Rev C BeagleBoard (right)

Important: The information provided here is based on "System Reference Manual" downloadable at www.beagleboard.org

Components & Connections

Right side

5V Power Supply :

The supply must have a 2.1mm center hot connector with a 5.5mm outside diameter. A picture in right of the type of power supply will be used on the BeagleBoard.




WARNING: DO NOT PLUG IN ANYTHING BUT 5V TO THE DC CONNECTOR OR THE BOARD WILL BE DAMAGED!!!!


USB OTG (On-The-Go) :

The main USB port on the BeagleBoard is a USB OTG (On-the-Go) port. It can be used as an OTG port or Client port. The main use is as a client port, as that is the mode that will supply the power needed to power the BeagleBoard.





NOTE: In order to use the OTG in the Host mode, the BeagleBoard must be powered from the DC supply.


RS232 :


In order to access the serial port of the BeagleBoard a flat cable is required to connect to a PC. The adapter will not plug directly into the PC and will require an external Female to Female twisted cable (Null Modem) in order to connect it to the PC. The ribbon cable is not supplied with the BeagleBoard but can be obtained from numerous sources.




Back Edge

S-Video :

An S-Video cable can be connected to the BeagleBoard and from there is can be connected to a TV or monitor that supports an S-Video input.




DVI-D :

In order to connect the DVI-D output to a monitor, a HDMI to DVI-D cable is required.




Audio-In and -Out :

External Audio input devices, such as a powered microphone or the audio output of a PC or MP3 player, can be connected to the via a 3.5mm jack (Audio IN).


An external Audio output device, such as external stereo powered speakers, can be connected to the BeagleBoard via a 3.5mm jack (Audio OUT).


Front Edge


SD/MMC :

The SD/MMC connector can be used for Memory or SDIO type cards.




HS USB 2.0 Host Port (Rev C2 Only)
:

The Rev C2 Beagle is equipped with a USB Host only connector and can be used to support USB based devices. In order to connect multiple devices a Hub is required. The hub can be powered or un-powered if the total current on the devices connected to the hub do not exceed the available power from the DC source. If the board is powered from the OTG connector, then the power available from this port is extremely limited and will not be able to provide sufficient power to run most USB devices. It may be possible to run a USB keyboard or mouse, but that is about all it will have the power to supply. The USB Host port is HS only and does not support LS or FS devices without a hub.




Left Side

Expansion Header & LCD Expansion Headers (Rev C only) :

The expansion header is provided to allow a limited number of functions to be added to the board via the addition of a daughtercard.


There are two headers provided to allow access to the LCD signals on the Beagle. These headers are 2x10 headers with a spacing of .05 (1.27mm) pitch. How these connectors are used is determined by the design of the adapter board.


JTEG :

A JTAG emulator can be used for advanced debugging by connecting it to the JTAG header on the BeagleBoard. Only the 14pin version of the JTAG is supported and if a 20 pin version is needed, you will to contact your emulator supplier for the appropriate adapter.


DO NOT expose the JTAG header to 3.3V. It supports 1.8V only.


Indicator LEDs

There are four green indicators on the BeagleBoard. One of them, POWER, indicates that the main supply is active. The other three can be controlled by the software.



Buttons

There are two buttons on the BeagleBoard; the RESET button when pressed will force a full board reset and the USER button which can be used by the SW for user interaction. If the user holds the USER button down while pressing and releasing the RESET button, the BeagleBoard will enter the ROM boot loader mode.



BeagleBoard out of box


What's in the box?


Box should have a 3"x3" OMAP3530 Board.


Is their any factory default software flashed onto this board?


Yes, x-loader and u-boot will be flashed on to this board.


How can I execute factory defaults from Beagle Board?


Each BeagleBoard comes pre-loaded with the XLoader and UBoot in Flash. When powered up, it will do the following:


1. Plug in either a USB cable to the board and then to a PC or plug in a 5V power supply.

2. Power LED (D5) will turn on.

3. On the terminal window the following will be printed:


Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24)

Loading u-boot.bin from nand

U-Boot 2009.01-dirty (Feb 19 2009 - 12:22:31)

I2C: ready

OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz

OMAP3 Beagle board + LPDDR/NAND

DRAM: 256 MB

NAND: 256 MiB

*** Warning - bad CRC or NAND, using default environment

MUSB: using high speed

In: serial usbtty

Out: serial usbtty

Err: serial usbtty


The warning message is not an indication of an error condition and is normal. The UBoot is configured to look for a script file on the SD card for booting instructions. If not found, it will then look for the environment variables. As these are not loaded at the factory, you will see the warning message.


4. At this point the following LEDS will turn on:

o USR0

o USR1

o PMU


5. Then the following will be sent to the terminal window and a countdown will commence. To stop the countdown, hit any key on the terminal Board revision C

Serial #486000030000000004013f8a17019010

Hit any key to stop autoboot: 10


The revision of the board should be identified as a Rev C. The Serial# is NOT the board serial number, but a unique ID for the processor.


Validating BeagleBoard with test and Diagnostics:


Visit http://code.google.com/p/beagleboard/wiki/BeagleBoardDiagnostics



What to do next?


Can try to compile Linux Kernel Image directly from O[http://www.muru.com/linux/omap OMAP GIT]


Can try some [http://code.google.com/p/beagleboard/wiki/BeagleSourceCode sample images and sources]


Learn [http://code.google.com/p/beagleboard/wiki/BeagleSoftCompile how to compile sources] and generate images for Beagle


Try some quick [http://code.google.com/p/beagleboard/wiki/Demos Demos]



Source of these contents is here (http://beagleboard.googlecode.com/svn-history/r166/wiki/outofthebox.wiki)

What is a BeagleBoard ?



The BeagleBoard is an OMAP3530 platform designed specifically to address the Open Source Community. It has been equipped with a minimum set of features to allow the user to experience the power of the OMAP3530 and is not intended as a full development platform as many of the features and interfaces supplied by the OMAP3530 are not accessible from BeagleBoard. By utilizing standard interfaces, the BeagleBoard is highly extensible to add many features and interfaces.


This site is for those who just bought BeagleBoard and don't know how and where to start. :-)


What exactly a BeagleBoard is ?

The Beagle Board is a low-power, low-cost Single-board computer produced by Texas Instruments in association with Digi-Key, designed with open source development in mind, to demonstrate the Texas Instrument's OMAP3530 system-on-a-chip. The board was developed by a small team of TI engineers. (for more than a brief introduction, go here )

Literally BeagleBoard stands for

Besides this fellow

B ring your own peripherals
E
ntry-level cost ($149)
A rm Cortex-A8 (600MHz, superscaler)
G raphics and DSP / Video accelerated
L inux and open source community
E nvironment for software innovators

Where can BeagleBoard be used?



Important:

I am not responsible for any false information or any problems occurring due to use of this site. This is an effort to help the students who would like to have a hand on Beagleboard and its development. Information provided here is completely based on either my experience or compilation of information from other websites. If anyone would like to take part in improving the quality of this site, please contact me at kunal.mm@gmail.com