University Programs Knowledge Base

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

University Programs Knowledge Base

Discussions

Sort by:
Notes: Will ask - Do you want to add the Remote System to your workspace? Click yes Build - select flash Plug in your K40 board to the usb (tower is not needed in this step) Click on debug as it will ask you which configuration you want to launch: Select the internal flash one. Bottom right you will see it "Launching with a little green light indicating that it is programming your board. After clicking debug as, you will enter the debug Eclipse "view" nothing will happen until you press "resume" Download the Zip file which is located: LED BLINK 96MHZ How to: Set up a debug: Program the FLASH Click on project in codewarrior projects menu There is noe issue with the Kinetis chips errata 2448. The code which is in our zip file already has these changes made, but if you download Kinetis example code from the official freescale site instead of using the wiki code - it may not work. Read more about the work - around here: here ++ Test to make sure everything is working properly CodeWarrior typically defaults to a "pause" setting when the debug is first started. To test wheter the code is working you will need to press "resume"
View full article
The Freescale linescan camera is based upon the TSL1401CL sensor from TAOS Inc. Design Files Schematic & 3D Render (Courtesy of eli_hughes) Images (Lens removed) Freescale Linescan Camera Specifications 128-pixel linear image sensor (TSL1401CL) Focusable imaging lens 5-pin physical interface on PCB on .100" grid Simple three-pin MCU interface with analog pixel output Lens: 7.9mm focal length, f2.4 fixed aperture, manual focus, 12mm x 0.5mm thread Exposure Time: 267µS to 68mS Resolution: 128 pixels Built-In amplifier stage to improve white/black differentiation. The lense used on the board: Alaud Optical     8.0mm f.l. Lens w/IR filter = Part Num: AB0825C        M12x.05 Lens Holder = #9 or #10 Useful links AMS TSL1401 Product Page Line Scan Camera Use Freescale App Note: Line Scan Camera
View full article
This tutorial is meant to introduce you to the use of a push button. It will give an explanation and example code of how you could implement a push button. Push buttons can be a great way to set a number of different states. Push buttons are advantageous because you can change your code physically versus pulling up the debugger every time you want to make a little change. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Usage A button can have many different functions on your autonomous vehicle. Most notably the button has been used for testing to start, stop, or put your car in a configuration mode. Configuration mode would let you test to see if all the peripherals except the motors are working. This would help you test your camera data and servo angles without always having to run after your car. During your race you can even set your button to different speed states. Since you have two chance to traverse the track you may have a slower safer speed on one state and a faster speed the pushes the limit on another state. In the end, what you do with the button is up to you and the choices are unlimited. Description of Example Code Below there will be an example of how to implement a push button. This push button will be connected to PTA16. When reading this pin a high, "1" or 5V, is considered "OFF" and a low, "0" or 0V, is considered "ON." To reduce the effects of bounce and/or the chance of a false press, additional code has been added to filter the signal. This is done by checking the button every 10ms for 50ms. If the button has been pressed for 3 or more of the 5 times we will change the state, otherwise it will not be considered a "press." Button Initialization Here is the initialization code that can be put in a header such as "Button.h." #define BUTTONLENGTH 5   // Button's Defined State   // 0 means button not pressed   // 1 means button pressed short fButton = 0; short iButtonCount=0; short iButtonTimer=0;   // Button Triggered Start time short iButtonTime; void initButton() {   //turn on clock to Port A   SIM_SCGC5 |= SIM_SCGC5_PORTA_MASK;   // configure pin to be GPIO   PORTA_PCR16 = PORT_PCR_MUX(1) | PORT_PCR_DSE_MASK;   // configure PTA16 to be input   GPIOA_PDDR &= (0<<16);  } See GPIO for explanation of how these specific commands work. Button Implementation Below is an example of a function that implements the button function. This function can be stored in a header file "Button.h" along with the initialization code. To call this function you would just place "readButton();" in your 10ms Flextimer source code. Read comments for description of each line Void readButton () {                  short fButtonState  = 0;   // initializes the button state to "OFF"           iButtonCount++;            // increments button count      if (GPIOA_PDIR & (1<<16)) {                    // if button read as high then its off otherwise its on           fButtonState = 0;      } else {           fButtonState = 1;      }      if (fButtonState && ! fButton) {                          // if the button is pushed and it previously wasn't then start a count           iButtonTimer++;           if (iButtonTimer <= 1) {                                                             iButtonCount = 0;                                 // Reset the Button Count if the timer is less or equal to 1           }      } else if (! fButtonState && fButton) {           iButtonTimer++;           if ( iButtonTimer <= 1) {                iButtonCount = 0;                               // Reset the Button count if the timer is less or equal to 1           }      }      if ( iButtonCount > BUTTONLENGTH && iButtonTimer >0) {     // if button has been read for 50ms check to see if we passed the test!           if ( iButtonTimer > (3*BUTTONLENGTH/4) && fButton) {                // fButton = 0;           } else if (iButtonTimer > (3*BUTTONLENGTH/4) && ! fButton) {                fButton = 1;           }           iButtonCount = 0;           iButtonTimer = 0;     } }
View full article
Freescale - North America - is looking for you!  If you want to use the innovative and fresh ideas you are learning in the classroom to contribute to projects that help change lives, then a Freescale internship or co–op position is for you. I want to know more about Freescale internship and co-op opportunities. University Recruiting Calendar for 2013 Quick Facts about Freescale Freescale at a Glance Research More University Programs opportunities(PDF attachment)
View full article
Congratulations to all the teams to making it this far.  Last minute tweaks made and broke a few teams shooting for the top spot. Best times: (in seconds) 14.89 - Beijing University of Science and Technology [China] 17.60 - Swinburne University of Technology [Malaysia] 19.08 - National Taiwan University of Science and Technology [Taiwan] 19.57 - Escola Politecnica da Universidade de Sao Paulo [Brazil] 20.54 - University of California Berkeley [USA] 22.14 - Slovak University of Technology [Slovakia] DNF - The University of Tokyo [Japan] DNF - Bannari Amman Institute of Technology [India] DNF - Instituto Politecnico Nacional [Mexico] Read more: Day 1: Freescale Cup 2013 Worldwide Championship and China Regional Finals Day 2:  (coming soon)
View full article
Join Professor Richard Balogh and his students as they explain how they mastered the challenges of The Freescale Cup and won the 2013 EMEA title in March this year. The team FEI-Minetors from the Slovak Technical University in Bratislava also attended The Freescale Cup Worldwide Challenge held in Harbin, China this summer. To see our event schedule, join us on The Freescale Google+ page at https://www.google.com/+freescale
View full article
This tutorial covers the specific details of obtaining data from the line scan camera on the Qorivva TRK-MPC5604B board. This tutorial will help students familiarize themselves with how to interface the camera with the microcontroller, how to configure GPIO pins to create clock signals and also how to utilize the microcontroller's ADC to read the data from the camera. Outside of control algorithms, configuring the camera is one of the more complex tasks necessary to create a Freescale Cup Vehicle. 1. Overview 2. Hardware 3. Set up the Hardware: Line Scan Camera/Microcontroller Hardware Setup 4. Build the Code 5. Download/Debug/Run 6. Learning Step Functions Calling the Function Variables Setting threshold. (This can give you a simple view of what your camera sees without connecting it to a scope) Sample Code Download Link Alternative Examples Other Qorivva Tutorials: Links External 1. Overview In this exercise students will access the line scan camera, create a clock signal and create the initialization pulse which tells the camera to begin the exposure period. This tutorial will not describe line recognition or line following algorithms - these concepts are beyond its scope. Students will: Open the example file using Codewarrior Build a project Download the code to the board connect the microcontroller to the camera via the motor control board Run the program view the camera data, clock and Si pulse on an oscilloscope To successfully complete this exercise, students will need the following board and development environment: TRK-MPC5604B Motor Drive Board Version A Freescale Cup TRK-MPC5604B compatible Car Kit CodeWarrior for Microcontrollers v 2.8 P&E Micro Toolkit Freescale Line Scan Camera USB Cord Knowledge of how Pointers and arrays are utilized in C 2. Hardware   Read the Obtain Data From Line Scan Camera overview article for general information on the camera, ADC, and GPIO microcontroller configuration settings. Connect the sensors, motor drive board and microcontroller of your car according to the TRK-MPC5604B chassis build instructions 3. Set up the Hardware: Line Scan Camera/Microcontroller Hardware Setup It is crucial for an engineer to have the proper test equipment and tools for the job. In this case, without an oscilloscope, students will not be able to verify whether the proper signals are being sent to the camera, or that the camera is working properly. 4. Build the Code If there is more than one project in your project view, make sure the proper project is the focus. The most reliable way to do this is to right click the project and choose Build Project as shown below. You can also go to the Project menu and choose the same command. If errors are encountered, look in the Problems view and resolve them. For now ignore any warnings. 5. Download/Debug/Run Download the code to your board, once this process is complete resume the project so that the code runs. 6. Learning Step What will happen: the function ImageCapture() is called in main.c with a pointer to the first element in the array. This function completes the processes necessary to capture images using the camera. To become more familiar with Pointers and Arrays - navigate to the C Programming Tutorial. Knowledge of Pointers and Arrays is a pre-requisite for understanding the Camera Code. Functions void CAMERA(void) {   TransmitData("****Line Sensor Test****\n\r");   SIU.PCR[27].R = 0x0200; /* Program the Sensor read start pin as output*/   SIU.PCR[29].R = 0x0200; /* Program the Sensor Clock pin as output*/   for(j=0;j<2;j++)   //for(;;)   {   SIU.PCR[27].R = 0x0200; /* Program the Sensor read start pin as output*/   SIU.PCR[29].R = 0x0200; /* Program the Sensor Clock pin as output*/   SIU.PGPDO[0].R &= ~0x00000014; /* All port line low */   SIU.PGPDO[0].R |= 0x00000010; /* Sensor read start High */   Delay();   SIU.PGPDO[0].R |= 0x00000004; /* Sensor Clock High */   Delay();   SIU.PGPDO[0].R &= ~0x00000010; /* Sensor read start Low */   Delay();   SIU.PGPDO[0].R &= ~0x00000004; /* Sensor Clock Low */   Delay();   for (i=0;i<128;i++)   {   Delay();   SIU.PGPDO[0].R |= 0x00000004; /* Sensor Clock High */   ADC.MCR.B.NSTART=1; /* Trigger normal conversions for ADC0 */   while (ADC.MCR.B.NSTART == 1) {};   adcdata = ADC.CDR[0].B.CDATA;   Delay();   SIU.PGPDO[0].R &= ~0x00000004; /* Sensor Clock Low */   Result[i] = (uint8_t)(adcdata >> 2);    }   Delaycamera();   //printlistall();   }   printlistall(); } Calling the Function within the main for loop in main.c, call the camera function using the following code: for (;;)   {   CAMERA();   } Variables Creates an 128x1 array for camera data information volatile uint8_t Result[128]; /* Read converstion result from ADC input ANS0 */   Setting threshold. (This can give you a simple view of what your camera sees without connecting it to a scope) #define THRESHOLD (2.0 /*volts*/ / 0.03125) // 8-bit A/D = 31.25mV/bit CAMERA(); // read line sensor, 128x1 pixel result returned in Result[128] array // print result for (i = 16; i < 112; ++i) // ignore the first and last 16 bits in the camera frame   if (Result[i] < THRESHOLD)   TransmitCharacter('1'); // black (low intensity)   else   TransmitCharacter('0'); // white (high intensity) Sample Code Download Link Qorivva Sample Code Download Link Alternative Examples Application Note 4244 and Software. Other Qorivva Tutorials: 1. Qorivva: Blink LED 2. Qorivva: Drive DC Motor Tutorial 3. Qorivva: Turning A Servo 4. Qorivva: Line Scan Camera Tutorial Links Qorivva Overview https://community.nxp.com/docs/DOC-1019 External TRK-MPC5064B Freescale Webpage TRK-MPC5064B Freescale Reference Manual TRK-MPC5064B Freescale Schematic
View full article
MCU101 (Theory Topics)   Know Your Microcontrollers   Blink LED   Drive a DC Motor   Turn a Servo   https://community.nxp.com/docs/DOC-1030   Navigating Technical Documentation   C programming for Embedded System Software Tools CodeWarrior Software Development Tools & IDE CodeWarrior Beginners Tutorial (videos)   TRK-MPC 5604B Hardware Setup   Creating a new bareboard project   Debugging a bareboard project   Importing projects and merging code   Discussion of the header files (part 1)   Discussion of the header files (part 2) Qorivva Specific (with Code) Beginners Hands-on Tutorials Blink LED Drive DC Motor Turn A Servo Line Scan Camera Hardware https://community.nxp.com/docs/DOC-1016 DIY Camera Mounting Wiring Connections for TRK-MPC5604b Batteries Advanced Tutorial Series Push-Buttons   I2C Sensors using Kinetis K40 Miscellaneous Topics PCB design tips
View full article
http://www.freescale.com - FTF on-the-street reporter talks to ITESM from Guadalajara, Mexico who describe their challenges and learnings in building an inte...
View full article
ARM University Programs Lab-in-a-Box (LiB) Freescale and ARM University Programs have teamed up to provide you the Lab in a Box.  If you are interested in adopting the Lab-in-a-Box (LiB) in your course please contact the ARM University Program to request a donation! Development Boards The FRDM-KL25Z is an ultra-low-cost development platform enabled by Kinetis L Series KL1x and KL2x MCUs families built on ARM® Cortex™-M0+ processor. Features include easy access to MCU I/O, battery-ready, low-power operation, a standard-based form factor with expansion board options and a built-in debug interface for flash programming and run-control. The FRDM-KL25Z is supported by a range of Freescale and third-party development software. Freedom Development Platform Lab Exercise for Freescale Freedom KL25Z Board Software Tools ARM offers the Keil Microcontroller Development Kit (MDK-ARM) for ARM powered microcontrollers. It features the industry-standard compiler from ARM, the Keil µVision IDE, and sophisticated debug and data trace capabilities. MDK-ARM offers tailored support for all Cortex-M processor-based devices, and is the recommended solution for students working with standard ARM-based MCU devices. We suggest that students and universities download the free evaluation version of the tools, which offers all the features of the standard version, but with a 32 KByte object code/data limit. Keil Microcontroller Development Kit (MDK-ARM) Textbooks The Definitive Guide to the ARM Cortex-M0 In English, by Joseph Yiu Published by Newnes ISBN-10: 0123854776 ISBN-978-0123854773 C Programming for Embedded Microcontrollers In English, by Warwick A. Smith Published by Elektor ISBN: 978-0-905705-80-4Other ARM-related Books Teaching Materials Teaching Slides ARM Processors and Architectures Comprehensive Overiew - 2012 ARM Processors and Architectures Fundamentals Lab Manuals and Exercises Lab Exercises for Cortex-M4 Freescale Kinetis using Keil MDK Lab Exercises for Cortex-M0+ Freescale Freedom KL25Z Board Application Notes for Students and Faculty AN234: Migrating from PIC Microcontrollers to Cortex-M Other Projects and Resources Variety of Resources and Middleware from onARM Projects-Lab.com - Ideas for Design Projects Other ARM Projects
View full article
1. Download CodeWarrior 2.8 Evaluation Version (Classic, Windows-hosted) To Program your microcontroller you will need to set up the CodeWarrior Integrated Development Environment. CodeWarrior is available on the Freescale.com Website. Method 1: Direct Link direct download link (Caution - link may not be up to date) Method 2: Navigate to the Download Link From Freescale.com click on: "Design Resources" tab at the top of the page, then navigate to "Software and Tools", and then to "Codewarrior Devleopment Tools" Click on the "Download CodeWarrior now link" Click on the Download Evaluation Versions link" Within this page, use your browser "find" feature (Typically CTRL-F) to search for the text string "V2.8" Click the "download" button next to "Evaluation: CodeWarrior for MPC55xx/MPC56xx Microcontrollers V2.8 (Classic)". and save it to your computer. 2. Install CodeWarrior To install CodeWarrior Development Studio for Microcontrollers v2.8, double-click the installation package and a wizard will guide you through the installation process. Installation Notes: Are you using Windows Vista or Windows 7? Evaluation Edition User: If you are installing the Evaluation Edition, the Evaluation license is automatically installed with your product and you do not need to register it. This license allows you to develop projects as Professional Edition within the 30-day evaluation period. After 30 days, the license works as Special Edition license (free permanent, but feature limited) which supports unlimited assembly code, up to 32KB of C code for HCS08/RS08 derivatives, up to 64KB of C code for V1 ColdFire derivatives and up to 128KB of C code for V2-V4 ColdFire and Kinetis derivatives and up to 512KB of C code for MPC56xx derivatives. Once you have finished downloading and installing CodeWarrior, users can return to Downloading and Installing P&E as part of the Blink a LED on Qorivva Tutorial
View full article
2013 Global Freescale Cup Champion. Video Link : 1589 Car Specs: Custom K60 Control Board
View full article
Here are some special offers from our partners from around the world: MathWorks support software for The Freescale Cup participants Stay tuned... more to come
View full article
Freescale india and CEDT, IISc organised Freescale Cup - Smart car race india 2011 Final Run of Grand Prize(Rs. 1,00,000) winner team from NIT,Surat. Student... Amit Tank, Atit JAriwala, Vivek Kholia, Suraj Das
View full article
Video on YouTube done by the University of Applied Sciences of Munich about the Freescale Cup event held on March 18th Freescale Cup 2014 an der Hochschule München - YouTube
View full article
Most embedded systems must operate continuously without any user input, even if something goes wrong. Most of us have experienced having our desktop or laptop computer locking up and requiring a reboot of the system to get it working again. We simply cannot afford to do this in an embedded system. Ideally, we would write our software so that it never crashes or fails. This, as you can guess, is really hard to do and so our microcontroller manufacturer has included a hardware feature called the Computer Operating Properly, or COP, reset generator. If this hardware feature does not receive a confirmation signal that our program is running properly, it will generate a reset to restart our program from the beginning or from a restart place that we can choose. The COP is also called a watchdog timer.  The COP reset circuitry guards against our program not working properly by expecting the program to execute a particular sequence of instructions at some interval. If the COP does not receive this sequence before it times out, it generates a reset by pulling the RESET_L signal low. This can reset all peripherals connected to the reset line. The CPU then fetches a COP reset vector to restart the program again. Thus the COP is treated like other interrupts except that it cannot be masked once the COP timer has been started. Often you would like to restart at the beginning of your program but in some situations you may choose to enter some diagnostic routine, such as updating a counter that counts the number of COP restarts that have occurred or lighting an LED, before restarting the program. You may also wish to leave some debugging breadcrumbs to help you understand why the COP is resetting the program.
View full article
Connection Diagram for TRK-MPC5604B to Rev. 1 Motor Control "Shield" Board Connection Diagram for TRK-MPC5604B to Rev. 0 Motor Control Board For the TRK-MPC5604, connect the flat ribbon cable to PortB as seen in the picture below. Make the cable connections as shown below for dual motor with independent drive connection Make the cable connections as shown below for dual motor with series drive connection Make the cable connections as shown below for Single motor connection Protect your electronics 1. Try not to stop the wheels while in motion.  This can cause current spikes. 2. Don’t disconnect or connect any cable when board is powered [ON]. 3. Don’t discharge the battery below 5.5V 4. Don’t hit stationary objects
View full article
How does a DC Motor work? The DC motor is a machine that transforms electric energy into mechanical energy in form of rotation. Its movement is produced by the physical behavior of electromagnetism. DC motors have inductors inside, which produce the magnetic field used to generate movement. But how does this magnetic field changes if DC current is being used? An electromagnet, which is a piece of iron wrapped with a wire coil that has voltage applied in its terminals. If two fixed magnets are added in both sides of this electromagnet, the repulsive and attractive forces will produce a torque. Then, there are two problems to solve: feeding the current to the rotating electromagnet without the wires getting twisted, and changing the direction of the current at the appropriate time. Both of these problems are solved using two devices: a split-ring commutator, and a pair of brushes. As it can be seen, the commutator has two segments which are connected to each terminal of the electromagnet, besides the two arrows are the brushes which apply electric current to the rotary electromagnet. In real DC motors it can be found three slots instead of two and two brushes. This way, as the electromagnet is moving its polarity is changing and the shaft may keep rotating. Even if it is simple and sounds that it will work great there are some issues which make these motors energy inefficient and mechanically unstable, the principal problem is due to the timing between each polarity inversion. Since polarity in the electromagnet is changed mechanically, at some velocities polarity is changing too soon, which result in reverse impulses and sometimes in changing too late, generating instantaneous “stops” in rotation. Whatever the case, these issues produce current peaks and mechanical instability. How a DC motor can be controlled? DC motors have only two terminals. If you apply a voltage to these terminals the motor will run, if you invert the terminals position the motor will change its direction. If the motor is running and you suddenly disconnect both terminals the motor will keep rotating but slowing down until stopping. Finally if the motor is running and you suddenly short-circuit both terminals the motor will stop. So there is not a third wire to control a DC motor, but knowing the previous behaviors it can be designed a way to control it, and the solution is an H-bridge. Look at the last evolution of the DC Motor above, you can observe that there are four gates and a motor connected between them. This is the simplest H-bridge, where the four gates represent for transistors. By manipulating these gates and connecting the upper and lower terminals to a voltage supply, you can control the motor in all the behaviors as below. Things to Consider When Using Motors With the Motor and Line scan Camera hooked up to the same board there is a significant problem with noise. The higher you turn the PWM on your drive motors the noise produced and the worse the data will appear from the camera. TO significantly reduce this noise you can simply solder an inductor directly across the 2 drive motors. This will allow you to increase the speed of the car without significantly affecting the data you receive back from the camera.
View full article
Kinetis Header Part 1 of 2
View full article