University Programs Knowledge Base

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

University Programs Knowledge Base

Discussions

Sort by:
A great exercise when first starting with a new microcontroller is to get LEDs to turn-on, flash, or dim. Depending upon the configuration of your circuit, a LED (light-emitting diode) is accessed by toggling a GPIO or 'General Purpose Input Output pin either high or low. GPIO pins can be configured either as an input (read) or output (write). A high signal is often referred to as "Asserted" or a logic "1" and a low signal designated as Negated or logic "0". The input and output voltage range for GPIO pins is typically limited to the supply voltage of the evaluation board. Usage To optimize functionality in small packages, physical microcontroller pins have several functions available via signal multiplexing. Internally, a pin will have several wires connected to it via a multiplexer (wiki) or MUX. A multiplexer selects between several inputs and sends the selected signal to its output pin. The Signal Multiplexing chapter of your reference manual illustrates which device signals are multiplexed on which external pin. The Port Control block controls which signal is present on the external pin. The configuration registers within a microcontroller require proper configuration to select the GPIO as an input or output. The same GPIO pins utilized to blink a LED can be wired to read a signal coming from an external device such as the input from a hall effect sensor. Freescale Cup participants will configure GPIO pins as outputs to control the line-scan-camera via timed pulses and clock type signals. Read/Write In write mode, the GPIO pin can be set, cleared, or toggled via software initiated register settings. To determine which pin on the microcontroller is connected to a LED and how to access it from software, refer to the schematic of the microcontroller board. This pin will have numeric or alfanumeric value as well as an descriptive designation such as PTC7. Microcontroller Reference Manual: GPIO Information You will find high level information about GPIO usage in several different areas of a reference manual. See thereference-manual article for more general information. Relevant Chapters: Introduction: Human-machine interfaces - lists the memory map and register definitions for the GPIO System Modules: System Integration Modules (SIM) - provides system control and chip configuration registers Chip Configuration: Human-Machine interfaces (HMI). Signal Multiplexing: Port control and interrupts Human-Machine Interfaces: General purpose input/output Hardware As stated before, internal registers control whether a pin is high or low. Determining the polarity or orientation of your LED is important because this will let you know whether to set the associated pin in the HIGH or LOW state. The evaluation boards from Freescale all provide LED circuits like the one shown below. LED Circuit The circuit in figure (1) demonstrates a simple way to to power a LED. The circuit consists of connecting in a LED, resistor (which limits the current) and voltage source in series. LED's are semiconductors which convert current to light. When they are forward biased (turned on), electron and holes will recombine with no change in momentum, emitting a photon or light wave. Choosing the resistor is simple if you know the operating current requirements for your LED which are determined by reading the LED datasheet or specification document. R = (Vs - VL)/ IL Where V s is the power supply voltage, and V L is the Voltage Drop across the LED, and I L is the desired current through the LED.
View full article
Sifting through technical documentation is part of an engineers job.  Sometimes these documents can be hundreds or thousands of pages long, so knowing where to makes life much easier.  This article is going to try to help you navigate smarter... Freescale has the following structure for technical documents: Reference Manuals (Usually end with "RM") - These are typically the thick manuals.  You will find sections detailing operation, registers, and electrical characteristics. Data Sheet (Usually ends with "DS") - These are quick summaries of the specifications of the device.  Includes electrical characteristics such as operating voltages, input and output minimum and maximum ranges.  In addition to environmental characteristics such as temperature ranges and graphs of performance vs. certain conditions. Schematic (_SCH) - This is typically referred in terms of board designs.  A schematic is useful in finding out how and where an external thing (LED, button, Display) is connected to the microcontroller.  Fact Sheet (_FS) - This is generally overview type information.  Useful when you are trying to determine which microcontroller you want to use.  Errata - Sometimes there are bugs in the chip.  When these are discovered the company issues an errata.  Sometimes the item get's fixed in the next revision of the chip, sometimes you just work around the problem.  If you think it should be working and it's not check the erratas! Tips and Tricks Use the search or find function all the time. Shortcut key '''(Ctrl-F).''' Use two monitors. Have the document open in one, search or browse to what you need to find and simply copy and paste the configuration information into your IDE. Search tips:  Use the pin name.  (I.e. PTC, PORTA, or FTM) Save trees only print out what you need. Commonly Used Acronyms: PDB - Programmable Delay Block FTM - Flex Timer Module ADC - Analog to Digital Converter DAC - Digital to Analog Converter MCG - Multipurpose Clock Generator SPI - Serial Programming Interface CnV - Channel n Value CNTIN - Counter Initial Value SIM - System Integration Module SIM_SCGCn - System Integration Module, System Clock Gating Control Register CMP - Comparator Module SIM - Provides system control and chip configuration registers. You will use this to turn on the clocks to particular peripherals. The SIM_SCGC
View full article
GEORG is the Rescue Robot from the Freescale Robotics Lab of the Georg-Simon Ohm University of Applied Sciences of Nuremberg (Germany). During last week's, the student team led by Prof. Stefan May have attended the Worldwide RoboCup finals in Eindhoven (The Netherlands) and scored #12. Quite a good result for GEORG as it is it's first entry into the world finals. The Robotics team has been working since last year porting ROS (Robotic Operating System) to the Freescale i.MX platform to save space and power vs. an onboard PC. They are also working in developing distributed ROS computing systems using Freedom boards as modules. See GEORG's progress on the Robotics page of the university
View full article
The attached final rules are valid for the 2014 Freescale Innovation Competition rules
View full article
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
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
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
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
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
Kinetis Header Part 1 of 2
View full article
Overview An H-Bridge circuit has a control circuit, usually PWM, which then determines the switching of high-voltage supply to drive a current. Typical embedded H-Bridges can drive about 5A of current. In the case, of the Freescale Cup car the motors can sustain much more current resulting in more toque and faster speeds. Performance Tuning Tips 1. You can place H-Bridges in parallel to balance the current load. For example, if you place two 5A (peak) H-Bridge outputs in parallel, the system can support up to 10A current. 2. Keep it Cool. H-Bridge's dissipate A LOT of heat. Heat = increases inefficiency of a semiconductor, so the better job you do keeping it cool, the better (and longer) it will work for you. Operation Theory 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. H-Bridge States
View full article
CW_NEW_PROJECT.wmv
View full article