(Basics)
 
(35 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:8051 tutorials]]
 
[[Category:8051 tutorials]]
=Basics=
+
In this tutorial, we will see how to use XploreFlash for flashing the hex files to AT89s52.<br>
 +
First, we will see how to install the XploreFlash software along with UsbAsp drivers and then continue with flashing the controller.
  
{{Box|type=l_green_light|text=<br />
+
=Installing UsbAsp Drivers=
The keypad matrix or hex keypad comprising of 16 keys arranged as 4x4 matrix is one of the common interfaces done to a micrcontroller. These are similar to a telephone keypad that we normally come across. In this tutorial we will see about interfacing this keypad to 8051. We will write the code to scan the keys and display the pressed key on the LCD.
+
Download the UsbAsp drivers from [http://www.fischl.de/usbasp/usbasp-windriver.2011-05-28.zip this link] and follow the below steps.<br>
}}
+
In case your are using <b>Windows7/Vista/Xp</b>, skip the first 7 steps and directly jump to step8.<br>
  
=Working=
+
Windows 8 and above do not allow the installation of drivers that are not digitally signed. This needs to be disabled by following the below steps.<br>
{{Box|type=l_green_light|text=<br />
+
For us human beings it takes a few seconds to press a key, but the controller can read the port pin and eventually the keypressed in milliseconds.  
+
Hence it is possible to scan a four or more rows and columns while the key is being pressed! In fact, when we will test the code we will realize that a single key press is detected multiple times.
+
*KeyBounce: Multiple keypress is also resulted out of mechanical construction of the keys. When we press and release a key, it not just presses once but debounces several times.
+
  
There are various ways to eliminate debounce, however we will use time delay to neglect the effect of keybounce.   
+
<b>STEP 1:</b>Go to Advanced Start Options by searching the same in Windows Start Menu.
 +
[[FILE:UsbAsp Setup Steps.png ]] <br>
  
}}
+
<b>STEP 2:</b> Click on Restart Now in Advanced Start Up options.
{{#widget:Iframe
+
[[FILE:UsbAsp Setup Steps 1.png]]  <br>
  
|url=http://xplorelabz.com/wiki/images/c/cc/Keypad_8051.pdf
+
<b>STEP 3:</b> Now choose the Troubleshoot option.
 +
[[FILE:UsbAsp Setup Steps 2.jpg]]  <br>
  
|width=700
+
<b>STEP 4:</b> Click on Advanced Options.
 +
[[FILE:UsbAsp Setup Steps 3.jpg]]  <br>
  
|height=400
+
<b>STEP 5:</b> Click on StartUp Settings.
 +
[[FILE:UsbAsp Setup Steps 4.jpg]]  <br>
  
|border=5
+
<b>STEP 6:</b> Now Click on Restart and wait till the PC restarts.
 +
[[FILE:UsbAsp Setup Steps 5.jpg]]  <br>
  
}}
+
<b>STEP 7:</b> Once the PC restarts, Press 7/F7 to disable <b>Driver Signature Enforcement</b>.
 +
[[FILE:UsbAsp Setup Steps 6.jpg]]  <br>
 +
 
 +
<b>STEP 8:</b> Now Connect the Usbasp programmer to the system and it will be listed under other devices in device manager.
 +
[[FILE:UsbAsp Setup Steps 7.PNG]]  <br>
 +
 
 +
<b>STEP 9:</b> Right Click and choose <b>Update Driver Software</b>
 +
[[FILE:UsbAsp Setup Steps 8.png]]  <br>
 +
 
 +
<b>STEP 10:</b>Now browse and select the folder where the drivers are stored.
 +
[[FILE:UsbAsp Setup Steps 9.PNG]]  <br>
 +
 
 +
<b>STEP 11:</b> After selecting the driver folder, click on Next to install the drivers.
 +
[[FILE:UsbAsp Setup Steps 10.PNG]]  <br>
 +
 
 +
<b>STEP 12:</b> Click on <b>Install This Software Anyway</b>
 +
[[FILE:UsbAsp Setup Steps 11.PNG]]  <br>
 +
 
 +
<b>STEP 13:</b> Once the installion is successful, below message will be displayed.
 +
[[FILE:UsbAsp Setup Steps 12.PNG]]  <br>
 +
 
 +
<b>STEP 14:</b> Now the device will be listed under libusb-win32 devices.
 +
[[FILE:UsbAsp Setup Steps 13.PNG]]  <br><br><br>
 +
 
 +
=Using XploreFlash(AVR Dudes)=
 +
#Xplore flash is based on various open source software, it requires avrdude. Avrdude is part of WinAVR GCC compiler. [http://sourceforge.net/projects/winavr/files/latest/download?source=files Download and install it.]<br />
 +
#The GUI software will require [http://www.microsoft.com/en-gb/download/details.aspx?id=16614 .NET framework] 2.0 or later please download and install it.
 +
# Download and install [http://exploreembedded.com/wiki/images/e/ef/XploreFlash.zip  XploreFlash GUI] and follow the below steps.<br>
 +
<br>
 +
<b>STEP 1:</b> Run the Xplore Flash(Avr Dudes) software and
 +
#<font color="red">'''Keep the pins P1.5 - P1.7 open as they are used for flashing the code using USBasp'''</font>
 +
#Select the UsbAsp programmer from the dropdown as shown below.<br>
 +
#Select the AT89S52 controller from the drop down.<br>
 +
#Check the write option to flash the .hex file to the controller.<br>
 +
 
 +
 
 +
[[File:XploreFlash 01.png ]]  <br>
 +
 
 +
<b>STEP 2:</b> Browse and Select the .hex file to be flashed.
 +
[[File:XploreFlash 02.png]]  <br>
 +
 
 +
<b>STEP 3:</b> Finally hit the GO button to flash the .hex file.
 +
[[File:XploreFlash 03.png]]  <br>
 +
 
 +
<b>STEP 4:</b> Flashing status will be displayed in the conosle window.
 +
[[File:XploreFlash 04.PNG]]  <br>
 +
 
 +
 
 +
Have an opinion, suggestion , question or feedback about the article let it out here!
 +
{{DISQUS}}

Latest revision as of 17:39, 10 May 2017

In this tutorial, we will see how to use XploreFlash for flashing the hex files to AT89s52.
First, we will see how to install the XploreFlash software along with UsbAsp drivers and then continue with flashing the controller.

Installing UsbAsp Drivers

Download the UsbAsp drivers from this link and follow the below steps.
In case your are using Windows7/Vista/Xp, skip the first 7 steps and directly jump to step8.

Windows 8 and above do not allow the installation of drivers that are not digitally signed. This needs to be disabled by following the below steps.

STEP 1:Go to Advanced Start Options by searching the same in Windows Start Menu. UsbAsp Setup Steps.png

STEP 2: Click on Restart Now in Advanced Start Up options. UsbAsp Setup Steps 1.png

STEP 3: Now choose the Troubleshoot option. UsbAsp Setup Steps 2.jpg

STEP 4: Click on Advanced Options. UsbAsp Setup Steps 3.jpg

STEP 5: Click on StartUp Settings. UsbAsp Setup Steps 4.jpg

STEP 6: Now Click on Restart and wait till the PC restarts. UsbAsp Setup Steps 5.jpg

STEP 7: Once the PC restarts, Press 7/F7 to disable Driver Signature Enforcement. UsbAsp Setup Steps 6.jpg

STEP 8: Now Connect the Usbasp programmer to the system and it will be listed under other devices in device manager. UsbAsp Setup Steps 7.PNG

STEP 9: Right Click and choose Update Driver Software UsbAsp Setup Steps 8.png

STEP 10:Now browse and select the folder where the drivers are stored. UsbAsp Setup Steps 9.PNG

STEP 11: After selecting the driver folder, click on Next to install the drivers. UsbAsp Setup Steps 10.PNG

STEP 12: Click on Install This Software Anyway UsbAsp Setup Steps 11.PNG

STEP 13: Once the installion is successful, below message will be displayed. UsbAsp Setup Steps 12.PNG

STEP 14: Now the device will be listed under libusb-win32 devices. UsbAsp Setup Steps 13.PNG


Using XploreFlash(AVR Dudes)

  1. Xplore flash is based on various open source software, it requires avrdude. Avrdude is part of WinAVR GCC compiler. Download and install it.
  2. The GUI software will require .NET framework 2.0 or later please download and install it.
  3. Download and install XploreFlash GUI and follow the below steps.


STEP 1: Run the Xplore Flash(Avr Dudes) software and

  1. Keep the pins P1.5 - P1.7 open as they are used for flashing the code using USBasp
  2. Select the UsbAsp programmer from the dropdown as shown below.
  3. Select the AT89S52 controller from the drop down.
  4. Check the write option to flash the .hex file to the controller.


XploreFlash 01.png

STEP 2: Browse and Select the .hex file to be flashed. XploreFlash 02.png

STEP 3: Finally hit the GO button to flash the .hex file. XploreFlash 03.png

STEP 4: Flashing status will be displayed in the conosle window. XploreFlash 04.PNG


Have an opinion, suggestion , question or feedback about the article let it out here!