STK 2148 LabManualV1.0
Short Description
STK 2148 LabManualV1.0...
Description
STK-2148 Lab Manual
STK-2148 Embedded Lab Manual
SPJ Embedded Technologies Pvt. Ltd. Survey No. 124/12 A, Mulik Baug, Near MIT College, Off Paud Road, o!"rud. Pu#e $ 411%&' (IN)IA* Tel. +1-2%-22&%%2 +1-2%-22&%%2 a0. +1-2%-22&%%& +1-2%-22&%%& "!!//333.5y!e6.7o6
SPJETPL © SPJETPL
All Rights Reserved. (www.spjsystems.com ( www.spjsystems.com))
Page 1 of 8%
STK-2148 Lab Manual
!S"L#!ME$ Embedded Lab Manual %o& #$M'TM! and othe& documentation(
T"i 6a#ual a#d !"e a77o6a#yi#g do7u6e#!a!io# u7" a 7"e6a!i7 diagra6 $ i# of! or "ard for6 -7o#!ai# de7ri!io# of 7oyrig"!ed rodu7!, 3"i7" are #o! e0li7i!ly i#di7a!ed a u7". T"e a9e#7e of !rade6ark y69ol doe #o! i#fer !"a! a Produ7! i #o! ro!e7!ed. Addi!io#ally, regi!ered a!e#! a#d !rade6ark are i6ilarly #o! e0rely i#di7a!ed i# !"ee do7u6e#!. T"e i#for6a!io# i# !"ee do7u6e#! "a 9ee# 7arefully 7"e7ked a#d i 9elieved 9 elieved !o 9e e#!irely relia9le. :o3ever, SPJ Embedded Technologies Pvt. Ltd. ("e#7efor!" ;"om)an*0eri6e#!...........................................................................................................................................&1 .1 @ri!e ae69ly la#guage rogra6 for ari!"6e!i7 oera!io# (addi!io#, u9!ra7!io#, 6ul!ili7a!io# a#d diviio#*..........................................................................................................................................&1 .2 @ri!e a rogra6 for )igi!al Ou!u!.................................................................................................&2 .& @ri!e a rogra6 for )igi!al I#u!....................................................................................................&& .4 @ri!e a rogra6 for Buer I#!erfa7e..............................................................................................&4 .8 @ri!e a rogra6 for Relay I#!erfa7e................................................................................................&8 . @ri!e a rogra6 for S!eer Mo!or I#!erfa7e..................................................................................& . I#!erfa7i#g of 102 Te0! HC).........................................................................................................& .' @ri!e a rogra6 for Serial Co66u#i7a!io# ui#g JART%.............................................................&' . @ri!e a rogra6 for 4L4 Ma!ri0 eyad I#!erfa7e..........................................................................& .1% @ri!e a rogra6 for o#-7"i A#alog !o )igi!al Co#verio#..........................................................4% .11 @ri!e a rogra6 for HM&8 Te6era!ure Se#or I#!erfa7e............................................................41 .12 e#era!io# of Ra6 3ave ui#g o#-7"i )AC.............................................................................42 .1& @ri!e a rogra6 for I2C 9aed Seve# Seg6e#! H>) )ilay I#!erfa7e.......................................4& .14 @ri!e a rogra6 for I2C 9aed >>PROM I#!erfa7e......................................................................44 .18 @ri!e a rogra6 for I2C 9aed RTC I#!erfa7e..............................................................................48 .1 @ri!e a rogra6 for SPI 9aed >>PROM I#!erfa7e......................................................................4 .1 @ri!e a rogra6 for >0!er#al I#!erru!..........................................................................................4 .1' @ri!e a rogra6 for 12'04 ra"i7 HC) I#!erfa7e...................................................................4' '. >0eri6e#! 9aed o# FC/OS-II RTOS.................................................................................................4
SPJETPL © SPJETPL
All Rights Reserved. (www.spjsystems.com ( www.spjsystems.com))
Page 4 of 8%
STK-2148 Lab Manual
'.1 I6le6e#! Mul!i!aki#g 3i!" T3o eara!e H>) 9li#ki#g !ak....................................................4 '.2 I6le6e#! Priori!y S7"eduli#g a#d OS Ti6e )elay u#7!io# 9y 3ri!i#g & differe#! JART Tra#6i!!i#g Tak................................................................................................................................8%
SPJETPL © SPJETPL
All Rights Reserved. (www.spjsystems.com ( www.spjsystems.com))
Page 8 of 8%
STK-2148 Lab Manual
1. !nt&oduction T"i i uerE 6a#ual for STK-2148 Trai#er i! 9aed o# HPC214' 6i7ro-7o#!roller. T"i !rai#er 9oard i deig#ed !o erfor6 la9 ra7!i7al a#d "a a fa7ili!y !o do3#load !"e uer rogra6 i#!o !"e o#-7"i fla" 6e6ory of !"e 6i7ro-7o#!roller. I! i !ro#gly re7o66e#ded !o read !"i 6a#ual 7arefully 9efore you !ar! ui#g !"e STK-2148 9oard.
"#+T!, T"i 9oard 7o#!ai# 7o6o#e#! !"a! are e#i!ive !o >le7!ro-S!a!i7 )i7"arge (>S)*. T"e
9oard 6u! 9e "a#dled 7arefully, o a #o! !o u95e7! i! !o >S). A far a oi9le, do #o! !ou7" a#y 7o#du7!i#g ar! o# !"e 9oard - i#7ludi#g a#y 7o6o#e#! or 7o##e7!or i# - a !"i 6ay da6age ar! of !"e 9oard er6a#e#!ly. If you 3a#! !o !ou7" a#y of !"e ar!, 6ake ure !o di7"arge yourelf !o ear!". Par! da6aged due !o >S) are #o! 7overed u#der li6i!ed 3arra#!y.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page of 8%
STK-2148 Lab Manual
2. etting Sta&ted 2.1 S"#$M !nstallation( A a ar! of !"e SCARM of!3are a7kage, you "ould "ave re7eived a C). Pleae i#er! i! i#!o
1.
!"e C)-ROM drive. Oe# SPJTools (C) drive*, oe# !"e folder S"#$M a#d ru# !"e SET+P.E/E 2.
If i! "o3 a#y error !"e# 7li7k Ig#ore.
3.
S"#$M Setu) 3i#do3 3ill oe#, 7li7k E/T.
4.
A77e! !"e of!3are li7e#e agree6e#! 9y 7li7ki#g 0ES.
5.
C"ooe de!i#a!io# lo7a!io# 3"ere you 3a#! !o i#!all !"e SCARM a#d 7li7k E/T.
6.
Cli7k E/T 9u!!o# a#d i#!alla!io# 3ill !ar!.
7.
Cli7k !!S 9u!!o# !o 7o6le!e !"e I#!alla!io#.
8.
No3 7o##e7! !"e S"#$M SPJ Loc3 !o +S )o&t o% the com)ute& .
9.
A o-u 3ill "o3 5ound e6 a&d6a&e7
10.
ound e6 a&d6a&e i9a&d 3i#do3 3ill 9e oe#. Sele7! o, not this time o!io# a#d 7li7k
o# e:t. 11. No3 12.
Bro3e for !"e folder d&v fro6 "(=S"#$M=d&v a#d 7li7k e:t.
13. No3 14.
ele7! !nstall %&om a list o& s)eci%ic location ;#dvanced< a#d 7li7k e:t.
a&d6a&e !nstallation 6indo6 3ill oe#, 7li7k "ontinue #n*6a* .
Af!er 7o6le!io# of i#!alla!io#, a 6eage 3ill 7o6e The 6i9a&d has %inished installing the so%t6a&e %o& SPJ Loc3 , #o3 7li7k o# inish.
15.
Agai# you 3ill ee 5ound e6 a&d6a&e7 3i#do3, !"erefore reea! !"e a6e ro7edure fro6 !e #o..
16.
Af!er !"i you 7a# !ar! ui#g S"#$M ; Start > All Programs > SPJ-SCARM > SIDE_ARM "< a#d Te&minal Emulation +tilit* ;SPJTe&m< . T"i do7u6e#! de7ri9e !e !o 7rea!e
ARM ali7a!io# i# DCE ui#g !"e SCARM.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page of 8%
STK-2148 Lab Manual
#bout 5P&o?ect7( @"a! i a ro5e7! A ro5e7! i a file i# 3"i7" SI)>ARM !ore all i#for6a!io# rela!ed !o a# ali7a!io#. >.g. i! !ore !"e #a6e of DCE a#d/or Ae69ler our7e file, 6e6ory ie !o 9e ued a#d o!"er o!io# for 7o6iler, ae69ler a#d li#ker. ,)ening a )&o?ect(
To oe# a# e0i!i#g ro5e7! file, ele7! P&o?ect @ ,)en P&o?ect fro6 !"e 6e#u. "&eating a ne6 )&o?ect(
To 7rea!e a #e3 ro5e7!, ele7! P&o?ect @ e6 P&o?ect fro6 !"e 6e#u. "hanging )&o?ect settings(
To 7"a#ge !"e ro5e7! e!!i#g (u7" a addi#g or re6ovi#g DCE a#d/or Ae69ler our7e file(*, 7"a#gi#g 6e6ory e!!i#g e!7.*, ele7! Pro5e7! / Se!!i#g fro6 !"e 6e#u.
2.2 Auic3 sta&t to c&eate assembl* language a))lications( 1. S!ar! !"e S!EB#$M rogra6 (i.e. !"e I#!egra!ed )evelo6e#! >#viro#6e#!* fro6 !ar!Progra6SPG-SCARMSI)>ARM. 2. ro6 P&o?ect 6e#u, ele7! "lose )&o?ect (if a#y ro5e7! i oe#*. &. ro6 P&o?ect 6e#u, ele7! e6 P&o?ect . T"e Oe# dialog 3i#do3 3ill 9e dilayed. Sele7! !"e deired a!" 3"ere you 3i" !o 7rea!e !"i #e3 ro5e7!. (or e0a6le, CSPG*. CAJTION T"e a!" a#d file#a6e 6u! #o! 7o#!ai# a7e or o!"er e7ial 7"ara7!er u7" a !a9, 7o66a, e6i7olo# e!7. I# !"e ;ile #a6e< field, !ye !"e #a6e of !"e ro5e7!, 3i!"ou! a#y e0!e#io#. or e0a6le, you 6ay !ye ;P$,1 (i# a9ove e0a6le, P$,1.E/*. T"i i !"e file !"a! you 3ill #eed !o ue !o rogra6 your 6i7ro-7o#!roller.
2.4 Auic3 sta&t %o& G"@,S-!! ;$T,S< a))lications( 2.4.1 o6 to ,)en and modi%* e:isting u",S P&o?ect( 1.
Coy give# uCOS rogra6 o# " d&ive (eg. C:\Multitasking *
2.
Oe# S"#$M ;Sta&t
3.
Cloe !"e ro5e7! i# SI)>-ARM, if a#y ro5e7! i oe#.
4.
To ,)en !"e e0i!i#g )&o?ect go !o ;S!E-#$M C:\Multitasking
5.
#ll P&og&ams
SPJ H S"#$M
P&o?ect
S!E-#$M<
,)en )&o?ect
main.PI1g.
All .
C:\Multitasking\%uil$\%in\&PC'()*!"+ 8.
)o3#load !"i "e0 file a#d 7"e7k !"e reul!.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 12 of 8%
STK-2148 Lab Manual
2.4.2 ote( !% *ou 6ant to change %olde& name o% the e:isting )&o?ect then %ollo6 belo6 mentioned )&ocedu&e(
1. Coy give# uCOS rogra6 o# C drive. 2. Make 7oy of o#e of !"e uCOS ro5e7!, 3i!" a#o!"er #a6e a#d ave i! (uoe C:\Multi_,ask *. &. A you "ave 7"a#ged !"e #a6e of !"e folder (6ea# 3orki#g dire7!ory*, you 6u! "ave !o do !"e a6e 7"a#ge i# !"e Ma3e%ile ree#! i# !"e a6e folder vi. C:\Multi_,ask
Mak"fil"
4. Oe# !"i Makefile i# @ordPad. I# Makefile fi#d @OR)IR U C:\Multitasing !any another name may be present" C"a#ge !"i li#e !o ,$KB!$ ( "(=MultiBTas3
Save !"e Makefile a#d 7loe i!. 8. Oe# S"#$M ;Sta&t
#ll P&og&ams
SPJ H S"#$M
S!E-#$M<
. Cloe !"e ro5e7! i# SI)>-ARM, if a#y ro5e7! i oe#. . To ,)en !"e e0i!i#g )&o?ect (MultiBTas3 * go !o ;S!E-#$M C:\Multi_,ask
,)en )&o?ect
main.PI1g.
All .
C:\Multi_,ask\%uil$\%in\&PC'()*!"+ 27.
)o3#load !"i "e0 file a#d 7"e7k !"e reul!.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 18 of 8%
STK-2148 Lab Manual
D. a&d6a&e esc&i)tion D.1 STK-2148( +n)ac3ing( ou 3ill fi#d follo3i#g i!e6 i# !"e a7kage •
ST-214' 9oard
•
Serial 7o66u#i7a!io# 7a9le (S!raig"! -Pi#*
•
Po3er ada!er 3i!" 7a9le
•
SPG>TE C)-ROM
Po6e& Su))l* $eui&ements( T"e o3er ada!er 3ork 3i!" 2&%Kol! AC. I! rodu7e aro0i6a!ely Kol! )C, a#d !"e ST-214' ue o#-9oard regula!or !o rovide 8 Kol! a#d &.& Kol! )C !o all 7o6o#e#! o# !"e 9oard.
"onnecting the s*stem( T"e erial 7o66u#i7a!io# 7a9le ulied 3i!" !"e 9oard "ould 9e ued !o 7o##e7! !"e 9oard !o a PC ru##i#g @i#do38/'/NT/ M>/2%%%/P/Ki!a Oera!i#g Sy!e6. Co##e7! o#e e#d of !"e erial 7a9le !o JART% of ST-214' 9oard a#d o!"er e#d !o PC erial or!. Po6e&ing ,(
Af!er 7o##e7!i#g !"e erial 7o66u#i7a!io# 7a9le a de7ri9ed a9ove, you 6ay i#er! !"e o3er ada!er ou!u! 5a7k i#!o !"e o#-9oard o3er o7ke!. Plug !"e o3er ada!er i#!o 2&%KAC 6ai# ou!le! a#d !ur# i! o#. No3 re o#-9oard o3er 3i!7", o3er-o# i#di7a!io# ree# H>) 3ill !ur# o#. "#+T!,( Pleae do #o! 7o##e7! or di7o##e7! !"e erial 7o66u#i7a!io# 7a9le 3"ile !"e 9oard i
o3ered ON. )oi#g o 7a# da6age !"e erial or! of !"e ST-214' 9oard a#d/or PC.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 1 of 8%
STK-2148 Lab Manual
4. "onnecto& etails Jum)e& and S6itch Settings 4.1 STK-2148 loc3 iag&am( Belo3 figure "o3 !"e lo7a!io# of differe#! 7o6o#e#! o# !"e ST-214' 9oard.
G1/JART1 or RS4'8 102 Te0! HC)
PS2 Co##e7!or
12'04 ra"i7 HC)
G&/JSB
G2/JART%
SPI Co##e7!or H>) !o o9erve P@M 2 ig#al
Po3er ON/O S3i!7" P@R GAC
' e#eral Puroe H>)
Relay POT !o give A#alog I#u!
'-e#eral Puroe ey
HM&8
I2C 9aed Seve# Seg6e#!
Buer
TP, Te! Poi#! for )AC ey !o give >0!er#al I#!erru! SPI 9aed >>PROM, AT2828
R>S>T
I2C 9aed RTC, )S1&%
PM
GTA Co##e7!or
404 Ma!ri0 eyad
Co##e7!or for S!eer Mo!or
I2C 9aed >>PROM, AT24C812
igure 1
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 1 of 8%
STK-2148 Lab Manual
Belo3 figure "o3 !"e lo7a!io# of differe#! 3i!7"e o# !"e ST-214' 9oard.
S1 S3i!7" !o 7o##e7! JART1 !o HPC214'
S14 S3i!7" !o Co##e7! RS4'8 i# !o HPC214'
S2 S3i!7" !o Tur# ON Au!o Mode
S& S3i!7" !o Co##e7! JSB )evi7e !o HPC214'
S12.1 a#d S12.2 S3i!7" !o 7o##e7! Relay1 a#d Relay2 !o HPC214'
S1&.1 !o e#a9le ra"i7 HC) a#d S1&.2 !o e#a9le H>)
G >0a#io# Co##e7!or
S4.1 a#d S4.2 S3i!7" !o 7o##e7! POT a#d HM&8 !o A)C%.1 a#d A)C%.2 of HPC214'
S11 S3i!7" !o 7o##e7! S!eer Mo!or !o HPC214'
S.1, S.2 a#d S.& S3i!7" !o Co##e7! Buer, )AC /TP a#d >INT% !o HPC214'
S S3i!7" !o Co##e7! SPI >>PROM !o HPC214'
HPC214'
S8 S3i!7" !o Co##e7! I2C Peri"eral !o HPC214'
I2C Co##e7!or
Co##e7!or for S!eer Mo!or
S@28 ey !o give >0!er#al I#!erru!
igure 2
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 1' of 8%
STK-2148 Lab Manual
4.2 !P S6itches etails( S1(
Tur# ON !"i 3i!7" !o 7o##e7! JART1 7o##e7!or !o JART1 li#e (T0)1/P%.' a#d R0)1/P%.* of HPC214'. S2(
Mode ele7!io# 3i!7". T"e HPC2100 6i7ro-7o#!roller i#7lude o#-7"i fla" for !ori#g uer rogra6 a#d #o#-vola!ile da!a. T"e HPC214' "ave 812By!e fla". T"i fla" i I#-Sy!e6-Progra66a9le (ISP*. T"e HPC2100 6i7ro-7o#!roller "ave a 9uil!-i# 9oo!-load rogra6. Jo# o3er-o#, !"i 9oo!-load rogra6 !ake 7o#!rol i! ae 7o#!rol !o !"e uer rogra6 if i# P%.14 i :I: a#d o6e o!"er 7o#di!io# are a!ified. Pleae refer !o !"e HPC2100 da!a-"ee! for fur!"er de!ail. O# !"e ST-214' 9oard, !"e P%.14 i# i 6ade availa9le o# !"i S& 3i!7". Tur# ON !"i 3i!7" !o 7o#!rol !"e Mode (ISP 6ode or Ru# 6ode* 9y la" Magi7. SD(
Tur# ON !"i 3i!7" !o 7o##e7! JSB devi7e 7o##e7!or !o JSB li#e of HPC214'. S4.1(
Tur# ON !"i 3i!7" !o 7o##e7! POT (R2%* !o A)C%.1/P%.2' of HPC214'. S4.2(
Tur# ON !"i 3i!7" !o 7o##e7! HM&8 !o A)C%.2/P%.2 of HPC214'. SI(
Tur# ON !"i 3i!7" !o 7o##e7! I2C eri"eral (Seve# Seg6e#!, RTC ()S1&%* a#d >>PROM (AT24C812** !o I2C li#e (SCH%/P%.2 a#d S)A%/P%.&* of HPC21 4'. S.1(
Tur# ON !"i 3i!7" !o 7o##e7! Buer !o P%.28 of HPC214'. S.2(
Tur# ON !"i 3i!7" !o 7o##e7! )AC/TP !o )ACOu!/P%.28 of HPC214'.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 1 of 8%
STK-2148 Lab Manual
S.D(
Tur# ON !"i 3i!7" !o 7o##e7! 3i!7" S@28 !o >INT%/P%.1 of HPC214'. P%.1 i >0!er#al I#!erru! % i# of HPC214'. S'(
Tur# ON !"i 3i!7" !o 7o##e7! SPI >>PROM (AT2828* !o SPI li#e (SC%/P%.4, MISO%/P%.8, MOSI%/P%. a#d CS/P%.* of HPC214'. S11(
Tur# ON !"i 3i!7" !o 7o##e7! S!eer Mo!or !o P%.1%, P%.11, P%.12 a#d P%.1& of HPC214'. S12.1(
Tur# ON !"i 3i!7" !o 7o##e7! Relay 1 !o P%.1' of HPC214'. S12.2(
Tur# ON !"i 3i!7" !o 7o##e7! Relay 2 !o P%.1 of HPC214'. S1D.1(
Tur# ON !"i 3i!7" !o e#a9le 12'04 ra"i7 HC). S1D.2(
Tur# ON !"i 3i!7" !o e#a9le ' H>) 7o##e7!ed !o P%.1% ()*, P%.11 ()1%*, P%.12 ()11*, P%.1& ()12*, P%.1' ()1&*, P%.1 ()14*, P%.2% ()18* a#d P%.21 ()1* of HPC214'. S14(
Tur# ON !"i 3i!7" !o e#a9le RS4'8 7o66u#i7a!io# ro!o7ol over HPC214'. or RS4'8 7o66u#i7a!io# MA4'8 IC i ued. S14.1( Tur# ON !"i 3i!7" !o 7o##e7! )I of MA4'8 !o P%.'/T)1 of HPC214'. S14.2( Tur# ON !"i 3i!7" !o 7o##e7! RO of MA4'8 !o P%./R)1 of HPC214'. S14.D( Tur# ON !"i 3i!7" !o 7o##e7! )> of MA4'8 !o P%.28/PIO of HPC214'.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 2% of 8%
STK-2148 Lab Manual
4.D Push-utton S6itches etails( @"e# reed, !"e 3i!7"e are grou#ded. @"e# Idle, !"ey are ulled "ig". Push-utton RST/R>S>T S@1 S@2 S@& S@4 S@8 S@ S@ S@' S@28 S@ !o S@24 Ma!ri0 eyad
Signal ame Ree! !o HPC214' P1.1 P1.1 P1.1' P1.1 P1.2% P1.21 P1.22 P1.2& P%.1/ >INT% P1.1 !o P1.2&
4.4 LEs and u99e& etails( All !"e H>) are 7o##e7!ed 9y 7o66o# a#ode 6e!"od. T"a! 6ea# !"e oi!ive leg of ea7" H>) i 7o##e7!ed !o K77 a#d #ega!ive leg !o !"e or! i# of !"e 6i7ro7o#!roller. A logi7 % o# !"e or! i# 3ill 6ake H>) ON a#d logi7 1 3ill 6ake i! O. LE )1/ P.ON ) )1% )11 )12 )1& )14 )18 )1 )21 )28
Signal ame +8K Po3er ON/O P%.1% P%.11 P%.12 P%.1& P%.1' P%.1 P%.2% P%.21/P@M8 S@28 P%./P@M2
u99e&
PN.2I
4.I "onnecto& etails( +#$TN(
T"i i a )B fe6ale 7o##e7!or, ued for RS2&2 erial 7o66u#i7a!io# 3i!" !"e PC Pi# 2 U JART% RS2&2 T0) (ou!u! of C*
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 21 of 8%
STK-2148 Lab Manual
Pi# & U JART% RS2&2 R0) (i#u! !o C* Pi# 4 U RS2&2 )TR Pi# 8 U rou#d Pi# U RS2&2 RTS All o!"er i# of G1/JART% are u#ued. +#$T1(
T"i i a )B fe6ale 7o##e7!or, ued for RS2&2 erial 7o66u#i7a!io# 3i!" !"e PC Pi# 2 U JART1 RS2&2 T0) (ou!u! of C* Pi# & U JART1 RS2&2 R0) (i#u! !o C* Pi# 8 U rou#d Pi# U )+/A for RS4'8 Pi# ' U )-/B for RS4'8 1:2 L":
T"i i a 1 i#, i#gle li#e 7o##e7!or, deig#ed for 7o##e7!io# !o !a#dard, !e0! HC) 6odule. T"e i#/ig#al 7orreo#de#7e i deig#ed !o 9e 6a!7"i#g 3i!" !"a! re=uired 9y u7" HC) 6odule. Pi# 1 U N) Pi# 2 U +8K Pi# & U Kl7d Pi# 4 U P1.28 (Jed a RS of HC)* Pi# 8 U N) Pi# U P1.24 (Jed a >N of HC)* Pi# !o 1% U No Co##e7!io#/N) Pi# 11 U P%.18 (Jed a )4 of HC)* Pi# 12 U P%.1 (Jed a )8 of HC)* Pi# 1& U P%.22 (Jed a ) of HC)* Pi# 14 U P%.&% (Jed a ) of HC)* Pi# 18 U Ba7k lig"!i#g Pi# 1 U N)
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 22 of 8%
STK-2148 Lab Manual
128:4 &a)hics L" :
T"i i a 2% i#, i#gle li#e 7o##e7!or, deig#ed for 7o##e7!io# !o !a#dard, 12'04 Mo#o7"ro6e ra"i7 HC) 6odule. T"e i#/ig#al 7orreo#de#7e i deig#ed !o 9e 6a!7"i#g 3i!" !"a! re=uired 9y u7" HC) 6odule. Pi# 1 U N) Pi# 2 U +8K Pi# & U Kl7d Pi# 4 U P1.28 (Jed a RS of HC)* Pi# 8 U P%.18 (Jed a R@ of HC)* Pi# U P1.24 (Jed a >N of HC)* Pi# U P%.1% (Jed a )% of HC)* Pi# ' U P%.11 (Jed a )1 of HC)* Pi# U P%.12 (Jed a )2 of HC)* Pi# 1% U P%.1& (Jed a )& of HC)* Pi# 11 U P%.1' (Jed a )4 of HC)* Pi# 12 U P%.1 (Jed a )8 of HC)* Pi# 1& U P%.2% (Jed a ) of HC)* Pi# 14 U P%.21 (Jed a ) of HC)* Pi# 18 U P%.22 (Jed a CS1 of HC)* Pi# 1 U P%.&% (Jed a CS2 of HC)* Pi# 1 U +8K Pi# 2% U N)
!2" "onnecto& ( T"i !a#dard 4 i# I2C 7o##e7!or rovide uor! for i#!erfa7i#g of I2C 9aed eri"eral !o HPC2100. T"i 7o##e7!or i 6ou#!ed o# 6iddle-9o!!o6 ide of !"e 9oard a "o3# i# figure1. 4 )in st&aight cable 7a# 9e ued !o 7o##e7! HPC2100 !o !"e 9oard "avi#g I2C 9aed eri"eral devi7e.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 2& of 8%
STK-2148 Lab Manual
T"e i#-ou! of I2C Co##e7!or i give# 9elo3 Pin
Signal name
1 2 & 4
P%.2 (SCH%* P%.& (S)A%* +8K )N)
SP! "onnecto& ( T"i !a#dard 1% i# 7o##e7!or rovide uor! for i#!erfa7i#g 6ore SPI 9aed eri"eral devi7e !o HPC2100. T"i 7o##e7!or i 6ou#!ed o# !o ide of !"e 9oard a "o3# i# figure1. 1N )in st&aight cable 7a# 9e 7o##e7!ed !o !"i 7o##e7!or, 3"ile o!"er e#d of !"e 7a9le 7a# 9e 7o##e7!ed !o 9oard "avi#g SPI 9aed eri"eral, ree7!ively. T"e i#-ou! of SPI Co##e7!or i give# 9elo3
Pin
Signal name
1 2 & 4 8 ' 1%
P%.1 P%.2& P%.28 P%.&1 P%.8 (MISO* P%. (MOSI* P%. (NCS* P%.4 (SCO* +8K N)
JT# "onnecto&( T"i !a#dard 2% i# GTA 7o##e7!or rovide de9uggi#g uor! for !"e HPC2100. T"i 7o##e7!or i 6ou#!ed o# !o ide of !"e 9oard a "o3# i# figure1. JT# cables li3e SJT-S o& SJT-+ 7a# 9e 7o##e7!ed !o !"i 7o##e7!or, 3"ile o!"er e#d of !"e 7a9le 7a# 9e 7o##e7!ed !o PC COM or! or JSB or!, ree7!ively. )e9ugger of!3are (like !"e debugge& 9uil! i#!o S"#$M* allo3 GTA 9aed de9uggi#g. I! i alo oi9le !o ue !"ird ar!y GTA 9aed e6ula!or /de9ugger. T"e i#-ou! of GTA Co##e7!or i give# 9elo3
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 24 of 8%
STK-2148 Lab Manual
Pin
Signal name
Pin
Signal name
1 & 8 11 1& 18 1 1
&.&K P1.&1/NTRST P1.2'/T)I P1.&%/TMS P1.2/TC P1.2/RTC P1.2/T)O NRST N) N)
2 4 ' 1% 12 14 1 1' 2%
&.&K N) N) N) N) N) N) N) N) N)
J(
T"i i 2 i# dual li#e "eader. I! 9ri#g ou! I/O a#d 6o! of !"e i# of !"e HPC2100 6i7ro-7o#!roller. ur!"er, 8K a#d N) are alo 6ade availa9le o# !"ee 7o##e7!or. T"ee 7o##e7!or are i#!e#ded for ue !o 7o##e7! e0!er#al eri"eral.
T"e i#/ig#al de!ail of G are a 9elo3
Pin
Signal name
Pin
Signal name
1 & 8 11 1& 18 1 1 21 2& 28
P1.1 P1.1' P%.2' P%.&% P%.1% P%.12 P%.14 P%.1 P1.1' P1.28 P1.2& P1.21 + 8K
2 4 ' 1% 12 14 1 1' 2% 22 24 2
P1.1 P1.1 P%.2 P%.&1 P%.11 P%.1& P%.18 P%.1 P1.1 P1.24 P1.22 P1.2% N)
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 28 of 8%
STK-2148 Lab Manual
I. o6nloading and $unning +se& P&og&ams T"e HPC2100 6i7ro-7o#!roller i#7lude o#-7"i fla" for !ori#g uer rogra6 a#d #o#-vola!ile da!a. HPC214' o# ST-214' "ave 812By!e fla". T"i fla" i I#-Sy!e6-Progra66a9le (ISP*. T"erefore i! i oi9le !o do3#load uer rogra6 i#!o o#-7"i fla" of HPC214', !"roug" erial or! 7o##e7!ed !o PC. or doi#g o, a 7er!ai# oi!io# of S2 3i!7" i re=uired. S2 S6itch should be continuousl* , . T"i e7!io# de7ri9e "o3 !o ue !"e of!3are la" Magi7 !o do3#load rogra6 i#!o HPC214'.
I.1 o6 to install lash Magic( T"e C) you "ave re7eived 3i!" !"i 9oard 7o#!ai# SCARM, C Co6iler for ARM. I#!all i!. Af!er i#!alla!io# go !o folder "(=S"#$M=+tilities . T"i folder 7o#!ai# 8 i file. I#!all la" Magi7 fro6 la"Magi7&.1.i. >0!ra7! !"e lashMagicD.'1.9i) a#d !"e# ru# la"Magi7.e0e fro6 !"e e0!ra7!ed file. (If you "ave 3ro#g verio# of la" Magi7 already i#!alled, !"e# leae u#i#!all i! fir! a#d !"e# i#!all #e3 verio#*.
I.2 o6nload and $un )&og&am using lash Magic into LP"2148( •
Af!er i#!alla!io# of la" Magi7, oe# i!.
•
I# la" Magi7 go !o O!io# -V Adva#7ed O!io#-V Co66u#i7a!io#. C"e7k :ig" Seed Co66u#i7a!io# a#d kee Ma0i6u6 Baud Ra!e a 12%%. Cli7k o# O.
•
Agai# i# la" Magi7 go !o O!io# -V Adva#7ed O!io#-V :ard3are Co#fig. ;Je )TR a#d RTS !o 7o#!rol RST a#d P%.14< o!io# "ould 9e 7"e7ked. Cli7k o# O. (Af!er doi#g a9ove 6e#!io#ed e!!i#g, la" Magi7 !ore i! 6ea# for !"e #e0! !i6e 5u! verify if !"ee e!!i#g are roer or #o!. If !"ey are roer !"e# you 7a# dire7!ly follo3 9elo3 6e#!io#ed ro7edure*
1. Co##e7! !"e G2/JART% 7o##e7!or of ST-214' 9oard !o COM1 or COM2 of a PC, ui#g !"e erial 7o66u#i7a!io# 7a9le (ulied 3i!" !"e 9oard*. 2. ee S2 3i!7" i# ON oi!io#. (ou 7a# kee S2 3i!7" 7o#!i#uouly ON* S3i!7" ON o3er !o !"e ST-214'.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 2 of 8%
STK-2148 Lab Manual
&. )o roer e!!i#g i# la" Magi7 (COM Por! COM1 (if o!"er 7"ooe i!*, Baud Ra!e &'4%%, )evi7e HPC214', I#!erfa7e No#e (ISP*, >#a9le ;>rae 9lo7k ued 9y :e0 ilee&i%*ing co&&ect cable connection( @"e# !"e GTA Ca9le i 7orre7!ly 7o##e7!ed !o PC a 3ell a !"e !arge! 9oard, i! erve a a li#k 9e!3ee# !"e GTA or! of !arge! ro7eor a#d !"e PC. T"i li#k i ued 9y SPG - SCARM of!3are Tool (e.g. )e9ugger for ARM 6i7ro7o#!roller*. T"i of!3are !ool, )e9ugger 3ill 3ork 7orre7!ly o#ly 3"e# !"e GTA Ca9le i 7o##e7!ed 7orre7!ly.
o& SJT-S(
T"ere i a 7rude !e! !o verify SGT-S GTA Ca9le 7o##e7!io#. ou 6ay leae follo3 !"ee !e 1. Co##e7! GTA Ca9le 9e!3ee# PC COM or! a#d GTA 7o##e7!or o# ST-214', a er i#!ru7!io# i# !"i 6a#ual. 2. Tur# ON o3er !o !"e !arge! 9oard. &. O# !"e PC, ru# SPGTer6i#al of!3are. 4. I# !"e Por! Se!!i#g, ele7! aroria!e COM or! (!o 3"i7" !"e GTA 7a9le i 7o##e7!ed*. Sele7! 1182%% 9aud, #o ari!y, ' 9i! er 7"ar, 1 !o 9i! a#d #o flo3 7o#!rol. 8. Oe# !"e COM Por! 7o##e7!io#. . Tye 7"ara7!er DKE i# !"e !er6i#al 3i#do3. i.e. e#d !"e 7"ara7!er DKE !o !"e PC COM or!. . If !"e GTA Ca9le 7o##e7!io# i 7orre7!, i! 3ill e#d verio# of GTA 7a9le. A a reul!, you 3ill ee !"a! verio# aeari#g i# !"e !er6i#al 3i#do3. T"i i#di7a!e !"a! GTA Ca9le 7o##e7!io# i O. '. If you do#E! ee a#y 7"ara7!er i# !"e !er6i#al 3i#do3, ro9a9ly !"e GTA Ca9le i #o! 7o##e7!ed aroria!ely.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 2 of 8%
STK-2148 Lab Manual
. o6 to ebug P&og&am(
1. Co##e7! SGT-S a 6e#!io#ed a9ove. 2. Oe# ro5e7! i# SI)>ARM. Re9uild i!. &. )o3#load !"e a6e 7ode i# !"e !arge! 9oard. 4. I# SI)>ARM go !o Tool -V )e9ugger. 8. I# )e9ugger go !o Ru# -V Cli7k o# ;No! 7o##e7!ed !o !arge! (7li7k "ere !o 7o##e7!*0%1Ari!"6e!i7
GTA
"onnections( To ue SGT-S, GTA 7a9le Refer C"a!er P&ocedu&e( T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e>0%1Ari!"6e!i7
To >di! / Co6ile/ e#era!e :e0 file Refer C"a!er 2 To do3#load a#d ru# !"i rogra6 Refer C"a!er 8 ,ut)ut( Ari!"6e!i7 oera!io# are erfor6ed o# !"e ARM 7ore regi!er. To ee !"e reul! of oera!io# ue )e9ugger. Refer C"a!er .
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page &1 of 8%
STK-2148 Lab Manual
'.2 &ite a )&og&am %o& igital ,ut)ut. #im( @ri!e a Progra6 !o Bli#k H>) ree#! o# ST-214'. Eui)ments( SCARM, PC, ST-214'. loc3 iag&am( G2/JART% G2
ST-214' ' e#eral Puroe H>)
PC Serial Ca9le Sou&ce "ode( T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e>0%2Bli#k
"onnections( ee S1&.2 3i!7" i# ON oi!io#. ' H>) () !o )1* ree#! o# ST-214' are 7o##e7!ed !o P%.1%, P%.11, P%.12, P%.1&, P%.1', P%.1, P%.2% a#d P%.21 ree7!ively 9y Co66o# A#ode 6e!"od. P&ocedu&e( T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e>0%2Bli#k
To >di! / Co6ile/ e#era!e :e0 file Refer C"a!er 2 . To do3#load a#d ru# !"i rogra6 Refer C"a!er 8. ,ut)ut( ou 7a# ee 9li#ki#g of H>). ote ee S1&.2 3i!7" i# O oi!io# !o ave o3er, af!er e0e7u!io# of rogra6.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page &2 of 8%
STK-2148 Lab Manual
'.D &ite a )&og&am %o& igital !n)ut. #im( @ri!e a rogra6 !o !ake i#u! fro6 u"-9u!!o# 3i!7"e S@1 !o S@' (7o##e7!ed fro6 P1.1 !o P1.2&* a#d "o3 i! !a!u o# 7orreo#di#g H>) ) !o )1 ree#! o# ST-214'. Eui)ments( SCARM, PC, ST-214'. loc3 iag&am( G2/JART% G2
ST-214' ' e#eral Puroe H>) a#d 3i!7"e
PC Serial Ca9le Sou&ce "ode( T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e>0%&)igi!alI#u!
"onnections( ee S1&.2 3i!7" i# ON oi!io#. Pu"-9u!!o# 3i!7"e S@1 !o S@' are 7o##e7!ed fro6 P1.1 !o P1.2&. H>) ) !o )12 are 7o##e7!ed !o P%.1% !o P%.1& a#d )1& !o )1 are 7o##e7!ed fro6 P%.1' !o P%.21. P&ocedu&e( T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >0%&)igi!alI#u!
To >di! / Co6ile/ e#era!e :e0 file Refer C"a!er 2 . To do3#load a#d ru# !"i rogra6 Refer C"a!er 8. ,ut)ut( Af!er rei#g a#y 3i!7" fro6 S@1 !o S@', i! 7orreo#di#g H>) () !o )1* 3ill 9e7o6e ON o!"er3ie i! 3ill 9e O. ote ee S1&.2 3i!7" i# O oi!io# !o ave o3er, af!er e0e7u!io# of rogra6.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page && of 8%
STK-2148 Lab Manual
'.4 &ite a )&og&am %o& u99e& !nte&%ace. #im( @ri!e a rogra6 for 9uer i#!erfa7e. Eui)ments( SCARM, PC, ST-214'. loc3 iag&am( G2/JART% G2
ST-214' PC Buzzer
Serial Ca9le
Sou&ce "ode(
T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e>0%4Buer "onnections(
ee S.1 3i!7" i# ON oi!io#. Buer i 7o##e7!ed !o P%.28. P&ocedu&e(
T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e>0%4Buer To >di! / Co6ile/ e#era!e :e0 file Refer C"a!er 2 . To do3#load a#d ru# !"i rogra6 Refer C"a!er 8. ,ut)ut(
Buer 3ill !ur# ON a#d O. ote ee S.1 3i!7" i# O oi!io#, af!er e0e7u!io# of rogra6.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page &4 of 8%
STK-2148 Lab Manual
'.I &ite a )&og&am %o& $ela* !nte&%ace. #im( @ri!e a rogra6 !o i#!erfa7e 2 relay 3i!" HPC214'. Eui)ments( SCARM, PC, ST-214'. loc3 iag&am( G2/JART% G2
RH2
PC
ST-214'
RH1
Serial Ca9le
Sou&ce "ode(
T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >0%8Relay
"onnections(
ee S1&.2 3i!7" i# ON oi!io# !o ee relay 7o#di!io# (ON or O* o# H>) ()1& !o )14*. ee S12 3i!7" i# ON oi!io#. S12.1 i 7o##e7!ed !o RH1 a#d S12.2 i 7o##e7!ed !o RH2. RH1 a#d RH2 are 7o##e7!ed !o P%.1' a#d P%.1 ree7!ively !"roug" H>) )1& a#d )14.
P&ocedu&e(
T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >0%8Relay
To >di! / Co6ile/ e#era!e :e0 file Refer C"a!er 2 . To do3#load a#d ru# !"i rogra6 Refer C"a!er 8.
,ut)ut(
Relay 3ill 9e7o6e ON a#d O 7o#!i#uouly.
ote ee S1&.2 a#d S12 3i!7"e i# O oi!io#, af!er e0e7u!io# of rogra6.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page &8 of 8%
STK-2148 Lab Manual
'. &ite a )&og&am %o& Ste))e& Moto& !nte&%ace. #im( @ri!e a rogra6 !o i#!erfa7e !eer 6o!or. Eui)ments( SCARM, PC, ST-214' 3i!" S!eer Mo!or. loc3 iag&am( G2/JART% G2
ST-214' S!eer Mo!or )river
PC
/
Serial Ca9le Sou&ce "ode(
T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >0%S!eerMo!or "onnections(
Co##e7! S!eer Mo!or !o 7o##e7!or. ee S1&.2 3i!7" i# ON oi!io# !o ee !eer 6o!or "ae o# H>) () !o )12*. ee S11 3i!7" i# ON oi!io#. S!eer Mo!or i #o3 7o##e7!ed !o P%.1%, P%.11, P%.12 a#d P%.1& !"roug" H>) ) !o )12. P&ocedu&e(
T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >0%S!eerMo!or To >di! / Co6ile/ e#era!e :e0 file Refer C"a!er 2 . To do3#load a#d ru# !"i rogra6 Refer C"a!er 8. ,ut)ut(
ou 7a# ee !eer 6o!or 6ovi#g i# a ar!i7ular dire7!io# a#d 7orreo#di#g "ae 7"a#ge you 7a# o9erve o# H>) ) !o )12. ote ee S1&.2 a#d S11 3i!7"e i# O oi!io# !o ave o3er, af!er e0e7u!io# of rogra6.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page & of 8%
STK-2148 Lab Manual
'.' !nte&%acing o% 1:2 Te:t L". #im( @ri!e a rogra6 !o dilay 6eage o# 102 Te0! HC). Eui)ments( SCARM, PC, ST-214' 3i!" 102 Te0! HC). loc3 iag&am( G2/JART% G2
102 Te0! HC)
PC ST-214' Serial Ca9le
Sou&ce "ode(
T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >0%:elloHC)
P&ocedu&e(
T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >0%:elloHC)
To >di! / Co6ile/ e#era!e :e0 file Refer C"a!er 2 . To do3#load a#d ru# !"i rogra6 Refer C"a!er 8.
,ut)ut(
ou 7a# ee !"e 6eage ello o&ld o# HC). If re=uired Ree! !"e 9oard.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page & of 8%
STK-2148 Lab Manual
'.8 &ite a )&og&am %o& Se&ial "ommunication using +#$TN. #im( @ri!e a Progra6 !o !ra#fer 6aage ;:ello 3orldW< erially a! 12%%-9aud ra!e '-9i! da!a a#d 1 !o-9i! ui#g JART%. Eui)ments( SCARM, PC, ST-214'. loc3 iag&am( G2/JART% G2
ST-214' PC Serial Ca9le Sou&ce "ode( T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >0%':ello "onnections( Co##e7! PC erial or! !o G2/JART% 7o##e7!or o# ST-214' 9y !"e 7a9le rovided !o you 3i!" ST214'. P&ocedu&e( T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >0%':ello
To >di! / Co6ile/ e#era!e :e0 file Refer C"a!er 2 . To do3#load a#d ru# !"i rogra6 Refer C"a!er 8. ,ut)ut( ou 7a# ee ou!u! o# SPGTer6i#al. T"erefore Oe# SPGTer6i#al. o !o Por! -V Se!!i#g. )o roer e!!i#g (Baud Ra!e 12%%, )a!a Bi! ', S!o Bi! 1, >7"o Off, Pari!y No#e, Co6 Por! Co6 1 (if o!"er 7"ooe i!**. Cli7k o# O. o !o Por! -V Oe#. If re=uired Ree! !"e ST-214' 9oard. I! 3ill !ra#6i! !"e 6eage X:ello 3orldW0%404Ma!ri0eyad
To >di! / Co6ile/ e#era!e :e0 file Refer C"a!er 2 . To do3#load a#d ru# !"i rogra6 Refer C"a!er 8. ,ut)ut( I# !"i rogra6 af!er rei#g a#y key fro6 S@ !o S@24, i! 7ode 3ill 9e dilayed o# 102 Te0! HC).
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page & of 8%
STK-2148 Lab Manual
'.1N &ite a )&og&am %o& on-chi) #nalog to igital "onve&sion. #im( @ri!e a rogra6 for o#-7"i A)C (A)C %, C"a##el 1, P%.2'*. Eui)ments( SCARM, PC, ST-214'. loc3 iag&am( G2/JART% G2
ST-214' A#alog I#u!
PC Serial Ca9le Sou&ce "ode( T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >01%A)C
"onnections( To give a#alog i#u! fro6 Po!e#!io6e!er R2% ree#! i# A#alog I#u! regio# o# ST-214' kee S4.1 i# ON oi!io#. To give e0!er#al a#alog i#u!, kee S4.1 i# O oi!io# a#d 7o##e7! e0!er#al a#alog i#u! !o i# 1 of AIN>T 7o##e7!or. A#alog i#u! ra#ge i fro6 % !o &.&K. P&ocedu&e( T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >01%A)C
To >di! / Co6ile/ e#era!e :e0 file Refer C"a!er 2 . To do3#load a#d ru# !"i rogra6 Refer C"a!er 8. ,ut)ut( ou 7a# ee digi!al readi#g of !"e 7orreo#di#g a#alog i#u! o# 102 Te0! HC). ote ee S4.1 3i!7" i# O oi!io#, af!er e0e7u!io# of rogra6.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 4% of 8%
STK-2148 Lab Manual
'.11 &ite a )&og&am %o& LMDI Tem)e&atu&e Senso& !nte&%ace. #im( @ri!e a rogra6 !o i#!erfa7e of HM&8 !e6era!ure e#or !o o#-7"i A)C (A)C %, C"a##el 2, P%.2*. Eui)ments( SCARM, PC, ST-214'. loc3 iag&am( G2/JART% G2
ST-214' A#alog I#u!
PC Serial Ca9le Sou&ce "ode( T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >011HM&8Te6era!ureSe#or
"onnections( To i#!erfa7e HM&8 (ree#! i# A#alog I#u! regio# o# ST-214'* 3i!" A)%.2 kee S4.2 i# ON oi!io#. P&ocedu&e( T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e>011HM&8Te6era!ureSe#or
To >di! / Co6ile/ e#era!e :e0 file Refer C"a!er 2 . To do3#load a#d ru# !"i rogra6 Refer C"a!er 8. ,ut)ut( ou 7a# ee !"e !e6era!ure readi#g o# 102 Te0! HC). ote ee S4.2 3i!7" i# O oi!io#, af!er e0e7u!io# of rogra6.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 41 of 8%
STK-2148 Lab Manual
'.12 ene&ation o% $am) 6ave using on-chi) #". #im( @ri!e a rogra6 !o ge#era!e ra6 3ave ui#g o#-7"i )AC (P%.28*. Eui)ments( SCARM, PC, ST-214', O7illo7oe. loc3 iag&am( G2/JART% G2
ST-214' + O7illo7oe PC S TP
Serial Ca9le Sou&ce "ode(
T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e)AC
"onnections(
ee S.2 (ree#! i# >T. INT regio#* i# ON oi!io#. Co##e7! o#e i# of o7illo7oe !o TP/)AC a#d a#o!"er !o N).
P&ocedu&e(
T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e)AC
To >di! / Co6ile/ e#era!e :e0 file Refer C"a!er 2 . To do3#load a#d ru# !"i rogra6 Refer C"a!er 8.
,ut)ut(
ou 7a# ee ra6 3ave o# o7illo7oe.
ote ee S.2 3i!7" i# O oi!io#, af!er e0e7u!io# of rogra6.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 42 of 8%
STK-2148 Lab Manual
'.1D &ite a )&og&am %o& !2" based Seven Segment LE is)la* !nte&%ace. #im( @ri!e a rogra6 !o dilay #u69er o# eg6e#! dilay ui#g I2C ro!o7ol. Eui)ments( SCARM, PC, ST-214'. loc3 iag&am( G2/JART% G2
ST-214' )IS2 PC
Sou&ce "ode(
Serial Ca9le )IS1
T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e>01&I2CSeve#Seg6e#!
"onnections(
ee S8 3i!7" (ree#! i# I2C Peri"eral regio#* i# ON oi!io#.
P&ocedu&e(
T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >01&I2CSeve#Seg6e#!
To >di! / Co6ile/ e#era!e :e0 file Refer C"a!er 2 . To do3#load a#d ru# !"i rogra6 Refer C"a!er 8.
,ut)ut(
ou 7a# ee a#d 2 #u69er o# Seve# Seg6e#!.
ote ee S8 3i!7" i# O oi!io#, af!er e0e7u!io# of rogra6.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 4& of 8%
STK-2148 Lab Manual
'.14 &ite a )&og&am %o& !2" based EEP$,M !nte&%ace. #im( @ri!e a rogra6 !o i#!erfa7e >>PROM ui#g I2C ro!o7ol. Eui)ments( SCARM, PC, ST-214'. loc3 iag&am( G2/JART% G2
ST-214' I2C
PC Serial Ca9le Sou&ce "ode( T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >014I2C>>PROM "onnections( ee S8 3i!7" (ree#! i# I2C Peri"eral regio#* i# ON oi!io#. P&ocedu&e( T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >014I2C>>PROM
To >di! / Co6ile/ e#era!e :e0 file Refer C"a!er 2 . To do3#load a#d ru# !"i rogra6 Refer C"a!er 8. ,ut)ut( ou 7a# ee ou!u! o# SPGTer6i#al. T"erefore Oe# SPGTer6i#al. o !o Por! -V Se!!i#g. )o roer e!!i#g (Baud Ra!e 12%%, )a!a Bi! ', S!o Bi! 1, >7"o Off, Pari!y No#e, Co6 Por! Co6 1 (if o!"er 7"ooe i!**. Cli7k o# O. o !o Por! -V Oe#. If re=uired Ree! !"e ST-214' 9oard. ir! da!a 3ill 9e 3ri!!e# i# >>PROM a#d !"e# i! 3ill 9e read fro6 >>PROM. T"e a6e da!a (%, 1, 2 a#d &* 3ill 9e dilayed o# SPGTer6i#al. ote ee S8 3i!7" i# O oi!io#, af!er e0e7u!io# of rogra6.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 44 of 8%
STK-2148 Lab Manual
'.1I &ite a )&og&am %o& !2" based $T" !nte&%ace. #im( @ri!e a rogra6 !o i#!erfa7e )S1&% RTC ui#g I2C ro!o7ol. Eui)ments( SCARM, PC, ST-214'. loc3 iag&am( G2/JART% G2
ST-214' I2C
PC Serial Ca9le Sou&ce "ode( T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >018I2CRTC "onnections( ee S8 3i!7" (ree#! i# I2C Peri"eral regio#* i# ON oi!io#. P&ocedu&e( T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >018I2CRTC
To >di! / Co6ile/ e#era!e :e0 file Refer C"a!er 2 . To do3#load a#d ru# !"i rogra6 Refer C"a!er 8. ,ut)ut( ou 7a# ee da!e a#d !i6e o# 102 Te0! HC). Alo you 7a# ee ou!u! o# SPGTer6i#al. T"erefore Oe# SPGTer6i#al. o !o Por! -V Se!!i#g. )o roer e!!i#g (Baud Ra!e 12%%, )a!a Bi! ', S!o Bi! 1, >7"o Off, Pari!y No#e, Co6 Por! Co6 1 (if o!"er 7"ooe i!**. Cli7k o# O. o !o Por! -V Oe#. If re=uired Ree! !"e ST-214' 9oard. To S>T RTC follo3 !"e !e dilayed o# SPGTer6i#al o!"er3ie 3ai! for 8 e7o#d, da!e a#d !i6e 3ill 9e dilayed 7o#!i#uouly o# SPGTer6i#al. ote ee S8 3i!7" i# O oi!io#, af!er e0e7u!io# of rogra6.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 48 of 8%
STK-2148 Lab Manual
'.1 &ite a )&og&am %o& SP! based EEP$,M !nte&%ace. #im( @ri!e a rogra6 !o i#!erfa7e >>PROM ui#g SPI ro!o7ol. Eui)ments( SCARM, PC, ST-214'. loc3 iag&am( G2/JART% G2
ST-214' PC SPI
Serial Ca9le Sou&ce "ode( T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >01SPI>>PROM "onnections( ee S 3i!7" (ree#! i# SPI >>PROM regio#* i# ON oi!io#. P&ocedu&e( T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >01SPI>>PROM
To >di! / Co6ile/ e#era!e :e0 file Refer C"a!er 2 . To do3#load a#d ru# !"i rogra6 Refer C"a!er 8. ,ut)ut( ou 7a# ee ou!u! o# SPGTer6i#al. T"erefore Oe# SPGTer6i#al. o !o Por! -V Se!!i#g. )o roer e!!i#g (Baud Ra!e 12%%, )a!a Bi! ', S!o Bi! 1, >7"o Off, Pari!y No#e, Co6 Por! Co6 1 (if o!"er 7"ooe i!**. Cli7k o# O. o !o Por! -V Oe#. If re=uired Ree! !"e ST-214' 9oard. ir! da!a 3ill 9e 3ri!!e# i# >>PROM a#d !"e# i! 3ill 9e read fro6 >>PROM. T"e a6e da!a (:ello* 3ill 9e dilayed o# SPGTer6i#al. ote ee S 3i!7" i# O oi!io#, af!er e0e7u!io# of rogra6.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 4 of 8%
STK-2148 Lab Manual
'.1' &ite a )&og&am %o& E:te&nal !nte&&u)t. #im( @ri!e a rogra6 !o oera!e H>) ui#g u"-9u!!o# key 7o##e7!ed !o e0!er#al i#!erru! >INT% (P%.1* of HPC214'. Eui)ments( SCARM, PC, ST-214'. loc3 iag&am( G2/JART% G2
ST-214' PC
>0!. INT
Serial Ca9le Sou&ce "ode(
T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >01>INT% "onnections(
To 7o##e7! S@28 3i!7" (ree#! i# >T. INT regio#* !o >INT%/P%.1 of HPC214', kee S.& (ree#! i# >T. INT regio#* i# ON oi!io#. P&ocedu&e(
T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >01>INT% To >di! / Co6ile/ e#era!e :e0 file Refer C"a!er 2 . To do3#load a#d ru# !"i rogra6 Refer C"a!er 8. ,ut)ut(
>INT% i 7o#figured a Ho3-a7!ive, Hevel Se#i!ive. T"erefore if S@28 3i!7" i reed !"e# )1/PM H>) 3ill glo3 for !"a! 6u7" of !i6e o#ly. ote ee S.& 3i!7" i# O oi!io#, af!er e0e7u!io# of rogra6.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 4 of 8%
STK-2148 Lab Manual
'.18 &ite a )&og&am %o& 128:4 &a)hics L" !nte&%ace. #im( @ri!e a rogra6 !o i#!erfa7e 12'04 ra"i7 HC). Eui)ments( SCARM, PC, ST-214'. loc3 iag&am( G2/JART% G2
PC
12'04 ra"i7 HC)
ST-214' Serial Ca9le
Sou&ce "ode(
T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >01'ra"i7HC)
"onnections(
ee S1&.1 3i!7" i# ON oi!io# !o e#a9le ra"i7 HC).
P&ocedu&e(
T"i rogra6 i availa9le i# !"e C) a! ST-214'Sour7e >01'ra"i7HC)
To >di! / Co6ile/ e#era!e :e0 file Refer C"a!er 2 . To do3#load a#d ru# !"i rogra6 Refer C"a!er 8.
,ut)ut(
or o6e !i6e, 6eage 3ill 9e dilayed o# ra"i7 HC). Af!er 6eage =uare 3ave 3ill aear o# ra"i7 HC).
ote ee S1&.1 3i!7" i# O oi!io# !o ave o3er, af!er e0e7u!io# of rogra6.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 4' of 8%
STK-2148 Lab Manual
8. E:)e&iments based on G"@,S-!! $T,S 8.1 !m)lement Multitas3ing 6ith T6o se)a&ate LE blin3ing tas3s. #im( @ri!e a rogra6 for 6ul!i!aki#g, !o 9li#k 2 H>) () (7o##e7!ed !o P%.1%* a#d )1% (7o##e7!ed !o P%.11** i# 2 eara!e !ak. Eui)ments( SCARM, PC, ST-214'. loc3 iag&am( G2/JART% G2
ST-214' PC Serial Ca9le Sou&ce "ode( u",S )&og&ams a&e available at STK-2148=Sou&ce=u",S-!! Paste all these )&og&ams on " d&ive.
No3 !"i 6ul!i!aki#g rogra6 i availa9le a! CMul!i!aki#gH>) (6ai#.P81* "onnections(
ee S1&.2 3i!7" i# ON oi!io#. T"i rogra6 i 3ri!!e# !o 9li#k 2 H>), ) a#d )1% 7o##e7!ed !o P%.1% a#d P%.11. P&ocedu&e(
No3 !"i rogra6 i availa9le a! CMul!i!aki#gH>) (6ai#.P81* To >di! / Co6ile/ e#era!e :e0 file Refer Se7!io# 2.4 To do3#load a#d ru# !"i rogra6 Refer C"a!er 8 ,ut)ut(
ou 7a# ee H>) 9li#ki#g () a#d )1%*. ote ee S1&.2 3i!7" i# O oi!io# !o ave o3er, af!er e0e7u!io# of rogra6.
© SPJETPL
All Rights Reserved. (www.spjsystems.com)
Page 4 of 8%
View more...
Comments