AWC GP3 User manual

GP3 PC Analog/Digital I/O Kit
© 2010-2015 by AWC, All Rights Reserved
AWC
http://www.awce.c m
v1.6 15 April 2015
For the latest documentation see http://www.awce.com/doclib.htm#gp3


Table of Contents
Overview..................................................................................................................................................................1
D cumentati n.........................................................................................................................................................1
If Y u Need Help.....................................................................................................................................................1
Details......................................................................................................................................................................1
Hardware..................................................................................................................................................................2
GP3X...................................................................................................................................................................2
GP3X Parts List..............................................................................................................................................2
C nstructi n N tes.........................................................................................................................................6
Raspberry PI-C mpatible N tes.....................................................................................................................7
Arduin -C mpatible N tes............................................................................................................................7
GPMPU28...........................................................................................................................................................8
GPMPU28 Parts List......................................................................................................................................8
GPMPU28 External C nnecti ns...................................................................................................................8
GPMPU40.........................................................................................................................................................10
GPMPU40 Parts List....................................................................................................................................10
GPMPU40 C nnecti ns...............................................................................................................................11
GPMPU40 Edge C nnect r.........................................................................................................................12
Final Check ut..................................................................................................................................................13
S ftware.................................................................................................................................................................13
Reference...............................................................................................................................................................16
Quick Reference.....................................................................................................................................................20
Additi nal Pr t type Space (“Wings”)..................................................................................................................21
Specificati ns.........................................................................................................................................................22
Schematic (GP3X).................................................................................................................................................23
Schematic (GPMPU28).........................................................................................................................................24

