pcDuino

Doc Title

NumberVersion

PcDuino User Guide

WMPCD121219
0.2

pcDuinoUser Guide

pcDuinoDocument No WMPCD121219

Page 1 of 24

pcDuino

Doc Title

NumberVersion

PcDuino User Guide

WMPCD121219
0.2

HISTORY
VersionDate

Description

Author

0.1

12/07/2012

Initial specification draft

Lifeng Zhao

0.2

1/28/2013

Add I/O interface description

Lifeng Zhao

Document No WMPCD121219

Page 2 of 24

pcDuino

Doc Title

PcDuino User Guide

NumberVersionWMPCD121219
0.2

INDEX
1.
2.
3.
4.
5.
6.

7.

Overview ..................................................................................................................................................... 4
Required hardware for all samples in this user guide................................................................................ 7pcDuino board I/O interface description.................................................................................................... 9PcDuino firmware and software update procedure................................................................................. 10Use PcDuino as an mini PC platform......................................................................................................... 12Use PcDuino as an high performance Hardware platform....................................................................... 135.1
Guide of individual Hardware samples .................................................................................................. 13
5.1.1
UART .......................................................................................................................................... 135.1.2
ADC ............................................................................................................................................ 15
5.1.3
PWM Sample ............................................................................................................................. 17
5.1.4
GPIO Sample .............................................................................................................................. 19
5.1.5
I2C Sample ................................................................................................................................. 21
5.1.6
SPI Sample.................................................................................................................................. 23
Exception list .............................................................................................................

Document No WMPCD121219

错误！未定义书签。

Page 3 of 24

pcDuino

Doc Title

NumberVersion

PcDuino User Guide

WMPCD121219
0.2

1. Overview
PcDuino is a high performance, cost effective mini PC platform that runs PC like OS such as Ubuntu Linux. It
outputs its screen to HDMI enabled TV or monitor via the built in HDMI interface. It is specially targeted forthe fast growing demands from the open source community, that is, a platform could run full blown PC likeOS with easy to use tool chain and compatible with the popular Arduino ecosystem such as Arduino Shields
and open source projects etc.

The hardware specification for pcDuino is as follows:Items

Details

CPUAllWinner A10 SoC, 1GHz ARM Cortex A8GPU

OpenGL ES2.0, OpenVG 1.1 Mali 400 coreDRAM

1GB DDR3

Onboard Storage

2GB Flash, macro SD card slot for up to 32GB

Video Output

HDMI 720p or 1080p 60Hz

OSLinux3.0 + Ubuntu12.10

Extension Interface

Arduino Headers

Network interface

USB WiFi extension (not included)

Power5V 2A

The following are top and bottom views for pcDuino.

Document No WMPCD121219

Page 4 of 24

pcDuino

Doc Title

PcDuino User Guide

NumberVersion

WMPCD121219
0.2

PcDuino targets for two markets primarily, i.e., the Raspberry Pi mini PC market and Arduino market as
open-source electronics prototyping platform. With pcDuino, user could do lots of fun stuff including but notlimited to the follows:Learn or teach to program

Interface with hardware

Use Internet browser or Office from Ubuntu

Learn Ubuntu linux

Play movie

Play gameDIY projects

Compared with Raspberry Pi, pcDuino has several competitive advantages in terms of CPU/GPU performance,
Document No WMPCD121219

Page 5 of 24

pcDuino

Doc Title

WMPCD121219
0.2

NumberVersion

PcDuino User Guide

hardware interface, compatibility (due to SD card) and HTML5 and flash support.

Items

Raspberry Pi

CPUGPU

PcDuinoAdvantages

750MHz ARM11 Single

1GHz ARM Cortex A8

Faster and advanced CPU

Core (ARM v6)(ARM v7)

core

OpenGL ES2.0, OpenVG

OpenGL ES2.0, OpenVG

Faster GPU core

1.1, Broadcom

1.1, Mali 400 core

Videocore
OnboardNone

2GB Flash

Flash

Always boot, no boot issue
due to SD cardcompatibility

Extension

No

Hardware HeadersInterface

