By Bob Davis
Jindex.php?/magazina/article/march201
are the default limits of the Arduino's analog-
{o-igital converter (ADC)? To determine the
base line limit, we need to record the time; take,
let's say, 100 samples; then record the time once
again. Then, we subtract the beginning time from
the ending time to see how long it took to collect.
those samples.
In order to easily see what we are doing, le’s
connect up an LCD screen. A 128x64 bit graphics
screen is fairly cheap to buy, and is still able to
display our data. The 128x64 LCDs typically sell for
about $10 to $12 on eBay. Look for one with an
817920 driver IC. You can use other driver ICs by
changing a line of code in the software.
The 128x64 LCDs come in several sizes, and usualy
have a blue or green backlight. The green backlight seems,
to offer more contrast and makes it look more like a
technical instrument. The larger 126x64 LCDs are 93 mm.
x 70 mm in size, They have a screen viewing glass area
that is 72 mm x 40 mm, The LCDs also come with a
40 NITSIVONS March 2014
F st, we need to establish a base line, What
Post comments on this atile and find any agsociated files andlor downloads at www.nutsvols.com
Admit it, we all like to do it — break the speed
limit. Usually, it is just a little bit. Sometimes it
just keeps getting worse until we get caught.
The same thing applies to overclocking our
computers. We keep pushing the limits until it
fries. How fast can you push the tiny little
Arduino? Well, let's take a look.
ARDUINO FIGURE 1.
Be fs
3 : °|) 128 x 64
ed : tcp
ilje
Ie! E
variety of connectors. The best type to use is one that you
can solder a 20-pin header onto and then plug it into a
breadboard.
The ST7920-based LCD needs eight data bits and
three control lines to run it. It will also need five volts and
‘ground. You will need a variable resistor to set the contrastof the LCD. Figure 1 is the schematic diagram of how to
connect the LCD screen to an Arduino Uno.
Figure 2 shows what that should look like. Note that |
have jumpers over the center barrier of the breadboard,
This arrangement makes some more space available for
‘our jumper wires.
For a sine wave test source, | am using a program
called "Audio SweepGen’ running on my PC. To connect,
it to the Arduino analog input AO, there is a little bit of
circuitry involved. Figure 3 is the input circuit schematic
None of the resistor values are critical. You ean
sometimes get away with just using the .47 pF capacitor,
as the Arduino’s analog input seems to be naturally self
biasing to around 2.5 volts
Here is the sketch to determine what the default
conversion speed is:
ARDUINO
4 Miswvors 41128 by 64 Leb Gecilisscope - Default
By Bob Davie
Uses Universal bit Graphics Llbrary,
https) feode «aoogle. con/p/usazib/
Copyright {c) 2012, oltkraustgmail.com All
rights reserv:
Hinelude “UegLib.n™
D7
10,11,4,5/6,7 en=ta,
UsoitE_si7920-126x64_4x vag(B, 9, 10, 11, 4, 5,
6, 1, 18, 17, 18)
int Sample[i2e} +
Int Glamnput=0;
ine StartSanple<07
int Endsample:
int Sanplerin
vold us_prepare(voia) (
Ug. sebPont (uby.font_sxta}
hag setPont efile: gheEerendedText () 2
ugg |setDeraultroregrounacolor (I
lag setronePestep i)?
Yold Drawarkers void! (
wagvdrswPrame (0,0,128,64) 2
uag.deaweixel
uag-draweixel
sg drauPixel
Use /dranPiscel
ties drawPaxel
tag vdrawbixel
uagldeaweixel
uag-araneixel
sg drampixel (100,48)
id gample_data (void) (
Vi'wait fora trigger of a positive going input
‘uhile (Impuc « Olampur] (
‘Oidmnput=snatogkess (NO)
TnputtanaloaReadiAdl +
)
// coltect the analog data into an array
1 de nat do division by 10.24 heve, it makes it
1 Slower!
startsenpie
micros()
Fortine poss) xpas