(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[User:Sharana|Sharana]] ([[User talk:Sharana|talk]]) 13:47, 7 August 2015 (IST)
 
[[User:Sharana|Sharana]] ([[User talk:Sharana|talk]]) 13:47, 7 August 2015 (IST)
 
----
 
----
[[Category:PIC Development Boards]]
+
[[Category:PIC Tutorials]]
 +
We ship ds30 PIC bootloader with various PIC micro-controllers. This quick tutorial explains how to use the bootloader to program the board.
 +
==Hardware Setup==
 +
===Basic Connections===
 +
You basically need a USB to UART board and target MCU with pins taken out. Remember some of our boards are shipped with the serial adapter board. If you do not have one, you may purchase the nice little board below:
  
{{Box|type=blue_dark|text=
+
<html>
Flashing the bootloader
+
<a href="https://www.exploreembedded.com/product/Explore%20USB%20to%20Serial%20breakout%20(CP2102).">
}}
+
[https://www.exploreembedded.com/wiki/images/1/14/PICkit2.zip  '''Download'''] and install the PICKit 2 Programmer.
+
{{Box|type=blue_dark|text=
+
Connect the board with programmer as shown in the image
+
}}
+
[[File:DSC04008.JPG |x300px]]
+
[[File:DSC04013.JPG |x300px]]
+
  
{{Box|type=blue_dark|text=
+
<img src ="https://www.exploreembedded.com/blog/wp-content/uploads/img-collections/explore-usb-to-serial-breakout/1-dsc03963.jpg" width = "300px"> </a>
Open the PICkit 2 Programmer Click on '''Tools''' and Click on '''Check Communication'''
+
</html>
}}
+
[[File:Capture.PNG |x700px]]
+
  
{{Box|type=blue_dark|text=
+
Most of the Explore Embedded PIC Development boards come with standard pin breakouts for the UART. These come with a female header and and the UART comes with a corresponding male header. You can directly plug and mate them.  
If connections are fine, Controller and Programmer will detect
+
}}
+
[[File:Capture5.PNG|x700px]]
+
  
{{Box|type=blue_dark|text=
+
In case, you do not have this setup you'll have to make the connections listed below:
Click on File and Import the Downloaded HEX file
+
}}
+
[[File:Capture2.PNG|x700px]]
+
  
{{Box|type=blue_dark|text=
+
{| class="wikitable"
HEX File is Imported sucessfully
+
|-
}}
+
! USB to UART !! PIC Micro-controller ||e.g PIC16877A pins/names
[[File:Capture6.PNG |x700px]]
+
|-
 +
| RXD|| TXD||25 (RC6/TX)
 +
|-
 +
| TXD|| RXD||25 (RC7/RX)
 +
|-
 +
| DTR || RESET|| 1 (MCLR)
 +
|-
 +
| GND|| GND||12 (VSS)
 +
|-
 +
| VCC|| VCC|| 11 (VDD)
 +
|-
 +
|}
 +
The images below show the connections for the PIC Ultra Development board and also the breakout out board. You can use any of the ways, depending the boards that you have.  
  
{{Box|type=blue_dark|text=
+
'''Ensure that the DTR jumper is placed as shown in the images.'''
Click on Write
+
Connection with the Ultra PIC base board
}}
+
[[File:Capture7.PNG |x700px]]
+
  
 +
[[File:Capture9.PNG |x400px]]<br>
 +
Connection with the PIC breakout board<br>
 +
[[File:Capture8.PNG |x400px]]
  
 
+
==Software Setup and usage==
{{Box|type=blue_dark|text=
+
[http://exploreembedded.com/wiki/File:Ds30LoaderGui.zip  '''Download'''] and install the DS30 bootloader gui.
Flashing the Hex file using ds30 bootloader}}
+
{{Box|type=l_green_light|text=
+
STEP 1: [http://exploreembedded.com/wiki/File:Ds30LoaderGui.zip  '''Download'''] and install the DS30 bootloader gui.
+
 
+
{{Box|type=blue_dark|text=
+
Connect the board with USB to Serial shield and connect jumper as shown in images
+
}}
+
[[File:Capture9.PNG |x300px]]
+
[[File:Capture8.PNG |x300px]]
+
Step 2:
+
 
[[File:DS30 Step0.PNG|x400px|Setup Parameters]]
 
[[File:DS30 Step0.PNG|x400px|Setup Parameters]]
 
*Browse the hex file
 
*Browse the hex file
Line 63: Line 55:
 
Step 4: Click on the write option to flash the hex file,. Images below show the sequence.
 
Step 4: Click on the write option to flash the hex file,. Images below show the sequence.
  
<hovergallery maxhoverwidth=600 maxhoverheight=600>
+
<gallery mode = "packed-overlay">
 
File:DS30 Step2.PNG|...detects bootloader
 
File:DS30 Step2.PNG|...detects bootloader
 
File:DS30_Step3.PNG|...finishes flashing.
 
File:DS30_Step3.PNG|...finishes flashing.
</hovergallery>
+
</gallery>
}}
+
 
 +
==Resources and Downloads==
 +
*[https://www.exploreembedded.com/wiki/images/1/14/PICkit2.zip  '''PICKit 2 Programmer''']
 +
*[http://exploreembedded.com/wiki/File:Ds30LoaderGui.zip  '''DS30 bootloader gui''']
 +
*[https://www.exploreembedded.com/wiki/File:DS_30_16F877A.rar  '''DS30 bootloader HEX File''']
 +
==Restoring the bootloader==
 +
In case you've replaced or damaged the IC shipped with the board, follow the tutorial below:
 +
*[[Flashing the Hex file using ds30 bootloader|Restoring the bootloader]]
  
{{Box|type=blue_dark|text=Downloads}}
 
{{Box|type=l_green_light|text=<br />
 
*[http://xplorelabz.com/wiki/images/8/87/PIC_Starter_USB_SampleCode.rar Sample Code]
 
*[http://xplorelabz.com/wiki/images/a/a5/PIC_Starter_USB_Schematic.pdf Schematic]
 
}}
 
 
{{DISQUS}}
 
{{DISQUS}}

Latest revision as of 13:17, 10 August 2015

Sharana (talk) 13:47, 7 August 2015 (IST)


We ship ds30 PIC bootloader with various PIC micro-controllers. This quick tutorial explains how to use the bootloader to program the board.

Hardware Setup

Basic Connections

You basically need a USB to UART board and target MCU with pins taken out. Remember some of our boards are shipped with the serial adapter board. If you do not have one, you may purchase the nice little board below:

Most of the Explore Embedded PIC Development boards come with standard pin breakouts for the UART. These come with a female header and and the UART comes with a corresponding male header. You can directly plug and mate them.

In case, you do not have this setup you'll have to make the connections listed below:

USB to UART PIC Micro-controller e.g PIC16877A pins/names
RXD TXD 25 (RC6/TX)
TXD RXD 25 (RC7/RX)
DTR RESET 1 (MCLR)
GND GND 12 (VSS)
VCC VCC 11 (VDD)

The images below show the connections for the PIC Ultra Development board and also the breakout out board. You can use any of the ways, depending the boards that you have.

Ensure that the DTR jumper is placed as shown in the images. Connection with the Ultra PIC base board

Capture9.PNG
Connection with the PIC breakout board
Capture8.PNG

Software Setup and usage

Download and install the DS30 bootloader gui. Setup Parameters

  • Browse the hex file
  • Select the appropriate MCU
  • Select the baud rate as 9600
  • Select the correct com port detected on your computer, when using USB to serial convertor check for exact COM port number in device manager

Step 3: The board uses DTR pin of the CP2102 USB to Serial Convertor to reset the MCU. Set it up as shown in the image below.

Setup AutoReset

Step 4: Click on the write option to flash the hex file,. Images below show the sequence.

Resources and Downloads

Restoring the bootloader

In case you've replaced or damaged the IC shipped with the board, follow the tutorial below:

  • Restoring the bootloader