Need purchase expensive
Raspberry

HardwarebridgeHTML5andNo

Flash support

Document No WMPCD121219

Yes

ImportantforInternet

browser and programming

Page 6 of 24

pcDuino

Doc Title

PcDuino User Guide

NumberVersion

WMPCD121219
0.2

2. Required hardware for all samples in this user guide
PcDuino board

micro-USB port power adaptor ( 5V, 2000mA)

Display with HDMI port

HDMI cable

USB keyboard (must)
USB Hub and USB mouse ( optional but strongly recommended )Document No WMPCD121219

Page 7 of 24

pcDuino

Doc Title

PcDuino User Guide

NumberVersionWMPCD121219
0.2

Some Dupont Lines to connect pcDuino with test devices

Note:
Before run the following samples, Connect pcDuino with the devices correctly:
Straberry USB host port => USB hub => keyboard & mouse
Straberry HDMI port => HDMI cable => HDMI display

Document No WMPCD121219

Page 8 of 24

pcDuino

Doc Title

PcDuino User Guide

NumberVersionWMPCD121219
0.2

3. pcDuino board I/O interface description
Here is the list of I/O interfaces on pcDuino board.
1. 14 digital pins for GPIO
2. One UART RX, one UART TX
3. Two PWM pins
4. Six ADC pins
5. Four SPI pins
6. Two I2C pins
It supports to connect any Arduino shield with pcDuino via any of the above I/O interfaces. It allows to use
pcDuino with the same code used in Arduino.

Document No WMPCD121219

Page 9 of 24

pcDuino

Doc Title

PcDuino User Guide

NumberVersionWMPCD121219
0.2

4. PcDuino firmware and software update procedure
PcDuino could boot from NAND or mini-SD card. There is the factory prebuilt code in the NAND flash. To update
the factory prebuilt code, please follow the following procedures carefully.

Steps to burn the whole system to NAND flash
A PC tool called “Livesuit” is provided to burn the firmware from PC to the on board flash. Livesuite requires a USB
to min-USB cable that connects the PC to the USB OTG port on board.
Note:
To run livesuite for the first time, you need to install USB driver under livesuite directory.
To do this, After power on press “sw1(reset)” and “sw2” key to enter the force-update process.
For more detailed usage of livesuite, please check Livesuite manual which is under livesuite software directory.
Steps:
1. Copy Ubuntu(Ubuntu.ext4, env_nandd.fex, update.sh) to the root directory of your usb disk , and plugin theUSB disk to pcDuino .
2. Open the LiveSuit software, and select the firmware .
3. Connect pcDuino board to PC with USB OTG cable .
4. During upgrade, you will be asked to install the USB Driver twice if it not installed yet. The driver file is“usbdrv.inf” in the folder “usbDriver”, which is located at the installation path of “LiveSuit” .
5. The whole system will updated from usb disk automatically, it takes about 10 minutes.

