aLec33_Trobot - Introduction to Microcontrollers Set up...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 33 Lecture 33 Use Version 1.84 All in C, Metrowerks Project Lab 9 TRobot Introduction to Microcontrollers Introduction to Microcontrollers Lecture 33 Nachiket M. Kharalkar 2 Set up TRobot Set up TRobot Download Trobot1_84.zip and unzip Give it a simple path: D:\Trobot1_84 Trobot.exe is the game engine (try it) Folder S19 contains runtime files sx files: object code to run, z3.sx c0.sx Trobot.ini configuration logFile.txt results of simulation Folder S19TestFiles contains lots of battle buddies Move them into the S19 folder when you want a battle Folder Lab9_starter is THE starter project Do not make your own project Fal 2010 EE 319k Lecture 33 Nachiket M. Kharalkar 3 Run TRobot Run TRobot Open Starter project and observe Watch variables Execute Project->Make (F7) Open Folder bin and see z3.sx just created Start TExaS double-clicking Texas.uc Tile windows, import z3.sx and run Compare Watch variables with C code Copy from bin to S19 folder Double click Trobot.exe to launch game Compare Watch variables with C code Notice the same tank motion in both Texas and game Fal 2010 EE 319k Lecture 33 Nachiket M. Kharalkar 4 Configure TRobot Configure TRobot Edit the CopyMe batch file in bin folder Edit Trobot.ini so your tank is the player This will allow your program to breakpoint Player=0 means A0, and Player=103 means Z3 Configure this project for your tank (do this once) Edit->HCS12SerialMonitorSettings Click Linker for HC12 Place tank name in Application Filename E.g., change z3.abs to a0.abs Fal 2010 EE 319k Lecture 33 Nachiket M. Kharalkar 5 TExaS Design Cycle TExaS Design Cycle Used to test PTT outputs to track motors No ADC, no turret, SCI will output, but no scoring Edit C code in Metrowerks Project Execute Project->Make (F7) Configure TExaS once Mode->OpenS19Mode add your C files In TExaS, import z3.sx and run Watch variables in Mem3800 All the usual debugging Fal 2010 EE 319k Lecture 33 Nachiket M. Kharalkar 6 TRobot Design Cycle Add battle buddies into the S19 folder c0.sx just sits there (you can make duplicates) Files from S19TestFiles will fire back Edit C code in Metrowerks Project Execute Project->Make (F7) asm stop adds a breakpoint Double-click CopyMe to bin folder Launch Trobot.exe Observe position, registers, Watch variables <esc> <Enter> <Enter> stops the game
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lecture 33 Fal 2010 EE 319k Lecture 33 Nachiket M. Kharalkar 7 Stepper motor output sequence Stepper motor output sequence • Full-step sequence = 5,6,10,9,. .. • Half-step sequence = 5,4,6,2,10,8,9,1,. .. A A’ B B’ 50101 60110 1 01010 91001 Fal 2010 EE 319k Lecture 33 Nachiket M. Kharalkar 8 Driving the stepper motor Driving the stepper motor • Forward stepping causes the motor to spin forward – Full-step sequence = 5,6,10,9,. .. – Half-step sequence = 5,4,6,2,10,8,9,1,. .. • Backward stepping causes the motor to spin backward – Full-step backward sequence = 9,10,6,5,. ..
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/28/2011 for the course EE 16345 taught by Professor Yerraballi during the Spring '11 term at University of Texas at Austin.

Page1 / 5

aLec33_Trobot - Introduction to Microcontrollers Set up...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online