LEGO MINDSTORMS NXT Hardware Developer Kit.pdf - Google Drive

1 downloads 117 Views 2MB Size Report
There was a problem loading this page. Retrying... Whoops! There was a problem previewing this document. Retrying... Dow
+ "

!" # ©%&&'

$

$ $(

(

)

" "

!"

" #

"

(

(

"*

, -*&&

+ "

, -*&&

TABLE OF CONTENTS ......................................................................................................2 HARDWARE SPECIFICATION FOR THE NXT BRICK......................................................3 NXT TECHNICAL OVERVIEW............................................................................................4 OUTPUT PORTS.................................................................................................................5 INPUT PORTS.....................................................................................................................6 Active sensorS ............................................................................................................................................................... 7 Passive sensorS.............................................................................................................................................................. 7 Digital sensors ............................................................................................................................................................... 7 High-speed communication port ................................................................................................................................. 8

I2C COMMUNICATION........................................................................................................9 Device memory arrangement..................................................................................................................................... 10

DISPLAY ...........................................................................................................................11 BLUETOOTH® ...................................................................................................................12 Bluetooth® functionality within the NXT Brick ....................................................................................................... 12 Interfacing with the BlueCoreTM chip....................................................................................................................... 13 UART interface between the ARM7 and the BlueCore chip.................................................................................... 14

SOUND..............................................................................................................................15 DEBUGGING INFORMATION ..........................................................................................16 Interfacing with the ARM7 microcontroller ............................................................................................................ 16 Interfacing with the AVR microcontroller ............................................................................................................... 17 Firmware requirements: ............................................................................................................................................ 17

AVR TO ARM COMMUNICATION ....................................................................................18 ,

Figure 5: Bitmapping within the display (

( • • • • • •

. %&&'

" 3

( #(

"#

"

,

8 +

, ( "( "$

9

, ,

)

8

$

=+ >, =+ 8 >,

), -&& 5 '0 " A9 " # ( ' H( (! -A'6 $ ) ()( -AD 1 " /*&+ D*&+ = ( ( 1 ( " "" ( 7$ ( " ( 1 ( 8 $ ( 9 ( "$ 9 " " $ # "1 1 (!" $" # 1 1 (!" $ 5 ($ * 7$ ( ) "1 " 7$ ( ( $ ( $ " ( # 5 ) -&

1)

($

8 ( "

"

#

#

7$

7$ 8 "

)

"1 " * 1 (! ( $ ( $" 9 # = 9 9 >* H" "" 1 "" ( $ ( " $( ( "$ 8 "" ( ( "*

0 1$ $" (

$ 2

" ( 1)

$" "

&

#$ (

)

" " 1 (!" ( $ ( ( $ ( ( )

$

#

) !*

1 (! " " $ " ! " #$ ( * # $ 1

" " "

A"

( $

" "

$ (

(

(

*

( "(

Figure 6: NXTs communicating using Bluetooth® 4" " "

# $

1 " # "

*

" " 4 ( $" 8 ( ( #

. %&&'

( )( "( "

1 ( $ ( $ (

( #

"

$

7$ " $

( "

$

(

/" " " ( "

$

/* " "

1 1

" " $" $ (

#

#$ (

(

$

" ( "

"1 ( "*

7$ 7$

( "

(

$ (

$

"

( " (($ $ ( * 8 =* * "

"

$

(

(

( & " "

"* )" $" > "

"

1 ( $"

"# $ ( 1) " ( ( "*

"- %

( ( " /

"( $

$"

-%

+ "

# 7$

!

#$ (

) " 1 3 4 )* $ " #2( 7$ 1) 8 ( 7 $ 1* 7 $ # 7$ 8 $ " $ " # ( ( " (

5

7$ (

?

1* " 1 ( "" *

7$

(

$" " ( # 8 * 4 -'21 " " $" * 4( " ( $

(

7$ 8 0 ( "" ) ( "" $ " 7$ " (! $" " /*% # 1 + 2 "! $" " + E4 #( # 4 ;

(

8

"

+ " #$ #1 7$ 9 9 24 9 9 27 # "* 9 9 24 $" ( 7$ 8 " ( ( = 4 ( > 9 9 27 # $" 7$ ( " ( ( = 4+ ( >* 7$ 8 $" " # " F" 2 G 5( # NO %%& 1 $ # ( ( " 1 " * : 7$ 8 " F" 2 G " F( 2 G ( " $" + ( 7$ 8 1) 5 " 7$ #$ ( ) * ( $ ( ) E4 ($ " "( 1) #( " " =4 ;P 8 C 78 0P 8 >* 3 7$ 8

"( (

# $ #$ (

"

# ( 5 ?*

4

1 " " ) " 5 1 "( (" #

, -*&&

$ (

#( 1 # $ 1 (!*

(

4

$"

;

*> 3

1

4

( "" "(

;

7$ 8 #

# " " " ( :

"

(

( ""

( * = " ) $ "

Figure 7: Interface between the ARM7 processor and the BlueCore chip 9

#(

" 1 (!*

# " 78 028 "

. %&&'

" $" ,

( 4

" #

"" 1 9 $

) #$ #( 2

7$ 8

7$ 8

( "

""

B

( 4

(

; "

*

"

( ) (

$"

) " 1 )

7$ 7$ 8

$ 1 (!* #$ ( 5

)*

("

;*

$

-/

4

;28 , 7$ 8

E4

( 4

#

; '

(

9 3

$ ( " $" ( "" * *1 0

$ ( 1 ", ), 1 , ( ,

. %&&'

4

;

7$ 8

"

(

)

4

; 5

, -*&&

("

"

*

E4 " 2$ =1 8

#

+ "

#

#

1

' /

"

7$ 8 2

"

,

(

2 ' (

"

/

3 B

(

"

1

7$ 8

( >,

$ (

4

; $"

#

1 A" )1 " 1 "

$

$ (

1/ #

2

0'&*? ?1 "

(

! "

"=

C 8

>

-0

+ "

, -*&&

# 1 (! ( $ " " $ $ $ " 9: $ $ " $( 1 # #

" $

" $ $ E 9 E

" $ !

## #

"

($

(

( "(

-'

" " $ $

3 @ $ () 00& B 0 B

2" " $ 1 $

"$

" $ 4 ; "

1)

$(

= 9 M&&/&4> " # %&* 3 *

5

$ "

#

($ 8$ -&% ;?

# ( " $

! "

# #

@$ *

)* #

"

*

E 9 E "

# %##

) (

$ $ ( ( "

* # @$

( "

1 1 ( "*

#

"

"

"$ 4

9 -'D D;

:

Figure 8: Schematic for sound output within the NXT

. %&&'

$

-6

+ "

, -*&&

# "" ( Q 4

1 #) # ( "* =

"( 1 "

$" " ( ,:

#( " " ""

" : "(

#$ (

)*

(

( "" 4+

#

"

B

(

" #

1 (! " ( ( 4A ( "

(

(

"

$" " $"

)#

*>

)# (

1 ( $" ( (( #$ ) 1 #

( 1

" 1

4 " (

* " ""

1

) * ; 2 ( *

( "" #$ ( Q 4

$" 1 (

(

#$ "*

" ) ! ( #(

"" $ )

$" 2"

( #(

4

4+

9: ;

2 ( ( ( "" ) $ =" $" Q 4 Q2

(

" $ -*%;

4 ; ( "" ! ( ( $( * # ( > $" 1 $

1 1 #(

# $ 4

; 1$

1 (! 1 $ 9 8 74 " ( " ( "" -&2 ( ( ( ( #

* (

=Q-;>

"

#

"(

(

) $,

Figure 9: Hardware schematic for interfacing with the ARM7 microcontroller

. %&&'

$

-'

+ "

, -*&&

" (

(

" (

! $ -*%;

$"

( >

$( * $" 1

4+ (

"

( "" 1

1

# 1 (! 1 $ 9 8 74 " ( " ( "" ?2 ( ( ( ( #

$

#

#(

4+ 1$

$

( "" ) $ =" Q 4

*

Figure 10: Hardware schematic for interfacing with the AVR microcontroller

4# " $ # " $ R @$ 3

$ ")"

5 # $ #$ (

" "

$" " " ( ( * 4" " $ " " @$ ( ( " ( "" " H" 1 (! 6 $ " #" 2$ ,

ST58 8 SS "

U" "

1

"

( "" " ( )* " ( # " (

" 1$ " @$ ( 4 #

5

=(>

#

"

1

"

@$ " $" *

@$ 1) *

")" "1 ; ""

)" $

" # " 1 ( $" $

"(

" "" (

1) (

( "" 4+

( $" ( (

1

4+ $( # $ ## # %8 (

1 "( 1

"$" * 4 ; $ (

4A S 4+ ,

K&58 8 &508 &5'6 &5;0 &5%; &5;/ &5%& &5;/ &5'- &5' &5'% &5'- &5%& &5' &5;? &5;0 &5%& &5'- &5;% &5' &5%& &5'D &5' &5%& &5'- &5;% &5' &5%8 &5%& &5%? &5'/ &5%D &508 &506 &50; &503 &5%& &56/ &5;D &5; / &5;0 &5'6 &5' &5%& &50- &5%3 &56/L

. %&&'

$

-;

+ "

"

, -*&&

# #( 1 %8 (

(

(

4 ; ( ( $ ( ( 1 $ " " "" $ " # ( "" $ ( "*

" ( ( * ( (

)%

"!" # " 4

"" ;

7 ( $" (

4+ 4+

(

(

(

# %8 (

(

( ( 4A ( ( (

#

" $ (

4+ 4 )# ) $ (

(

;

( (

4+ (

(

" ( ( $

"

$ ( 1

/?& 1 A" $"

( "

#

$

$ @$

4 ; " $ * 3

$" 1 1 #( 1 ( ( %8 #(

*

" $( #$ (

( ( #$

9: " "( ( (

"* : ) #

( " "

4+ 4

;( "

#

$

$ "

"

"#

# $ $" ) $ *

) #$ ( 4

" " 4 D- 4 ; %6'

*

2 typedef { UBYTE UBYTE SBYTE UBYTE UBYTE }IOTOAVR; 9

struct Power; PwmFreq; PwmValue[NOS_OF_AVR_OUTPUTS]; OutputMode; InputPower; 8

1) (

9

3

@

"

" $" $ (

9:

+ $ $ #$ $

$

" "1

$9

: "

$

: &5&&* ""

. %&&'

" $ 4*

# "

# @ $ () $" , - V /% B* E

# 9

$ " 1)

1) "

# # 2-&& ( (! " *

( ( $ $ $ !

$

1 9:

"

$ $ I-&&

"

4+

(

( 9

"

( $"

4+

# $

1$

$

1) ##

"

$ 1 1 (!

1

"

"$ / ""

&564 ! $

$

( $" " ? )

( (!

!1

)

#(

"

9:

)* $ " - 1 0

" ##

" $(

*

$ $ "* #

#" 2-&& " #$

#

"

$ *

# "

$*

" $" # D+ " 1 # " 1 & - "" " & 1 % 1 ' ; " " " /* &, D+ " ## -, D+ " $ "" "$ " " = %, D+ " )" ( 1

B

B*

( 1 "# *

&5&-

"

"( 1 9 F

B*

" I-&& "

$ " "* &5&&

"( # $ 6 "" " %

( /

"

>

1 3 @ " ( G1$

(! * $

"

1 "

"

*

$

-?

+ "

: 1 "

. %&&'

# " #$ ( ) ( $" 4 ; ( "" " " " #

$

1 (! " ( # " $ 1 " &546 # $ * 3 $ 1) 4+ ( ( * 4 4 D- 4 ; %6' ( "" ( 9

1)

"

@$ @ " $ 1 " 2 1 $ # 4 74 * 9

3

"

, -*&&

1 (!* 64*

-D

+ "

"

, -*&&

"

typedef struct { UWORD AdValue[NOS_OF_AVR_INPUTS]; UWORD Buttons; UWORD Battery; }IOFROMAVR; 4 + $

" "

7$

"

$ # "

" 7$ ""

7

)

-& 1 4A ( 1 (!*

$ -

*

#"

"

$" # 1$ "* 7$ - % / " &5;33 "* 4 $ " # 1$ $ " 1$ 9 8 7 "( ("*

&

"

#

1 $ 4+ #

" 7 -6

"$ "

& O 44 1 - O 4(($

)

$

"

"

1 ) * -' 1 " " #

"(

1

-& 1 4 ( ($

4(($

(!

"

$ * #

"1

",

" (!

7 -/ 2 -0 7 -& 2 -%

&**/ O &**; O

7 &2D

&**-&%/ = $

"




# 4"

4 ( # " ( * " $( $ "

) #$ ( " 4+ * ) " ( 1 "

" $( $ ( " " "

"(

1 " "" $ ( " ) " "$

"( "

"#

#

* !(

" (

. %&&'

1

"

" ( ) #

) " #

1

(

" ( " (

( (

" 1)

"# 4+ *

"

( 4+

"

1 "#

## (

1) $

( " * * #/

"*

$

%&

+ "

, -*&&

! 9

1 (! ( "# $ "$ ) ( /*/2 "$ ) "

( $ " 48 # " ( "$ ) ( ( ($ * 8$

"$ (

)" (

"$

## ( " $

) "

($

"$

,

1 "

1

' 44 1 "#

" ( >* 9 62 "$ )# 4 ; ( ""

" #

)" # -*?6 4

)

#D

)

(

"( 1

1

$ 1

1

)= 1 (! (

" 7$ 8

(

# (

1

" "" " 62

*

# ) /*/ 4*

5

"*

8$

## ( =7

5 K 4L

K 4L

)OD+

5K : L

"> K :L

" D+

//D

--0

6-?0

-0%%

6+

%;-

--%

-;00

00?

/*/ +

;%

/?

0-&

%-'

D+

%D&-

?0?

%'-&D

;'/%

6+

%;-

--%

--0%

/&;

/*/ +

;%

/?

0-&

-/;

"

1)

0' $4 ""$

"

1 ) ($

$

1

$

(

Figure 11: Current measurement on the MINDSTORMS NXT brick

+

( '.

# $ "" 1 " # ( 3

1 (!H" 1

. %&&'

(

" #

$"

1

" $"

(

#

1 (! $ "

)6" ( " 1

$

# $"

"

( " $

/' /

H" ( $ " "#

$

$

#$ "

* #

# 2 (

"

(

'" 1 1

)*

(

1 (!* ! " "

" "

*

1 (! 1

( 1

$"

" 1 $ $" ) 5

$ "* 1 ) 6&& 4

! $ ) "( 1

1 1 ( )

" ) " 4A8 1 (

) *

%-

+ "

, -*&&

Figure 12: Load on the NXT when using standard alkaline batteries

Figure 13: Load on the NXT when using the LEGO MINDSTORMS Lithium Ion rechargeable battery

. %&&'

$

%%

+ "

! 1 (! " 1 (! "( 1 ( )" ( 1 * ( ( 1 ( ( " # $

, -*&&

& 1

" "

" " " " # ) "# ) # "*

" $

$

"

"" 1 ( " 1$

( "

$" 1 (! "

( 1

(

(

Figure 14: LEGO MINDSTORMS NXT converter cable H" ( : $"

"

)=

$>

"

" "

"

(

"

(

1)

FWG

* (

( 1 %5% 2 " "

" # # 1

. %&&'

$

"( " "*

%

Q-% ( (

* :

( "-

( %

( $"

(

( ( 1

( (

1

%/

+ "

+"

"

1"

"#



* D-*(



*

*(



,AA

*"



*9 2



*$

. %&&'

($

("*

"*(

A

"

$

A1

!"A%(A

(

(

#A%(*1 $"*"

"

( #(

, -*&&

( ",

*

#

* (

$

*(

%0

+ "

, -*&&

!! 1. 2. 3. 4. 5. 6. 7. 8.

. %&&'

LEGO® MINDSTORMS® NXT hardware schematic LEGO® MINDSTORMS® NXT hardware schematic LEGO® MINDSTORMS® NXT Ultrasonic Sensor hardware schematic LEGO® MINDSTORMS® NXT Light Sensor hardware schematic LEGO® MINDSTORMS® NXT Sound Sensor hardware schematic LEGO® MINDSTORMS® NXT Touch Sensor hardware schematic LEGO® MINDSTORMS® NXT Ultrasonic Sensor I2C communication protocol LEGO MINDSTORMS NXT ARM7 Bluetooth® interface specification

$

%6