Steps to update software from usb disk
Most of the time, users do not need to update whole system, only some components need to update for bugfix or
new features support.
1. Copy update package to usb disk (for example: update_fm.sh, update.tgz )2. Power on pcDuino board
3. Plugin the usb disk to pcDuino usb host port
4. Open a terminal after login to Ubuntu
5. Run commands to update the package$ cd /media/*/$ bash ./update_fm.shNote:
If the udisk has more than one partition, enter the whole path which the partition including update package
is mounted, for example “cd /media/Volumn”. If you don’t know which partition to choose, open “File Manager”
to check it.
The name of update script (update_fm.sh) and update package(update.tgz) may be different for different
release version.

Document No WMPCD121219

Page 10 of 24

pcDuino

Doc Title

PcDuino User Guide

NumberVersionWMPCD121219
0.2

Steps to burn the firmware to mini-SD card
Another tool called “PhoenixCard” is provided to do this job. This tool makes the process to burn the firmware toSD card very easy. Please see the document under the software directory for more details.

Document No WMPCD121219

Page 11 of 24

pcDuino

Doc Title

NumberVersion

PcDuino User Guide

WMPCD121219
0.2

5. Use PcDuino as an mini PC platform
PcDuino supports customized Ubuntu linux 12.10 that is specially optimized for running on ARM cortex platform
with limited DRAM and NAND flash support. The device could be operated with the USB mouse and keyboard.
The supported application list consists of the follows:Items

DetailsTerminal

Use build in “LXTerminal” application from desktop
Launch terminal application, run standard linux commands or vi editor etc.

Launch C/C++ compile (use gcc), assembly and execution
Use build in File Manager from desktop
Used for typical file management

Internet browser

Use chromium web browser from desktop
Support HTML5Office viewer and editor



Use Document Viewer from desktop for PDF file view
Use Gnumeric from desktop for Excel file view and edit

Use AbiWord from desktop for Word file view and edit
Use MPlayer from desktop

Could playback audio, video and image

File browser

Movie player

PcDuino has no build in WiFi and you could get one WiFi dongle which is included in pcDuino toolkit.

Document No WMPCD121219

Page 12 of 24

pcDuino

Doc Title

PcDuino User GuideNumberVersionWMPCD121219
0.2

6. Use PcDuino as an high performance Hardware platform5.1

Guide of individual Hardware samples

5.1.1

UART

Hardware required:
USB to serial Cable (e.g. PL2303).

Test steps:
Document No WMPCD121219

Page 13 of 24

pcDuino

Doc Title

PcDuino User GuideNumberVersion

WMPCD121219
0.2a) Plugin USB-to-serial cable to PC USB port and install USB driver if needed.

b) Set uart tool on PC ( baud rate 115200)
for example: sercureCRTc) Connect USB-to-serial cable to pcDuino before power on
USB-to-serial
PcDuinoGND ---------- GND
RX ---------- PIN1(TX)d) Open a Terminal after login to Ubuntue) Run uart test sample with the following commands in the terminal window$ cd /home/pcDuino/sample/test$ ./uart_test “pcDuino uart test”
Note: do not input the symbol “$”, you can replace the message “PcDuino uart test “ by your own.
f) PC uart tool will receive messages sent by the test programg) Press “Ctrl” and “C” on keyboard to stop the test process

Document No WMPCD121219

Page 14 of 24

pcDuino

Doc Title

PcDuino User Guide

5.1.2

ADC

NumberVersionWMPCD121219
0.2

ADC0 and ADC1 are 6 bits resolution.

Hardware required:
1.5V BatteryTest Steps:a) Connect the battery to pcDuino before power onBatteryPcDuino
N ---------- GND
P ----------- ADC0 or ADC1b) Connect usb power adaptor to power onDocument No WMPCD121219

Page 15 of 24

pcDuino

Doc Title

PcDuino User Guide

NumberVersionWMPCD121219
0.2c) Open a Terminal after login to Ubuntud) Run adc test sample with the following commands in the terminal window$ cd /home/pcDuino/sample/test$ ./adc_test 0
Note: do not input the symbol “$”, if the device connects to ADC1, run “./adc_test 1” insteade) the test program will print out the raw adc value (about 40-50 depend on the battery voltage)

Document No WMPCD121219

Page 16 of 24

pcDuino

Doc Title

PcDuino User Guide

5.1.3

PWM Sample

NumberVersion

WMPCD121219
0.2

PWM
There are two PWM interfaces, PWM1 and PWM2 are hardware PWM and can support up to 24MHz frequency.

Hardware required:
A buzzer

Test Steps:
1. Connect the buzzer to pcDuino before power on
BuzzerPcDuinoDocument No WMPCD121219

Page 17 of 24

pcDuino

Doc Title

2.
3.
4.

5.

PcDuino User Guide

NumberVersion

WMPCD121219
0.2

GND(N) ---------- GND
VCC(P) ---------- PWM1 (any pin of PWM1-PWM2)
Connect usb power adaptor to power onOpen a Terminal after login to Ubuntu
Run pwm sample with the following commands in the terminal window$ cd /home/pcDuino/sample/test$ . /pwm_test 1
Note:
do not input the symbol “$”, if the buzzer connects to another pin, replace the PWM_ID with the one
buzzer connected(example: if the buzzer connects to PWM2, then run “./pwm_test 2” instead).
the test program will make the buzzer generating audio signal, and you can hear the sound.

Document No WMPCD121219

Page 18 of 24

pcDuino

Doc Title

PcDuino User Guide

5.1.4

GPIO Sample

NumberVersion

WMPCD121219
0.2

There are 14 GPIOs. Sometimes, some GPIO will be mux as other PIN, such as SPI

Hardware required:
An LED Module

A Button Module

Document No WMPCD121219Page 19 of 24

pcDuino

Doc Title

PcDuino User Guide

NumberVersion

WMPCD121219
0.2

Test Steps:
1. Connect the LED to pcDuino before power on
ButtonPcDuino
GND/- ---------- GND
S---------- GPIO1 (any pin of GPIO0-13)
LED
PcDuino
GND/- ---------- GND
S---------- GPIO0 (any pin of GPIO0-13)
2. Connect usb power adaptor to power on
3. Open a Terminal after login to Ubuntu
4. Run gpio sample with the following commands in the terminal window$ cd /home/pcDuino/sample/test$ . /io_test 1 0
Note:
Test program Usage:$./io_test BUTTON_PIN_NUM LED_PIN_NUM
do not input the symbol “$”, if the Button/LED connects to another pin, replace the
BUTTON_PIN_NUM/LED_PIN_NUM with the one which the button/LED connected(example: if theButton connects to GPIO5, LED connects to GPIO10, then run “./io_test 5 10” instead).
5. Press/Release the button to turn on/off the LED.

Document No WMPCD121219

Page 20 of 24

pcDuino

Doc Title

PcDuino User Guide

5.1.5

I2C SampleNumberVersionWMPCD121219
0.2

I2C (Two wire)

Hardware required:
ADXL-345 Triple-Axis Analog Accelerometer

Document No WMPCD121219

Page 21 of 24

pcDuino

Doc Title

PcDuino User Guide

NumberVersion

WMPCD121219
0.2

Test steps:a) Connect the ADXL-345 device to pcDuino before power on
ADXL-345
PcDuinoGND ---------- GND
VCC ---------- 3.3V
SDA ----------- SDA
SCL ----------- SCLb) Connect usb power adaptor to power onc) Open a Terminal after login to Ubuntud) Run adxl345 test sample with the following commands in the terminal window$ cd /home/pcDuino/sample/test$ ./adxl345_test
Note: do not input the symbol “$”e) the test program will print out the x, y, z value of adxl345, change the direction of the test device andthe output value will change too
x=0, y=1, z=108
x=9, y=45, z=116
x=1, y=59, z=10x=0, y=0, z=0x=10, y=0, z=95
x=0, y=0, z=8x=0, y=0, z=7x=0, y=0, z=99
x=0, y=0, z=95

Document No WMPCD121219

Page 22 of 24

pcDuino

Doc Title

PcDuino User Guide

5.1.6

SPI Sample

NumberVersion

WMPCD121219
0.2

Hardware required:
An SPI flash test module ( for example: M25P16 )Document No WMPCD121219

Page 23 of 24

pcDuino

Doc Title

PcDuino User Guide

NumberVersionWMPCD121219
0.2

Test steps:a) Connect the spi flash to pcDuino before power on
SPI Flash
PcDuinoGND ---------- GND
V3.3 ---------- 3.3V
DO ---------- SPI0_MISO
DI ---------- SPI0_MOSICS ---------- SPI0_CS
CLK --------- SPI0_CLKb) Connect usb power adaptor to power onc) Open a Terminal after login to Ubuntud) Run spi test sample with the following commands in the terminal window$ cd /home/pcDuino/sample/test$ ./spi_test
Note: do not input the symbol “$”e) the test program will print out the flash chip id (for M25P16, chip id is 0xef2015):
spi flash ID=0xef2015
Note:
Some PADs of SPI bus are sharing with GPIO function, if you have done GPIO test but not RESET before
executing “./spi_test “ command, you may get invalid ID value.
1.

Document No WMPCD121219

Page 24 of 24