Editing Programming the Device

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 62: Line 62:
  
 
==Download and Loading Firmware==
 
==Download and Loading Firmware==
===dsPicProgrammer User Guide===
 
[http://chungyan5.no-ip.org/download/software/dsPicProgrammer/dsPicProgrammerUserGuide_V2.0.1.pdf dsPicProgrammerUserGuide_V2.0.1]
 
  
 
===Hardware Requirement===
 
===Hardware Requirement===
Line 71: Line 69:
  
 
===Software Requirement===
 
===Software Requirement===
#[http://chungyan5.no-ip.org/vc/?root=dspicProgrammer dsPicProgrammer]
+
#[http://java.sun.com/javase/downloads/index.jsp JAVA JDK or JRE]
 +
#[http://users.frii.com/jarvi/rxtx/download.html RXTX Driver]: Download rxtx-2.1-7-bins-r2.zip or later
 +
#[http://chungyan5.no-ip.org/vc/?root=dspicProgrammer dsPicProgrammer] ('''dsPicProgrammer.jar''')
  
 
===Files===
 
===Files===
Line 79: Line 79:
  
 
====Setup COM Port====
 
====Setup COM Port====
[[Image:DSC00921.JPG | 480px]]
+
[[Image:DSC00921.JPG]]
 
*Connect your USB-COM converter cable to your computer
 
*Connect your USB-COM converter cable to your computer
 
*Or Using a real COM PORT
 
*Or Using a real COM PORT
  
 
+
[[Image:1.jpg]]
----
 
=====Find out your COM port Number=====
 
[[Image:1.jpg | 480px]]
 
 
*Go to Control Panel \ Device Manager
 
*Go to Control Panel \ Device Manager
  
 
+
[[Image:2.jpg]]
----
 
[[Image:2.jpg | 480 px]]
 
 
*Find out your Device COM Port Number
 
*Find out your Device COM Port Number
  
 
----
 
 
====Get the Dspic Programmer====
 
====Get the Dspic Programmer====
[[Image:programmer_3.jpg |480px]]
+
*Download [http://chungyan5.no-ip.org/open_data/electronic_computer/platforms/dspic/dsPicProgrammer/dsPicProgrammer1.5.5.zip dsPic_Programmer.zip], from [http://chungyan5.no-ip.org/open_data/electronic_computer/platforms/dspic/dsPicProgrammer/ws/ updated directory] or [http://chungyan5.no-ip.org/vc svn server]
*Download [http://chungyan5.no-ip.org/open_data/electronic_computer/platforms/dspic/dsPicProgrammer/dsPicProgrammer3.00.01s.zip dsPicProgrammer.zip], from [http://chungyan5.no-ip.org/open_data/electronic_computer/platforms/dspic/dsPicProgrammer/ws/ updated directory] or [http://chungyan5.no-ip.org/vc svn server]
+
*Save to a directory.
*Unzip the dsPicProgrammer.zip, then you have an unziped file.
+
::e.g. desktop
 
+
*Unzip the dsPic_Programmer.zip, then you have an unziped file.
 +
[[Image:prog_guid_dl.JPG]]
  
 
----
 
----
====Download Firmware====
 
[[Image:programmer_4.jpg |480px]]
 
*Save your .hex file(foo.hex) to the folder called firmware.
 
*Run dsPicProgrammer.bat (Windows) / dsPicProgrammer.sh (linux)
 
**Make sure your device is connected through a "Direct RS232 Cable" to PC Serial Port.
 
  
 +
*Drag the unzip file to a directory.
 +
::e.g. USB memory devices
 +
[[Image:prog_guid_drag.JPG]]
  
 
----
 
----
[[Image:programmer_6.jpg |480px]]
 
*Choose a COM port
 
*Choose a baudrate
 
::115200 is communication speed [in bps]
 
  
 +
*Save your .hex file(foo.hex) to your directory location 
 +
::e.g. X:\dsPic_Programmer\ ---> X:\ is the driver where the dsPic_Programmer located
 +
[[Image:prog_guid_hex.JPG]]
  
----
+
====Download Firmware====
[[Image:programmer_7.jpg |480px]]
+
*Start a Command Prompt
*Choose a .hex file
+
**Start -> Run<br>[[Image:2 1 run.JPG]]<br>
 
+
**Enter cmd<br>[[Image:2 2 cmd.JPG]]<br>
 
+
*Run dsPicProgrammer
----
+
**Make sure your device is connected through a "Direct RS232 Cable" to PC Serial Port.  
[[Image:programmer_8.jpg |480px]]
+
**Change to the directory where dsPicProgrammer.jar is located and run the command, for example:
*Press start
+
***Windows
*Then press Yes to confirm programming the device
+
****'''jre\bin\java -Djava.library.path=.\rxtx\bin -jar dspicProgrammer.jar COM1 115200 foo.hex''' or
 
+
****'''dsPicProgrammer.bat COM1 115200 foo.hex'''
 
+
***Linux
 
+
****'''java -Djava.library.path=./rxtx/bin -jar dsPicProgrammer.jar /dev/ttyS0 115200 foo.hex''' or
----
+
****'''dsPicProgrammer.sh /dev/ttyS0 115200 foo.hex'''
[[Image:programmer_9.jpg | 480px]]
+
**Legend:
*The status during programming
+
:::COM1 is your COM Port ID
 +
:::115200 is communication speed [in bps]
 +
:::foo.hex is your firmware new file
 +
::[[Image:5.jpg]]
 +
:*When the program prompt you for an input, press y:<br>[[Image:2 4 prompt.JPG]]<br>
 +
:*If communication can be established, you should see something like this:<br>[[Image:2 5 progress.JPG]]<br>
 +
:*Wait until programming is completed.<br>[[Image:2 6 complete.JPG]]<br>
 +
:*after all completed, power OFF your device, then power ON again, enjoy your new updated.
  
  
----
 
[[Image:programmer_10.jpg |480px]]
 
*The programming have been completed, press OK the close the message box
 
 
----
 
 
===Troubleshooting===
 
===Troubleshooting===
 
====Invalid COM Port====
 
====Invalid COM Port====
Line 156: Line 149:
 
*Solution:
 
*Solution:
 
**Copy the contents under directory '''C:/Program Files/Java/jre$(VERSION)/''' to '''/dsPicProgrammer/jre'''
 
**Copy the contents under directory '''C:/Program Files/Java/jre$(VERSION)/''' to '''/dsPicProgrammer/jre'''
 
== Further reading ==
 
 
* [[PIC Programmers, In Circuit Programming and BootLoaders]]
 

Please note that all contributions to OpenCircuits may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see OpenCircuits:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)