Overview
The GP3 is the easiest way t interface a PC t the real w rld. Y u can als devel p using y ur PC and then let
the GP3 sense and c ntr l the real w rld n its wn. This kit pr vides a hardware interface that all ws y u t
easily m nit r and c ntr l anal g and digital circuitry. Features include:
•8 general purp se I/O lines (digital input/ utput with special features like PWM and pulse utput)
•5 10-bit A/D inputs
•1 hardware PWM utput ( perates c ntinu usly)
•1 hardware c unter input ( perates c ntinu usly)
•1 LED under s ftware c ntr l
•True RS232 fr m nb ard 5V supply
•EEPROM f r st ring c nfigurati n r serial numbers
•Efficient c ntr l via serial pr t c l (57600 baud) r use supplied libraries f r C, C++, Visual Basic, Java,
Linux, etc.
Documentation
To ensure you have the latest documentation, please check online (http://www.awce.com/doclib.htm#gp3
for the latest versions and updates.
If You Need Help
If y u require assistance, please feel free t c ntact us. The best way t get supp rt is via ur FAQ system
(http://www.awce.c m/faqs). Be sure t check ut ur Web page f r updates at www.al-williams.c m/awce.
Details
The GP-3 can be c nstructed n ne f several base b ards:
1. The GPMPU28 – This small f rm fact r b ard fits nearly anywhere. C nvenient t plug int a
s lderless breadb ard.
2. The GPMPU40 – Larger and m re cust mizable than the GPMPU28. Simple t plug int a s lderless
breadb ard r c nnect in a fixed installati n.
3. The GP3X – This b ard ffers the ultimate cust mizati n capabilities f r the GP3.
There are 6 secti ns n any GP3 system:
•CPU – The CPU chip c ntains the firmware and mem ry f r the system. N te that a jumper input selects
if the GP3 executes it nb ard s ftware r if it accepts c mmands fr m a PC. On the GPMPU28 this
jumper is n the edge c nnect r. On the GP3X and GPMPU40 there is a dedicated jumper.
•Cl ck – The CPU requires a 20MHz scillat r. On the GPMPU28 b ard a three pin 20MHz res nat r is
required. The ther b ards n rmally take the same res nat r, but can accept a crystal and ass ciated
capacit rs.
•C mmunicati ns – By default, all versi ns f GP3 use RS232 c nnecti ns and will w rk with m st
USB t serial adapters. In additi n, the GP3X b ard has pr visi ns f r a USB daughter b ard r cable. It
is als p ssible t fit the USB hardware in a GPMPU40 b ard.
•P wer – The GP3 requires a 5 v lt regulated supply. Y u can c nnect an external regulated supply r use
the nb ard p wer system n any f the base b ards. If using the USB daughter b ard/cable, the GP3X
can btain p wer fr m the USB p rt.
•Reset – The CPU requires a pull up resist r n the reset pin. In additi n, a jumper r switch can be used
t manually reset.
-1-

•Interface – The wh le p int t the GP3 is t interface t the utside w rld. Each b ard has a variety f
meth ds t c nnect it t the utside w rld.
The remainder f this manual will be divided int tw maj r parts: Hardware and S ftware. The Hardware
p rti n will discuss each b ard pti n in turn. Y u sh uld n t need t read the secti ns that d n t apply t the
b ard y u've selected. The S ftware p rti n deals with h w t c mmunicate and c ntr l the GP3 and applies t
all versi ns f the hardware.
Hardware
Please select the secti n bel w that applies t the base b ard supplied with y ur kit. If y ur kit was pr vided
assembled, y u may still wish t read the secti ns bel w t get a better understanding f the lay ut f the b ard.
GP3X
There are several variati ns f r the GP3X. If y u are using the Arduin r Raspberry versi n, many f the parts
n the b ard are n t p pulated as they are n t needed. Y u sh uld read and understand the GP3X build
instructi ns and then refer t the specific secti ns f r y ur particular variant t learn the details ab ut it.
GP3X Parts ist
Designator Description
C1-C4 1 uF capacit r (n t included with USB kit)
C5 0.1 uF capacit r
C6 330 uF capacit r (n t included with USB kit)
C7, C8 Opti nal. Capacit rs matched t X1 if needed.
D1A 5V LED
D1B 5V r regular LED (see pti ns)
IC1 GP3 CPU and 28 pin narr w s cket
IC2 MAX232 (n t included with USB kit)
IC3 7805 (n t included with USB kit)
IC4 USB cable r daughter b ard (UB232R); If daughterb ard used, includes tw 4 pin s cket strips and is
usually m unted n b tt m side f b ard. If n t used, IC4 can be used f r ther purp ses (see pti ns);
J1, J2 C nnect rs n .2” centers; usually installed n b tt m f b ard, but may be installed n t p if preferred
(see pti ns). Standard kit c mes with pin headers (which may be n .1” centers; rem ve extra pins
with pliers) r pti nal screw terminals which interl ck t make 12 p siti n c nnect rs.
J3 DB9 female (right angle, sh rt reach; n t included with USB kit)
JP1, JP2 N rmally n thing is c nnected here. Y u can cut traces between the centers and rewire the digital and
anal g I/O t y ur liking (see pti ns)
R1 10K resist r
R2 Dr pping resist r f r D1B, if required
X1 20Mhz ceramic res nat r (three terminal) r 20Mhz crystal ( uter pins nly) with matching C7 and C8
installed. F r Pi-c mpatible versi n, the res nat r is 10MHz.
Reset ( pti nal) 5mm tact switch (pins 1 and 3) r 2 pin header (pins 1 and 2)
Pg Run 3 pin header and jumper
+V C axial p wer jack ( pti nal; see text)
E pty By default ICSP, JP1, JP2, R2 D1B, C7, C8, IC4, IC4A, IC4B, TTLSER, DTEDCE, and +5V/GND
header (t the right f JP2) are empty. See cust mizati n f r m re inf rmati n n h w these parts f
the b ard may be used.
The GP3X b ard is highly flexible. Each f the GP3 secti ns has several pti ns f r cust mizati n. Y u sh uld
plan the pti ns that will meet y ur needs bef re starting c nstructi n.
•CPU – The CPU sh uld be s cketed, alth ugh this is n t strictly necessary. The 3 pin header marked
-2-

Pgm Run (near JP1) all ws y u t install a header t switch the b ard between the m de where it
accepts c mmands fr m the PC (Pgm) r executes its internal pr gram (Run). N rmally y u will install
a 3 pin header in this l cati n and a jumper will select between the tw pti ns. H wever, if y u are
certain y u nly want t perate the b ard in ne m de, y u can hard wire the jumper.
•Cl ck – By default, kits based n the GP3X b ard use a 20MHz ceramic res nat r that includes
capacit rs. H wever, the same s cket can accept a regular res nat r r a crystal in which case y u'll
need t install C7 and C8 with the capacit rs required. In additi n, an 8 pin DIP scillat r (20MHz)
c uld be installed at IC4 and its utput fed int pin 9 f IC1.
•C mmunicati ns – By default, the GP3 c mmunicates via a DCE RS232 p rt f rmed by J3, IC2, and
C1-C4. A DCE p rt mates via a straight cable t DTE p rts such as th se c mm nly f und n a PC.
H wever, there are several pti ns available.
First, y u can rewire the p rt s it selectable between DTE and DCE. Near J3 there is a 2x4 pin header
marked DTEDCE. The PC b ard has traces running acr ss the pins. Y u can carefully rem ve the traces
between each f the f ur pairs f pins using a h bby knife r raz r (the traces are n the t p side f the
b ard – the side with the silk screen markings). Then y u can install a 2x4 pin header int the h les. If
y u place 4 jumpers acr ss the pins (making the same c nnecti ns as the traces did) the p rt will be
DCE. H wever, if y u place the jumpers at right angles, the p rt will be DTE suitable f r c nnecti n t ,
f r example, a m dem. H wever, if wired as DTE, y u'll need a cr ss cable (s metimes called a null
m dem cable) t c nnect t a PC f r pr gramming. The figure bel w sh ws h w the DTEDCE jumpers
can be c nnected.
If y u are c nnecting the GP3 t a n n-RS232 device like a micr c ntr ller, y u can use the TTLSER
pins and rem ve IC2. The pins are:
1 – Handshaking in t GP3 (RTS)
2 – Handshaking ut t GP3 (CTS)
3 – Transmit fr m PIC (TX)
4 – Receive fr m PIC (RX)
-3-
DCE (default)
DTE
DCE (default)
DTE

Recent GP-X b ards use a special USB cable f r c mmunicati ns. The cable has six wires. Y u may
want t s lder the cable t the t p side f the b ard r the b tt m, depending n h w y u plan t m unt
the finished unit. The table bel w sh ws where each wire is c nnected by c l r:
Color Function GP3X connection
Black Gr und GND (any f the GND pins near the A4 pin n J1)
Red +5V +5V (any f the +5V pins near the A4 pin n J1); mit if using seperate p wer
supply
Yellow RTS TTLSER pin 1
Blue CTS TTLSER pin 2
White TX TTLSER pin 3
Green RX TTLSER pin 4
After testing the GP3-X, y u may want t use a small zip tie t strain relief the cable by passing the zip
tie thr ugh the tw large h les in the unused J3 f tprint, ensuring that the USB cable is encircled by the
zip tie. Pull the tie tight t l ck the cable d wn t the b ard.
Older GP3-X b ards used a daughterb ard f r USB c mmunicati ns. The IC4 s cket can accept this
USB daughter b ard (part number UB232R). N rmally this b ard is fitted under the b ard using the
s cket strips supplied with the daughter b ard. The pins are s ldered n the t p side f the b ard (the
side f the b ard with the silk screen markings). Because f the unusual pin spacing f the daughter
b ard, ne r w f pins g es int IC4's pins 1-4. The ther r w g es int the r w f h les marked IC4B
that are nearest t IC4. The USB p rt sh uld face the edge f the b ard that h lds J1.
N te that because the daughter b ard is installed under the b ard, the pin numbers are reversed. That is,
pin 1 f the m dule c rresp nds t IC4 pin 8 and the m dule's pin 8 will c nnect t IC4 pin 1. With the
USB p rt n the underside f the b ard, it is usually a g d idea t use spacers r b lts in the f ur
c rner m unting h les t f rm “feet” f r the b ard s it d es n t rest n the USB interface.
The c nnecti ns between the daughter b ard and the rest f the b ard appear in the table using the IC4
pin numbers and the m dule pin numbers f r reference. If y u wish t p wer the b ard fr m its wn
p wer supply r fr m an external 5V s urce, d n t c nnect pin 2 f the USB b ard. H wever, if y u
wish t perate the b ard fr m the USB p wer supply y u can c nnect pin 2 t ne f the h les near JP2
marked +5V and mit IC2 and C6. The jumper n the daughter b ard sh uld be c nnected between pins
1 and 2 s that the b ard perates n 5V instead f 3.3V.
IC4 pin # USB232 Pin # GP3X connection
81 Gr und
72 +5V (if USB p wer desired; n c nnecti n if using separate p wer supply)
63 TTLSER-2
54 TTLSER-1
27 TTLSER-3
18 TTLSER-4
N te that it is p ssible t s cket IC2 and the USB m dule s that the b ard can perate in either m de.
With the p wer rem ved, simply install either IC2 r the USB m dule as desired. T switch the b ard t
use the ther type f c mmunicati ns, rem ve the p wer. Then rem ve either IC2 r the USB m dule
and install the ther unit.
•P wer – There are several pti ns t p wer the GP3. The nly actual requirement is a regulated 5 v lt
(5V) supply. Feeding such a regulated v ltage int any f the pins n J1 r J2 marked 5V (and gr und
-4-

n any f the pins marked –) is sufficient t p wer the b ard (with all I/O quiescent, the b ard draws
r ughly 11 t 15 mA).
If y u prefer, y u can install the regulat r (IC3) and C6 and feed a higher v ltage (usually 8 t 12V) int
V+ n J2. Then the b ard will pr duce 5V f r itself and pr vide it at the 5V p ints n J1 and J2. There
are als h les where y u can tap ( r supply) 5V and gr und near JP2 marked +5V and GND.
If y u wish t use a c axial p wer jack, ne is included alth ugh its use is pti nal. The jack has three
pins, tw that line up and ne that is ffset. Using pliers, bend the ffset pinup against the b dy f the
jack. This pin is the same as the pin nearest the pen end f the c nnect r and it is cust mary t use this
pin f r gr und. The bent pin can be used as a gr und p int f r testing r it can be clipped.
The jack can be placed against the – and V+ pins f J2 al ng the t p side f the b ard. The pins will line
up with the h les and y u can tack s lder the pins (see Figure bel w). In this c nfigurati n, a standard
DC “wall wart” with the sleeve gr unded (the center pin sh uld have between 8 and 12 v lts) will p wer
the nb ard regulat r.
•Reset – The chip requires a 10K resist r at R1. In additi n, the RESET header near IC3 can
acc mm date a 2 pin header (between pins 1 and 2) s a jumper can reset the b ard. By default, the
GP3X kits, h wever, have a 5mm tact switch that can install in the h les (pins 1 and 3) t pr vide a true
reset switch.
•Interface – The primary external access t the b ard's functi ns is via J1 and J2. The markings n the
b ard explain what each pin d es. The 4 c rners (marked with –) are gr und p ints. There is an ther
gr und n J1 right after the anal g channels. The anal g channels are marked A0 t A4. The ther pins
n J1 are the hardware c unter (CT), the hardware PWM utput (PW), the LED utput (LED), and a
c nnecti n t the 5V supply rail (+5). J2 als has a 5V supply rail c nnecti n, an input t the v ltage
regulat r (+V), and the digital pins (D0 t D7).
You can install headers in these locations either on the top of the board or the bottom (the b tt m is
handy f r plugging int s lderless breadb ards). In additi n, y u can use standard “screw terminals”
which c me in interl cking bl cks f 2 r 3 terminals, r use any ther type f 12 pin c nnect r with
0.2” spacing. If y u rdered the screw terminals and install them on the bottom of the board
(s ldering them n the same side as the silk screen) they will f rm “feet” that will h ld the b ard up
which is handy and als leave the ther c mp nents n the b ard m re accessible. H wever, y u can
als install them n the t p f the b ard if y u prefer. In particular, if y u install the USB daughter b ard
(which m unts n the b tt m) y u may want t keep the pins n the t p. The ch ice between t p and
b tt m is purely ne f pers nal preference – the circuit d esn't care either way.
-5-

The anal g and digital pins r ute thr ugh JP1 and JP2. If y u wish, y u can cut the traces between the
secti ns f JP1 (digital) r JP2 (anal g) and rer ute the signals. F r example, y u might put a series
resist r between the h les t limit current. Or y u c uld r ute a wire fr m an anal g input t an p-amp
in the spare IC4 s cket and then back fr m the p-amp t the GP3's CPU. N te that n JP2, the 5th pin
(near J1's A3) is n t c nnected thr ugh and nly c nnects t an unused GP3 pin.
IC4 is available f r use with any circuitry y u might want t add unless y u are using it f r the USB
daughter b ard. An p amp, a temperature sens r, a s lid state relay, a DIP switch, r anything else y u
can arrange t fit in an 8 pin DIP fact r can be placed at IC4. The IC4A and IC4B h les c nnect t IC4
t pr vide places y u can c nnect y ur circuitry t the b ard. In additi n, there are c nvenient h les that
carry +5V and gr und nearby f r y ur use.
The LED utput is br ught ut t JP1 and als t D1A which n rmally takes a 5V LED. Y u can als fit
D1B as a n rmal LED with an appr priate dr pping resist r at R2. It is p ssible t use b th LEDs if the
utput current f the GP3 pin is n t exceeded (in which case b th LEDs will light r extinguish
t gether). An ther pti n is t install a 5V LED at D1B and mit R1. Then y u can use the R1 pad with
the circle ar und it as a c nnecti n p int. F r example, y u might wire fr m the circle pad f R1 t ne
f the JP1 digital c nnecti ns t get a sec nd LED utput. It is n t necessary t install either D1A r
D1B f r the GP3's perati n.
Once y u have decided n the pti ns y u wish t use, y u can assemble the b ard. In general it is best t start
with the “l w” c mp nents first. IC1's s cket and IC2, f r example are easiest t install first. Then y u can
install discrete c mp nents like the smaller capacit rs, resist rs, and LEDs. Large c mp nents like the
c nnect rs, C6, and IC3 sh uld be installed last.
Construction Notes
•If y ur kit is supplied with tw 24 pin .1 inch headers simply rem ve every ther pin with pliers s
that the headers fit in the J1 and J2 sl ts.
•C1-C4 have p larity markings but it is n t necessary t use electr lytic capacit rs. If y ur kit is
supplied with ceramic capacit rs f r C1-C4 y u can ign re the p larity markings n the b ard.
•C6, the LEDs, and the ICs are the nly devices that y u have t be careful t bserve the rientati n
marked n the b ard. C6 sh uld have its + r – lead clearly marked and the + side is marked n the
b ard. The l nger lead f LEDs will g in the h le marked with the plus sign.
•IC1 and IC2 sh uld be riented as sh wn n the silk screen. The silk screen f r IC3 sh ws a thick
bar near the edge which is the back f the package (the side with ut the part markings).
•Because IC4 is unc mmitted y u can install s mething in IC4 any way y u like (including n the
back side f the b ard) as l ng as y u d the rest f the wiring t IC4 t match.
•Alth ugh it is cust mary t put the b dy f the resist rs in the h le that has the white circle ar und
it, putting ne in backwards will n t affect circuit perati n.
•Alth ugh it is cust mary t put the ceramic res nat r r crystal s that the markings face away fr m
IC1, putting it backwards will n t affect circuit perati n.
•D n't f rget that JP1, JP2, IC4A, IC4B, and DTEDCE all have traces c nnecting pins “acr ss” fr m
each ther. If y u are making any m dificati ns that require these h les t be electrically separate
y u must use a h bby knife r raz r t carefully cut thr ugh the trace n the t p side f the b ard
that c nnects them. Y u sh uld check that y u have made the cut by using an hm meter bef re and
after the cut. Of c urse, be careful n t t cut ther parts f the b ard.
-6-

Y u sh uld check y ur w rk bef re installing IC1 in its s cket. P wer the b ard up using y ur ch ice f
meth ds (9V t the +V pin n J2, 5V regulated t any f the +5V pins, r USB p wer) and verify that 5V
appears n the +5V c nnect r near JP2.
Next, pr ceed t the Final Check ut secti n bel w.
Raspberry PI-Compatible Notes
Important Note: Although the GP3X board has pins labeled +5V, when using the Raspberry PI-
compatible version, these pins are at 3.3V. It will n t hurt the GP3 t p wer it at 5V, but it may damage the
h st c mputer.
In additi n, all time-related measurements f r the Raspberry PI-c mpatible versi n are at 1/2 res luti n
c mpared t the n rmal GP-3 (h wever, the baud rate is still 57600 baud). S a c mmand that specifies time
millisec nds n a n rmal GP-3 will use 2mS units n the Raspberry PI-c mpatible versi n.
The PI-c mpatible b ard c ntains the f ll wing c mp nents: C5, D1, IC1 (and s cket), R1, and X1. In additi n
there is a 3 pin header and a 2 pin header. Screw terminals are n rmally supplied.
The b ard is assembled as usual, ign ring any parts n t supplied. A wire jumper must be put in the PGM/RUN
jumper g ing fr m PGM t the center pin. Y u sh uld als install a wire jumper (insulated) between pin 1 f the
TTLSER c nnect r t any gr und p int (pin 5 f the DB-9 c nnect r, J3, is handy).
The 3 pin header is placed in the TTLSER pins (pin 2-4) and the tw pin header is place in any f the 4 h les
marked +5V and GND near the A4 pin n the edge f the b ard. Place the header s that ne pin is in the +5V
h le (which is actually 3.3V) and the ther is in the GND h le.
T c nnect t the Pi, c nnect 3.3V fr m the Pi (pin P1-1) t the +5V pin n the GP3X. Als c nnect the gr und
(pin P1-6). Y u can d this via the 2 pin header installed r the screw terminals, as y u prefer (if y u plan t
nly use the screw terminals, y u d n't need t install the tw pin header).
C nnect the PI's P1-8 pin t the GP3X TTLSER pin 3 and P1-10 t TTLSER pin 4. This enables serial
c mmunicati ns with the Pi.
The serial p rt n the Pi is used as the system c ns le. This has t be disabled in rder t free the p rt f r use
with the GP3. Edit /etc/inittab and find the line that c ntains /sbin/getty and ttyAMA0. Using a text edit r (and
y ur r t l gin) place a # sign at the start f this line and save the file. Y u will have t reb t the Pi t free the
serial p rt. If y u ever want t enable the c ns le, edit the file again and rem ve the # sign.
F r s ftware, see http://www.awce.c m/gp3pi.htm f r the latest s ftware and dem s.
Arduino-Compatible Notes
The Arduin -c mpatible versi n nly uses the f ll wing parts: C5, D1A, IC1 (and s cket), R1, and X1. In
additi n, there is a 3 pin header and a 2 pin header. Screw terminals are n rmally supplied.
The b ard is assembled as usual, ign ring any parts n t supplied. A wire jumper must be put in the PGM/RUN
jumper g ing fr m PGM t the center pin. Y u sh uld als install a wire jumper (insulated) between pin 1 f the
TTLSER c nnect r t any gr und p int (pin 5 f the DB-9 c nnect r, J3, is handy).
The 3 pin header is placed in the TTLSER pins (pin 2-4) and the tw pin header is place in any f the 4 h les
marked +5V and GND near the A4 pin n the edge f the b ard. Place the header s that ne pin is in the +5V
h le (which is actually 3.3V) and the ther is in the GND h le.
T c nnect t the Arduin , y u must c nnect p wer t the 2 pin header r the terminals marked +5 and –
(usually fr m the Arduin ; if y u use a separate 5V supply, be sure the Arduin and the GP3 share a c mm n
gr und). The serial p rt c nnects t pin 3 and 4 f the TTLSER c nnect r. Depending n y ur sketch, y u may
-7-

be able t use any digital pins f r the serial p rt (it depends n what serial library y u use). The example
pr grams use pins 8 and 12 n the Arduin . C nnect pin 8 t pin 3 f TTLSER and pin 12 t pin 4 n TTLSER.
F r s ftware, d wnl ad the Arduin -c mpatible library at http://www.awce.c m/gp3ard.htm. Unzip the files t
y ur Arduin /libraries direct ry. Once y u restart ( r start) the Arduin IDE, y u will be able t use the library
like any ther library. Example c de is installed and y u can access it via the Arduin Examples menu. In
additi n, nline d cumentati n is available at http://www.awce.c m/gp3ad c.
GPMPU28
GPMPU28 Parts ist
Designator Description
C1-C4 1 uF capacit r
C5 0.1 uF capacit r
C6 330 uF capacit r
D1 5V LED
IC1 GP3 CPU and 28 pin narr w s cket
IC2 MAX232
IC3 7805
JP1 11 pin header; n rmally installed s the plastic and l ng pins are n the b tt m f the b ard and
s ldered n the t p f the b ard.
J1 DB9 c nnect r (female, sh rt reach)
R1 10K resist r
X1 3 pin 20MHz res nat r
Reset ( pti nal) 2 pin header f r reset jumper
Vin/Gnd 9V battery snap
The b ard requires n m dificati ns t w rk with the GP3 H wever, y u may want t c nsider any special
p wer supply c nnecti ns r serial c nnecti ns y u'd like t make. In additi n, y u'll need t c nnect the
utside w rld t the GP3 as appr priate f r y ur situati n.
If y u are pr t typing, y u may want t install the header at JP1 and use it t c nnect t a s lderless
breadb ard. F r best results, install JP1 n the b tt m f the b ard s that the plastic and l ng part f the pins
are under the b ard. Then s lder the sh rt pins as the pr trude thr ugh the t p side f the b ard (the side with
silk screen markings). Y u can als s lder wires t the h les al ng the l ng edge f the b ard near IC1 t
c nnect t external circuitry r use any ther c nnecti n n 0.1” centers.
GPMPU28 External Connections
Pin Description
JP1-1 Gr und
JP1-2 Hardware PWM utput
JP1-3 Ground for normal operation; +5V to run compiled and downloaded script (GP3A1 and above only). Note
GP3 chips have a simple LED blinking test program preloaded, so connecting JP1-3 to +5V is a good way to
test your GP3.
JP1-4 External c unt input
JP1-5 Anal g input #4
JP1-7 Anal g input #3
JP1-8 Anal g input #2
-8-

Pin Description
JP1-9 Anal g input #1
JP1-10 Anal g input #0
JP1-11 +5V
RB0 Digital input/ utput #0
RC4 Digital input/ utput #1
RC5 Digital input/ utput #2
RB3 Digital input/ utput #3
RB4 Digital input/ utput #4
RB5 Digital input/ utput #5
ICSP-5 Digital input/ utput #6
ICSP-4 Digital input/ utput #7
B ard assembly is straight f rward. Install the sh rter c mp nents such as the IC1 s cket and IC2 first. Then
install the smaller c mp nents such as the reset jumper, X1, R1, etc. Finally, install the larger c mp nents such
as IC3 and J1. Y u can wire a s urce f 8-12V t the Vin and GND pins r use the supplied 9V battery
c nnect r. Since the 9V battery wires take stress, y u sh uld s lder b th sides f the wire and y u may wish t
pr vide strain relief such as a dr p f h t glue ver the wires.
The nly p larity-sensitive c mp nents n rmally placed n the b ard are the ICs, the LED, and the large
electr lytic capacit r. The capacit r is clearly marked as are the ICs (IC3's metal back side is cl sest t the edge
f the b ard). The flat side f the LED (D1) is the gr und side, s the l ng lead g es in the ther h le. Alth ugh
it is cust mary t put the b dy f the resist rs in the h le that has the white circle ar und it, putting ne in backwards will
n t affect circuit perati n. Als , it is cust mary t put the ceramic res nat r r crystal s that the markings face away
fr m IC1, but putting it backwards will n t affect circuit perati n.
N rmally, C1-C4 are n t p larized capacit rs. H wever, if y u use p larized capacit rs the negative side f C1, C3, and
C4 are all t the right as y u read the markings c rrectly. That is, if y u c nsider the DB9 c nnect r “up” and IC1 is n
the right, the negative leads f C1, C3, and C4 are t the right. C2's negative lead is t the b tt m using the same
rientati n (that is, facing the LED).
JP2 and JP3 mirr r the inner pins f JP1 (that is JP2-1 and JP3-1 are c nnected t JP1-2) and are c nnected t gether al ng
the t p side f the b ard. If y u wish t cust mize what signals appear n JP1 y u can use a h bby knife r raz r blade t
carefully cut the traces between JP2 and JP3. Then y u can use wire t c nnect JP3 t a different c nnecti n, r pick up
the signal that used t g t JP1 in the JP2 h le. F r example, if y u wanted JP1-2 t c nnect t digital I/O #7 y u c uld
cut the trace between JP2-1 and JP3-1 (which c rresp nd t JP1-2) and jumper JP3-1 t ICSP-4.
-9-
Pin 1
Pin 1
+
+
+
+

Y u sh uld check y ur w rk bef re installing IC1 in its s cket. P wer the b ard up using y ur ch ice f
meth ds (9V t the Vin c nnect r r 5V regulated t JP1-11) and verify that 5V appears either at JP1-11 r
an ther 5V test p int (e.g, the exp sed lead f R1 nearest IC3).
Next, pr ceed t the Final Check ut secti n bel w.
GPMPU40
GPMPU40 Parts ist
Designator Description
C1-C4 1 uF capacit r
C5 0.1 uF capacit r
C6 330 uF capacit r
C7, C8 Opti nal. Capacit rs matched t X1 if needed.
D1 5V LED
IC1 GP3 CPU and 28 pin narr w s cket; install s pin 1 matches pin 1
IC2 40 pin f tprint; used f r wiring c nnecti ns in this case
IC3 MAX232
IC4 7805
IC5 (not arked) An 8 pin s cket can be placed s pin 1 matches pin 17 f IC1. An MCP602 may be supplied (see text).
This s cket is n t wired t anything by default s y u can place anything y u wish here ( r n thing).
JP1, JP2 F rms ne 40 pin c nnect r with JP1-1 being pin 1 and JP2-1 being pin 21. These are n rmally
installed n the b tt m f the b ard s the b ard can plug int a s lderless breadb ard. H wever, it is
p ssible t install n the t p side f the b ard r use different c nnect rs n .1 inch centers.
J1 DB9 female (right angle; sh rt reach)
R1 10K resist r
R2 (not arked) Dr pping resist r f r D1, if required. LED supplied d es n t require R2.
X1 3 pin 20MHz res nat r (supplied) r 20MHz crystal with matching capacit rs at C7 and C8
Reset ( pti nal) 2 pin header f r reset jumper
Pg Run (not
arked)
3 pin header and jumper
Vin/J2 9V battery snap r pti nal c axial p wer jack
The GPMPU40 b ard is n t specifically designed f r the GP3 – it is simply a general purp se b ard and y u
can read m re ab ut it in the GPMPU40 manual (see http://www.awce.c m/d clib.htm#GPMPU40). The g al is
t essentially duplicate the GP3X r GPMPU28 schematics (at the end f this manual) n the b ard.
Building the GPMPU40 versi n f the GP3 requires y u t install parts and then wire the different areas f the
b ard t gether (see table bel w). Y u can als cust mize the b ard in several ways.
The 28-pin IC s cket g es in the IC1 f tprint with pin 1 aligned. If y u wish t use the pti nal 8 pin s cket,
place it in IC1 als with pin 1 f the s cket lined up with pin 17 f the f tprint.
Other required c mp nents f r the CPU are X1 and R1. N te that X1 is n rmally a 20MHz 3 pin res nat r. If
y u use a 2 pin res nat r r a crystal y u'll need matching capacit rs (C7 and C8) depending n the crystal y u
select. R1 is the reset resist r and y u sh uld als install a 2 pin header at the RESET h les unless y u prefer t
wire an external switch t this p rt (n t supplied).
If y u are using RS232 (the default f r this b ard) install J1, C1-C4, and IC3. It is p ssible t c nnect a
UB232R r ther USB t serial b ard int the spare area under IC1 (the pti nal 8 pin s cket).
The b ard can be p wered by a 5V regulated supply (c nnected t the Vcc h les r the 5V c nnect r n the
edge). Y u can als install IC4 and C6 t pr vide p wer n b ard. In this case y u need t supply 8-12V n the
-10-

Vin pin (f r example, by installing the included 9V battery c nnect r t Vin and the nearby GND terminal). Y u
can als install J2 f r a c axial p wer c nnect r (gr und n the sleeve, 8-12V n the center pin). Y u sh uld
always install C5, regardless.
Be sure t bserve all IC p larities as well as the p larity f r C6 (and C1-C4 if they are pr vided as p larized
capacit rs).
Usually, y u'll want t s lder tw 20 pin headers at J1 and J2. These f rm a 40 pin c nnect r (J1-1 is pin 1, J2-1
is pin 21). N rmally these are s ldered n t p f the b ard s the plastic part and the pins are n the b tt m.
H wever, if y u prefer y u can install them n the t p side r use ther c nnect rs with .1 inch centers.
T c mplete the GP3 n this b ard, y u can use the f ll wing c nnecti n guidelines, using wire t make the
c nnecti ns. Y u may make the c nnecti n n the t p r b tt m f the b ard ( r b th). The c nnecti n wire the
RS232 p rt, the cl ck, the reset circuit, the p wer supply, the LED, and the Pgm Run jumper t the CPU.
GPMPU40 Connections
Connect To Required/Optional
IC2-1 RST (either h le) Required
IC2-8 Gr und (any h le) Required
IC2-9 CLK (either h ld) Required
IC2-10 CLK (h le n t used by IC2-9) Required
JP1-14 LED (+; l ng lead) Opti nal
JP1-15 LED (sh rt lead) Opti nal
IC2-15, IC2-26 1K resist r Opti nal (used with n rmal LED)
IC2-15 Gr und (any h le) Opti nal (used with 5V LED)
JP4-26 Gr und (any h le) Opti nal (used with n rmal LED)
IC2-29 T Required
IC2-30 R Required
IC2-31 Gr und (any h le) Required
IC2-32 Vcc Required
IC2-34 r Required
IC2-35 t Required
JP7-1, JP7-2, JP7-3 3 pin header Required (Pgm Run jumper)
N te JP7 and JP8 are n t c nnected t anything else by
default, s there is n “wr ng way” t wire this header,
h wever it is easiest t think f the pin nearest the JP7 r
JP8 marking as pin 1.
JP8-1 Gr und Required
JP8-2 IC2-12 Required
JP8-3 Vcc Required
JP5-2 JP5-T Required
JP5-3 JP5-R Required
JP6-6 JP6-7 Required
JP6-9 JP6-10 Required
J2-1 (if NOT using J2) IC2-25 Opti nal (brings unregulated v ltage t JP2)
Vin (if using J2) IC2-25 Opti nal (brings unregulated v ltage t JP2)
JP7 is the run/pr gram jumper. If y u c nnect a shunt fr m pin 1 t 2 and reset the b ard, the GP3 will resp nd
t c mmands fr m the PC. If y u c nnect the shunt between 2 and 3 and reset, the GP3 will execute its
prepr grammed script. By default, the test script blinks the LED (see Final Check ut, bel w).
N te that JP6 has pin 1 marked. JP6 has 2 l ng r ws and 6 sh rt c lumns. The numbers g by c lumns. S the
-11-

first sh rt r w with pin 1 c ntains pins 1 and 2. The next sh rt r w has pin 3 (directly next t pin 1) and pin 4
(directly next t pin 2). An ther way t think ab ut this is that the dd numbered pins are all n the l ng r w
with pin 1 and the even numbered pins are all n the ther l ng r w with pin 2 directly bel w pin 1.
The c nnect r al ng the edge (JP1+JP2 c unts as ne c nnect r with pins 1 t 40) c ntains all the GP3 signals
as seen in the table bel w.
GPMPU40 Edge Connector
Pin Function
1Reset
2Anal g #0
3Anal g #1
4Anal g #2
5Anal g #3
6NOT USED
7Anal g #4
8Gr und
9 and 10 Must be disc nnected (cl ck pins)
11 Hardware c unter
12 Pr gram/run jumper (wired t JP8/JP7)
13 Hardware PWM utput
14 Onb ard LED utput
27 Digital I/O #1
28 Digital I/O #2
29-30 Must be disc nnected (serial I/O)
31 Gr und
32 +5V
33 Digital I/O #0
34-35 Must be disc nnected (serial I/O)
36 Digital I/O #3
37 Digital I/O #4
38 Digital I/O #5
39 Digital I/O #6
40 Digital I/O #7
Y u can use the extra pins in the IC2 f t print t m unt an p-amp (MCP602 is pti nally supplied; n te the
MCP602 is designed t perate ff 5V s d NOT c nnect Vin t this particular p amp). Y u can als use this
spare area t c nnect m re LEDs, transist rs, r any ther small device r circuit. The c nnecti ns will be
available at the b ard edge:
8 pin socket
( ounted with pin 1 at IC1's pin 17)
40 pin connector (J1+J2)
Pin 1 Pin 17
Pin 2 Pin 18
Pin 3 Pin 19
Pin 4 Pin 20
Pin 5 Pin 21
Pin 6 Pin 22
Pin 7 Pin 23
Pin 8 Pin 24
Y u c uld als fit a USB daughterb ard in this s cket. Refer t the GP3X instructi ns f r m re n h w this
-12-

w uld be p ssible. H wever, if y u wish t use USB, a better ch ice w uld be t use the GP3X b ard which
requires less cust m wiring.
Y u sh uld check y ur w rk bef re installing IC1 in its s cket. P wer the b ard up using y ur ch ice f
meth ds and verify that 5V appears n the +5V c nnect r.
Next, pr ceed t the Final Check ut secti n bel w.
Final Checkout
If y u are using a MAX232, y u can als perf rm an ech test t verify the p rt circuitry bef re y u install IC1.
C nnect y ur PC t the DB9 c nnect r using a straight RS232 cable (assuming y u did n t m dify the
DTEDCE jumper n the GP3X; therwise, use a cr ss cable). Open a terminal pr gram t the c rrect p rt and
make sure l cal ech is ff as well as hardware handshaking. The baud rate is n t imp rtant (use 57600 baud if
y u like since that is the speed y u will use later as well). Typing n the terminal sh uld have n effect at this
time. If y u see what y u are typing y u d n't have l cal ech turned ff in y ur terminal pr gram. Sh rt pins
17 and 18 n the IC1 s cket and apply p wer t the b ard. N w when y u type, y u sh uld see the characters
y ur type appear. Rem ving the sh rt sh uld st p y ur terminal pr gram fr m sh wing y u what y u type. This
test will sh w that the RS232 c mmunicati ns is w rking c rrectly. Y u can perf rm the same test with the
USB daughter b ard r cable using a USB cable and the appr priate COM p rt.
Once these checks are c mplete ( r y u are feeling lucky) y u can fit a jumper n the Pgm Run header s that
the center pin c nnects t the pin cl sest t the w rd Run n the GP3X. F r the GPMPU40 the jumper at JP7
sh uld have a sh rt between JP7-2 and JP-3. F r the GPMPU28 c nnect JP1-3 t the 5 v lt supply (pin JP1-11,
f r example). Install IC1 and p wer up the b ard. The GP3 chip has a pr gram built in that will blink the
nb ard LED 10 times, pause and repeat. If y u did n t install either D1A r D1B as built-in LEDs, y u can
temp rarily c nnect an LED t the LED pin f J1. Y u can als m nit r the utput with a v ltmeter as the
utput is sl w (ab ut 2Hz).
If the c mmunicati ns test passed and the LED blinks, c ngratulati ns, y ur GP3 is w rking and y u can
pr ceed t the S ftware secti n f this manual.
Software
The GP3 c nnects t a PC r ther h st device via the RS-232 p rt. The GP3 is a DCE device, s y u can use a
straight cable t c nnect directly t a PC. The PC sends c mmands t the b ard using 57600 baud serial data.
T make things simpler, y u can d wnl ad libraries that interface y ur pr gramming language t the GP3
seamlessly. M st Wind ws-based languages can use ActiveX c ntr ls r DLLs, and b th are supplied.
T use the GP3 f r a particular functi n, y u can either write cust m s ftware in a variety f languages, use an
applicati n pr vided (such as GP3DAQ) r use GP3EZ t build a “script” with ut pr gramming. In additi n,
GP3 scripts can be d wnl aded t the GP3 where it can execute with ut c nnecti n t a PC.
-13-

Y u can find m re ab ut different techniques t use the GP3 at http://www.awce.c m/gp3intr .htm. The current
meth ds available are:
Method Description Pros Cons Links
GP3EZ
Use a simple p int and
click interface t create
"scripts". Y u can run the
scripts fr m the PC, r
d wnl ad them t the GP3
s it will run standal ne.
Very easy t use.
Integrated
debugging. Only
way t c mpile t
the GP3.
N t as flexible as
c nventi nal
pr gramming. Requires
Wind ws r M n
under Linux (Linux
versi n available May
2010, alth ugh V1.5
w rks under M n
with nly a few
c smetic pr blems)
•Inf center
including vide s,
help files, and
d wnl ads
•Online Help
GP3DAQ
Use an example pr gram t
pl t anal g inputs and save
them t y ur PC as files
N pr gramming
required
Wind ws nly. Only
pl ts anal g values.
Alth ugh y u can scale
data using a
p lyn mial, generally
n t as flexible as
writing cust m
s ftware r scripts
•M re inf
Microsoft
(ActiveX)
languages (C++,
C#, VB, VBA, ASP,
etc.)
The pr vided ActiveX
c ntr l pr vides an easy
way t c ntr l the GP3
fr m m st Micr s ft
languages and many ther
Wind ws-based languages.
Simple integrati n
with c mm n
Wind ws languages.
Very simple t use.
ActiveX n t p rtable.
Must have c rrect MS
dependencies.
•This page has m re
inf (see bel w).
•C re installer has
ActiveX and
standard DLLs.
•Example with VB
Express
Windows DLL or
Library
Standard library can
pr duce a standard library,
a DLL, r y u can just
include the s urce c de in
y ur C r C++ pr gram.
P rtable (same c de
usable n Linux,
Wind ws, Cygwin,
Wind ws CE). DLL
usable with Java via
JNI r JNA calls.
Integrating DLLs
slightly m re difficult
in s me languages).
•D wnl ad library
•The Java page has
inf rmati n ab ut
using JNA t call
the library fr m
Java
•Online
d cumentati n
Linux Library
Standard library can
pr duce a standard library,
a shared bject, r y u can
just include the s urce c de
in y ur C r C++ pr gram.
P rtable (same c de
usable n Linux,
Wind ws, Cygwin,
Wind ws CE).
The .s is usable
with Java via JNI r
JNA calls. Als used
f r Raspberry-Pi.
Any 3.3V b ard
requires level
c nversi n r GP3/Pi
hardware. Serial p rt
can't be used f r
c ns le.
•D wnl ad library
•The Java page has
inf rmati n ab ut
using JNA t call
the library fr m
Java
•Online
d cumentati n
Pure Java Object Standard Java Object wraps
GP3 functi nality
N native c de
required. Example f
embeddable
Javascripting.
Requires finicky Java
Serial libraries
(javax.c mm r
RXTX)
•The Java bject and
example
•This page has an
example.
-14-

Java via Library
Using the p rtable DLL
r .s file fr m Linux is
simple
N need f r finicky
serial libraries N t "pure" Java
•D wnl ad library
•The Java page has
inf rmati n ab ut
using JNA t call
the library fr m
Java
•Online
d cumentati n
LabView
LabView (by Nati nal
Instruments) is a very
p pular pr gram f r
managing data acquisiti n
and simple c ntr l.
LabView can easily drive
the GP-3 hardware via a
serial r USB p rt.
P pular
envir nment.
Interfaces with many
ther t ls.
N t inexpensive f r all
versi ns. Experienced
pr grams ften prefer
w rking in traditi nal
languages.
•M re Inf
Ga bas (Linux)
Gambas is a VB-like RAD
t l f r Linux that supp rts
the GP3
Easy visual
devel pment Linux nly •Gambas Example
GNUPlot (Linux)
This article sh ws a simple
way t stream data fr m a
GP-3 t GNUPl t
N real
pr gramming;
flexible and easy
Linux nly; n t the
fastest s luti n
•GNUPl t Example
Arduino
Libraries t interface the
GP3/A t Arduin . W rks
with any GP3 b ard if
interfaced t Arduin .
Install like any
Arduin library by
c pying int y ur
libraries f lder
•D wnl ad
•D cumentati n
Anal g inputs read raw c unts fr m 0 t 1023 (0 t 5V with the default reference) and have a maximum
rec mmended s urce impedance f 10K. If y ur s urce exceeds this 10K maximum ( r y u require a different
v ltage range), y u may wish t buffer the anal g inputs with an appr priate p amp circuit.
-15-

Reference
The GP3 has a simple c mmand structure. When using the libraries, the c mmands are even simpler. Each
secti n bel w describes a c mmand and h w t execute it either directly r via the standard libraries. Unless
y u are trying t write y ur wn library f r a different platf rm, y u pr bably w n't care ab ut the direct
c mmands.
When using either ActiveX library, y u must set the c mmp rt parameter t match the p rt the GP3 is using
(e.g., set t 1 f r COM1). In additi n, y u must set p rt pen t TRUE t c nnect t the hardware.
If y u are directly c ntr lling the GP3 (and n t using the library), y u need t kn w a little bit ab ut h w the
pr t c l w rks. T prevent synchr nizati n err rs, each c mmand byte starts with a 0 bit. Each data byte starts
with a 1 bit. This requires numbers t be packed t fit. In general a c mmand has the binary f rmat (the raw
c mmands are specified in binary):
0 C C C P P P L
Where C C C is the c mmand c de (0 t 7), P P P is typically a pin number (0-7) and L is the LSB f any data
byte. If additi nal data is required, the next byte sent will have the f rmat:
1 N N N N N N N
Since this is nly 7 bits, the c nventi n is that the GP3 accepts the value divided by 2. The L bit fr m the
c mmand makes the entire 8 bit number. All c mmunicati ns are at 57600 baud, 8 bits, 1 st p bit, and n parity.
In additi n, there is a 16-bit argument (ARG) that can be set by special c mmands. S me c mmands use this
argument w rd as an additi nal s urce f data. When the GP3 sends data t the PC, it is n t enc ded in any
particular way since the GP3 nly resp nds t queries fr m the PC there is n chance f desynchr nizing. All
data back and f rth is in binary (alth ugh the results fr m a raw inp c mmand happen t be an ASCII "0" and
"1").
By default, all digital I/O pins are inputs until y u change them explicitly t utputs. Hardware handshaking
all ws y u t determine when the GP3 is busy. The GP3 will remain busy while perf rming any perati n,
alth ugh hardware PWM and the hardware c unter w rks with ut tieing up the GP3.
F r the purp ses f this manual, a byte has 8 bits and a w rd has 16 bits. Raw c mmands are sh wn in binary.
Each raw c mmand is a single byte, n t 8 ASCII characters.
C mm n C mmands
These c mmands are pr vided in the standard ActiveX libraries. In additi n, each c mmand discusses the raw
c mmand bytes y u w uld send t duplicate the c mmand if y u are writing y ur wn libraries.
high(pin , low(pin – These c mmands are the easiest way t manipulate the utput pins f the GP3. These
c mmands f rce the pin (fr m 0 t 7) t be an utput and set the l gic state t high, l w respectively. Raw
command: 0 0 0 1 P P P H where P P P is the pin number and H=0 for low or 1 for high.
toggle(pin – Sets an utput pin (fr m 0 t 7) t an utput and inverts its current state. Raw command: 0 0 1 0 P
P P 0 where P P P is the pin number.
-16-

inp(pin – Switches a pin t an input and reads the value. The raw c mmand versi n returns an ASCII "0" r
ASCII "1". The library versi ns return 0 r 1 as y u w uld expect. Raw command: 0 0 1 0 P P P 1 where P P P
is the pin number.
tris – This pr perty sets the directi n bits f r the 8 digital I/O pins. Each 1 in this byte sets the c rresp nding
pin t an input (the default). A 0 sets the c rresp nding pin t an utput. Y u nly need t use this pr perty if
y u want t manage the pin directi ns all at the same time (in ther w rds, y u d n't need t use tris if y u are
making calls like high, l w, etc.). As an example, if y u wanted t set all pins t inputs except f r pins 0 and 1
y u might write:
i .tris = &HFC ' FC hex = 11111100
Raw commands: To read use 0 1 0 1 0 1 1 0; to set use 0 0 0 0 0 0 1 L where L is the L B of the value to set.
pins - This pr perty sets and reads the I/O pins as a single byte. Y u nly need t use this pr perty if y u want
t manage the pin data all at the same time (in ther w rds, y u d n't need t use pins if y u are making calls
like high, l w, etc.). As an example, if y u wanted t set all utput pins t 0 except f r pins 7 and 1 y u might
write:
i .pins = &H7D ' 7D hex = 01111101
Naturally, in this case, the c mmand nly affects pins already set as utputs.
Raw commands: To read use 0 1 0 1 0 1 1 1; to set use 0 0 0 0 0 1 0 L where L is the L B of the value to set.
a2d – This functi n accepts an A/D channel number (fr m 0 t 4) and returns a 16-bit number that c ntains the
10-bit A/D result. The first byte sent by the GP3 is the t p 8 bits f the result. Raw command: 0 0 1 1 P P P 0
where P P P is the A/D channel number.
a2dconf – C nfigure the A/D f r result justificati n and v ltage reference selecti n. The functi n call all ws
y u t set the justify parameter t get results right r left justified (default is left and has value 0; a 1 selects
right justificati n). The cselect argument can be 0, 1, r 4. The default, 0, uses gr und and the supply v ltage as
references. A value f 1 selects anal g input 3 as the p sitive reference (the negative reference is still gr und in
this case). A value f 4 uses anal g input 2 as the negative reference and anal g input 3 as the p sitive
reference. This is useful f r expanding the sensitivity f the A/D c nverter. S using 0V and 3.3V as references
w uld mean that a c unt f 1023 w uld be equal t 3.3V instead f 5V. N te that the minimum reference
v ltage all wable is 2.7V. Als n te that the clkx2 argument is n l nger used, but remains f r hist rical
reas ns. Raw command: 0 0 1 1 0 0 0 1 1 J 0 0 0 R R R where J is the justification bit and RRR is the cselect
argument.
eeprom – This pr perty all ws y u t access the 128 bytes f EEPROM available in the GP3. Keep in mind
that EEPROM eventually wears ut (ab ut ne milli n write cycles) s EEPROM is best f r st ring values that
d n't change frequently such as serial numbers r c nfigurati n parameters. F r the library, simply pr vide the
address as a parameter: eepr m(0)=41. When using raw c mmands, the address c mes fr m ARG and the data
byte t st re is sent after the c mmand ( r read, if reading). Raw command: to set – 0 1 0 1 0 0 0 L; to read – 0
1 0 1 0 0 1 0 where L is the L B of the data byte.
pwm – This functi n has tw different capabilities. If y u supply a pin number, a duty cycle, and a durati n, the
GP3 will pr duce a PWM wave f rm with the indicated duty cycle n any f the 8 general I/O pins. This will
f rce the pin t utput status and als tie up the GP3 f r the indicated durati n. If y u supply a pin number f
-1, the GP3 will set its hardware PWM utput t the indicated duty cycle and use the durati n as a frequency.
The hardware PWM utput runs c ntinu usly with ut st pping the GP3. The frequency can be as l w as 1225
Hz r as high as 32767Hz. In either case, the duty cycle runs fr m 0 t 255 (0 t 100%). Raw command:
software PWM – 0 1 1 0 P P P L; hardware PWM – 0 1 0 1 0 1 0 L where P P P is the pin number and L is the
-17-
This manual suits for next models
5
Table of contents
Popular Computer Hardware manuals by other brands

audiowerkstatt
audiowerkstatt midi-clock-multiplier v2 quick start guide

Dolphin
Dolphin PXH812 user guide

Embedded Computer
Embedded Computer PC-620-G4 user manual

Bitspower
Bitspower O11DXL installation guide

AXIOMTEK
AXIOMTEK UST500-517-FL Series Quick installation guide

Hitachi
Hitachi H8S/2628 Hardware manual