Skip to main content

Creating Project in Keil Micro Vision


Keil MicroVision is a free software, we use it for embedded program developing. In this software we have provided a platform to write a program using text editor, compile program to convert source code into machine language i.e. compiler will convert source code into hex file.  
Here is simple guidance for 
  • How to write programs in  Assembly language or C/C++
  • How to Compile and Assembling Programs
  • How to Debug program
  • Creating Hex and Axf file
  • Test a program without Available real Hardware (Simulator Mode) 
Here a program to write a data 55H to port 1  and complementing data after some time delay is explained. Following is the  process of  writing  program in Keil ,its  execution and Debugging :
    Step 1: Open Keil uV3



    Step 2: After opening Keil uV3, Go to Project tab,create New Project ,select new folder and  give name to the Project.

      
    Step 3: After Creating project following window will pop-up. Now Select your device model e.g AT89C51


    Step 4: To select device click on  left '+' sign in front of  Atmel device.

    Step 5:  Following window will pop-up. Now scroll down and Select your device model e.g AT89C51

    Step 6:  Following window will pop-up. click on No.

    Step 7: Now go to File and create new file, following window will open, this is text editor  to write your own code. Write the code in editor and save the it.

    Step 8: Save the program using extension '.asm' for assembly language or '.c' for c language.



    Step 9: Now Right click on Source Group1 and then add files to Group 'Source Group1'

     


    Step 10: Now Build the Target (compile the program) by clicking on build tab shown by green circle as below: It will give result of compilation in command window shown by red colored  square window :


    Step 11: Now  we can start Debug session using Debug tab  after that run the the program using Run tab shown by pink colored circle and check status on peripheral using peripheral tab.We can also check value of  general purpose register in project work space under the Register tab


    Step 12: If you want to watch waveform on particular port pin or port use Logic analyzer Window and add particular pin or port to the window then  you will see waveform on that particular port or port pin as shown below : here waveform on pin port 1.1 shown.  




    Comments

    Popular posts from this blog

    Power Amplifier with voltage regulator 4 × 50 Watt TDA8588

    Power Amplifier with voltage regulator 4 × 50 Watt TDA8588    The TDA8588 is a multiple voltage regulator combined with four independent audio power amplifiers configured in bridge tied load with diagnostic capability. The output voltages of all regulators except regulators 2 and 3 can be controlled via the I2C-bus. However, regulator 3 can be set to 0 V via the I2C-bus. The output voltage of regulator 2 (microcontroller supply) and the maximum output voltage of regulator 3 (mechanical digital and microcontroller supplies) can both be either 5 V or 3.3 V depending on the type number. The maximum output voltages of both regulators are fixed to avoid any risk of damaging the microcontroller that may occur during a disturbance of the I 2C-bus. The amplifier diagnostic functions give information about output offset, load, or short-circuit. Diagnostic functions are controlled via the I2C-bus. The TDA8588 is protected against short-circuit, over-temperature, open ground and open VP connectio

    PIC16F887 877 programming in C Tutorial 5 LCD Interfacing

    LCD Interfacing: In this tutorial i will show you how to interface 16x2 LCD with micro-controller. 16x2 means there are two rows and each row contain maximum 16 characters.  For more detail refer to the LCD datasheet, which you are using. Basic Connection: Applies 5v to pin 2 and gnd to pins 1 & 5. Use variable resistor at pin 3 to set contrast. Pins 7 to 14 are the data pins,, used to send/rec data. Pin 6 is of enable; every time when you write to lcd you should have to give high to low, to this pin. pin 4 is register select pin use to give commands like clear, home etc.   In this tutorial i will interface lcd in 4-bit instead of 8-bit, so we only required four data pins. Code: Lets write a code that will display the motor status and its direction; it will be fun!!!! Requirements: Design a motor controller circuit using l298 and display its status on lcd. LCD is connected to portb and motor controller circuit is at portd. Required two switches to change motor direction; if both ar

    12V to 30V DC to DC Converter circuit Diagram

     12V to +/- 30V DC to DC Converter circuit Diagram This is a DC to DC converter for car power amplifier. 12V input generates +30V and -30V output for preamp or power amplifiers. Circuit uses SG3525 IC, Mosfets and switching power supply.