FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    Single Chipc C Language Tutorial Third Lesson - Generate HEX Files and Minimize Systems

     

    Single Chipc C Language Tutorial Third Lesson - Generate HEX Files and Minimize Systems When starting the main content of the C language, let's take a look at how to build the HEX file that generates the chip using Keil Uvision2. The HEX file format is the data information that Intel is arranged in accordance with the address, the data width is byte, and all data uses a 16-way digital representation, often used to save the target program code of the microcontroller or other processor. It saves the target code image in the physical programs store. All general programmers support this format. Let's first open the first item made by the first lesson, open its directory, find the document of Test.UV2, you can open the previous project. Then click on the 1 item folder in Figure 3-1, pop up the project function menu, select Options for Target'target1 ', pop up the project option settings window, and then select the project folder icon, then there is also the same in the Project menu. The menu is optional. Open the project option window, go to the Output option page Figure 3-2, 1 is the path to the compilation output, 2 is the file name that sets the compilation output generation, 3 is the decision whether to create a HEX file, select it You can output the HEX file to the specified path. What is it? Ok, let's recompile it once, soon, in the compilation information window, the HEX file is displayed to the specified path, as shown in Figure 3-3. In this way, we can read and burn into the chip with the software included with your programmers, and then use the experimental board. . (Skills: First, in the project file tree directory in Figure 3-1, first select the object, then click it to rename the operation, double-click the file icon to open the file. Second, in The bottom of the Project drop-down menu is saved with the recently edited project path. This can quickly open the most recently edited items.) Figure 3-1 Project Function Menu Figure 3-2 Project Options Window Figure 3-3 Compilation Information Window Perhaps you have Burning the compiled file to the chip, if you purchase or self-made a learning experiment board with serial output elements, you can associate the serial port and PC serial ports with serial debugging software or Windows super terminal, will wave The special rate is set to 1200, you can see the "Hello World!" Word that keeps the output. Maybe you have not yet experimental boards, here to talk about the minimization system of AT89C51, and then verify that the minimum system is running in an example program, this minimization system is also easy to use for experiments. Figure 3-4 is the minimization system of the AT89C51, but in order to make us see that it is running, I added a resistor and an LED to show its status, the crystal can be used according to their own situation, general The experimental board is 11.0592 MHz or 12MHz, and the former can produce a standard serial baud rate, and the latter is 1 microsecond, which is convenient to make sure. In the experiment yourself, note that the VCC is + 5V, which cannot be higher than this value, otherwise it will damage the microcontroller, too low, not working properly. At 31 feet, it is necessary to increase the level, so that we can perform the procedures in the film, such as the low level of program memory. Below, we built a new project named OneD to verify that the minimizes can work. The procedure is as follows: #include // Preprocessing command void main (void) // Source function name {// This is the first annotation method unsigned int A; / / Define variable A is int type / * This is the second annotation Way * / do {// do while composition cycle for (a = 0; A<50000; A ++); // This is a cycle P1_0 = 0; // set P1.0 port to low, light LEDfor ( A = 0; A<50000; A ++); // This is a cycle P1_0 = 1; // set P1.0 port as high level, extinguish LED} while (1);} Figure 3-4 AT89C51 minimization system Here, let's talk about the comment statements supported by the Keil C compiler. One is the statement starting with "//" symbol, and the statement after the symbol is considered a comment until a carriage return. The other is comments within "/ *" and "* /" symbols. Comments are not compiled by the C compiler. There should be a MAIN main function in a C application, and the main function can call other functional functions, but other function functions do not allow calls of the main function. Regardless of the location of the main function placed in the program, it is always performed first. Use the knowledge learned to compile the written ONELED program and burn it into the minimized system. On the power, the LED is not bright at the beginning (because all IO ports after power-on reset) is high at a high level), then delay for a period of time (for (a = 0; A<50000; A ++) This sentence is running), LED is bright, then delay, LED is off, then alternate, destroy. The first real small application is finished, huh, don't worry if it is active. If you don't have this effect, then you have to carefully check the steps of the circuit or compile the burn. Read the full text, the technology area About μClinux transplantation on ARM7 S3C4510B Multi-looped into charge and discharge controller design Interrupt service routines for ARM embedded systems LED dimming engine design based on 8-bit MCU How to display Chinese characters, ASCII characters and color graphics on the LCD monitor

     

     

     

     

    List all Question

    Nickname

    Email

    Questions

    Our other product:

    Professional FM Radio Station Equipment Package

     



     

    Hotel IPTV Solution

     


      Enter email  to get a surprise

      fmuser.org

      es.fmuser.org
      it.fmuser.org
      fr.fmuser.org
      de.fmuser.org
      af.fmuser.org ->Afrikaans
      sq.fmuser.org ->Albanian
      ar.fmuser.org ->Arabic
      hy.fmuser.org ->Armenian
      az.fmuser.org ->Azerbaijani
      eu.fmuser.org ->Basque
      be.fmuser.org ->Belarusian
      bg.fmuser.org ->Bulgarian
      ca.fmuser.org ->Catalan
      zh-CN.fmuser.org ->Chinese (Simplified)
      zh-TW.fmuser.org ->Chinese (Traditional)
      hr.fmuser.org ->Croatian
      cs.fmuser.org ->Czech
      da.fmuser.org ->Danish
      nl.fmuser.org ->Dutch
      et.fmuser.org ->Estonian
      tl.fmuser.org ->Filipino
      fi.fmuser.org ->Finnish
      fr.fmuser.org ->French
      gl.fmuser.org ->Galician
      ka.fmuser.org ->Georgian
      de.fmuser.org ->German
      el.fmuser.org ->Greek
      ht.fmuser.org ->Haitian Creole
      iw.fmuser.org ->Hebrew
      hi.fmuser.org ->Hindi
      hu.fmuser.org ->Hungarian
      is.fmuser.org ->Icelandic
      id.fmuser.org ->Indonesian
      ga.fmuser.org ->Irish
      it.fmuser.org ->Italian
      ja.fmuser.org ->Japanese
      ko.fmuser.org ->Korean
      lv.fmuser.org ->Latvian
      lt.fmuser.org ->Lithuanian
      mk.fmuser.org ->Macedonian
      ms.fmuser.org ->Malay
      mt.fmuser.org ->Maltese
      no.fmuser.org ->Norwegian
      fa.fmuser.org ->Persian
      pl.fmuser.org ->Polish
      pt.fmuser.org ->Portuguese
      ro.fmuser.org ->Romanian
      ru.fmuser.org ->Russian
      sr.fmuser.org ->Serbian
      sk.fmuser.org ->Slovak
      sl.fmuser.org ->Slovenian
      es.fmuser.org ->Spanish
      sw.fmuser.org ->Swahili
      sv.fmuser.org ->Swedish
      th.fmuser.org ->Thai
      tr.fmuser.org ->Turkish
      uk.fmuser.org ->Ukrainian
      ur.fmuser.org ->Urdu
      vi.fmuser.org ->Vietnamese
      cy.fmuser.org ->Welsh
      yi.fmuser.org ->Yiddish

       
  •  

    FMUSER Wirless Transmit Video And Audio More Easier !

  • Contact

    Address:
    No.305 Room HuiLan Building No.273 Huanpu Road Guangzhou China 510620

    E-mail:
    [email protected]

    Tel / WhatApps:
    +8618078869184

  • Categories

  • Newsletter

    FIRST OR FULL NAME

    E-mail

  • paypal solution  Western UnionBank OF China
    E-mail:[email protected]   WhatsApp:+8618078869184   Skype:sky198710021 Chat with me
    Copyright 2006-2020 Powered By www.fmuser.org

    Contact Us