http://www.opencircuits.com/api.php?action=feedcontributions&user=Nelson&feedformat=atomOpenCircuits - User contributions [en]2024-03-29T05:01:20ZUser contributionsMediaWiki 1.34.2http://www.opencircuits.com/index.php?title=Programming_the_Device&diff=19219Programming the Device2010-02-01T08:15:21Z<p>Nelson: </p>
<hr />
<div>Description on how to use dsPicProgrammer to download firmware to [{{SERVER}}/DsPIC30F_5011_Development_Board DsPIC30F 5011 Development Board]<br />
<br />
==Loading Bootloader (Once only)==<br />
<br />
===Hardware Requirement===<br />
#PC with USB port (with Windows)<br />
#ICD2 Programmer<br />
#Target Board<br />
#5V Power Supply<br />
<br />
===Software Requirement===<br />
#[http://ww1.microchip.com/downloads/en/DeviceDoc/MP750.zip MPLAB IDE v7.50]: v7.60 is not compatible with our current [http://www.sure-electronics.com/ ICD2 Programmers]. There are consistent "Devices cannot be founded" warnings. See [http://www.sureelectronics.net/pdfs/DB-DP003.pdf manual] for details.<br />
<br />
===Files===<br />
#[http://chungyan5.no-ip.org/vc/?root=dspic_bootloader dsPicBootloader] ('''bl_$(MODEL).hex''').<br />
<br />
===Procedure===<br />
{|border="1" cellspacing="0" cellpadding="5"<br />
|+ Loading Bootloader<br />
! Step !! Remarks <br />
|-valign="top"<br />
| Install [http://ww1.microchip.com/downloads/en/DeviceDoc/MP750.zip MPLAB IDE] || <br />
*Do '''NOT''' connect ICD 2 (via USB) to PC<br />
*Execute '''MPLAB vX.XX Install.exe'''<br />
|-valign="top"<br />
| Install USB Driver ||<br />
*Follow the instruction in (C:\Program Files\Microchip\MPLAB IDE\ICD2\Drivers\Ddicd2.htm)<br />
|-valign="top"<br />
| Select Target Chip ||<br />
*Run MPLAB IDE on PC<br />
*Select: Configure>Select Devices...<br />
*Choose the correct dsPic model<br />
|-valign="top"<br />
| Load Bootloader ||<br />
*Select: File>Import...<br />
*Select '''bl_$(MODEL).hex'''<br />
|-valign="top"<br />
| ICD 2 <-> PC ||<br />
*Plug-in ICD 2 to PC via USB cable<br />
|-valign="top"<br />
| Target <-> ICD 2 ||<br />
*Connect six pin cable to target board. Beware of the pin assignments. Only pin 1 - 5 are used.<br />
*Power-up the target.<br />
|-valign="top"<br />
| ICD 2 <-> PC ||<br />
*Select: Programmer>Select Programmer>MPLAB ICD 2<br />
*If this is the first time the ICD 2 is connected to PC, MPLAB IDE will automatically download the required OS to ICD 2, wait until it has finished<br />
*If you have not connected and powered up the target, you might see Warnings on invalid device IDs, and/or running self tests.<br />
*See results of self test if necessary: Programmer>Settings, Status Tab. Refer to [http://ww1.microchip.com/downloads/en/DeviceDoc/51331B.pdf ICD2 User's Guide] Chapter 7.<br />
|-valign="top"<br />
| Start Programming ||<br />
*Select: Programmer>Program<br />
*Wait until finishes<br />
|-valign="top"<br />
| Finishing ||<br />
*Power-down the Target<br />
*Select: Programmer>Select Programmer>None<br />
*Unplug USB cable<br />
|-<br />
|}<br />
<br />
<br />
==Download and Loading Firmware==<br />
===dsPicProgrammer User Guide===<br />
[http://chungyan5.no-ip.org/open_data/electronic_computer/platforms/dspic/dsPicProgrammer/dsPicProgrammerUserGuide_V1.0.0.pdf dsPicProgrammerUserGuide_V1.0.0]<br />
===Hardware Requirement===<br />
#PC (Linux/Windows) with COM Port OR USB-COM converter cable<br />
#Target Board (with bootloader)<br />
#5V Power Supply<br />
<br />
===Software Requirement===<br />
#[http://java.sun.com/javase/downloads/index.jsp JAVA JDK or JRE]<br />
#[http://users.frii.com/jarvi/rxtx/download.html RXTX Driver]: Download rxtx-2.1-7-bins-r2.zip or later<br />
#[http://chungyan5.no-ip.org/vc/?root=dspicProgrammer dsPicProgrammer] ('''dsPicProgrammer.jar''')<br />
<br />
===Files===<br />
#Application hex file (e.g. '''app.hex''')<br />
<br />
===Procedure===<br />
<br />
====Setup COM Port====<br />
:[[Image:DSC00921.JPG]]<br />
*Connect your USB-COM converter cable to your computer<br />
*Or Using a real COM PORT<br />
<br />
<br />
<br />
----<br />
=====Find out your COM port Number=====<br />
[[Image:1.jpg]]<br />
*Go to Control Panel \ Device Manager<br />
<br />
<br />
<br />
----<br />
[[Image:2.jpg]]<br />
*Find out your Device COM Port Number<br />
<br />
<br />
<br />
<br />
----<br />
====Get the Dspic Programmer====<br />
[[Image:programmer_3.jpg]]<br />
*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]<br />
*Unzip the dsPicProgrammer.zip, then you have an unziped file.<br />
<br />
<br />
<br />
<br />
----<br />
====Download Firmware====<br />
[[Image:programmer_4.jpg]]<br />
*Save your .hex file(foo.hex) to the folder called firmware.<br />
*Run dsPicProgrammer.bat (Windows) / dsPicProgrammer.sh (linux)<br />
**Make sure your device is connected through a "Direct RS232 Cable" to PC Serial Port. <br />
<br />
<br />
<br />
<br />
----<br />
[[Image:programmer_6.jpg]]<br />
*Choose a COM port<br />
*Choose a braudrate <br />
::115200 is communication speed [in bps]<br />
<br />
<br />
<br />
<br />
----<br />
[[Image:programmer_7.jpg]]<br />
*Choose a .hex file<br />
<br />
<br />
<br />
<br />
<br />
----<br />
[[Image:programmer_8.jpg]]<br />
*Press start <br />
*Then press Yes to confirm programming the device<br />
<br />
<br />
<br />
<br />
----<br />
[[Image:programmer_9.jpg]]<br />
*The status during programming<br />
<br />
<br />
<br />
<br />
----<br />
[[Image:programmer_10.jpg]]<br />
*The the programming have been completed, press OK the close the message box<br />
<br />
<br />
<br />
----<br />
===Troubleshooting===<br />
====Invalid COM Port====<br />
*In case of selecting an invalid COM port, you should see the error message:<br>''gnu.io.NoSuchPortException: Choosing COM Port Error''<br>[[Image:3 1 com err.JPG]]<br><br><br />
*Solution: check the COM port ID, or close any programs that are using the COM Port<br />
====Missing firmware file====<br />
*In case of selecting a firmware file that does not exist, you should see the error message:<br>''java.io.FileNotFoundException: foo1.hex <The system cannot find the file specified>''<br>[[Image:3 2 file err.JPG]]<br><br><br />
*Solution: check the file path<br />
====Missing RXTX driver====<br />
*In case of missing the RXTX driver, you should see the error message:<br>''Exception in thread “main” java.lang.NoClassDefFoundError: gnu/io/UnsupportedCommOperationException''<br>[[Image:3 3 rxtx err.JPG]]<br><br><br />
*Solution: <br />
**Copy '''RXTXcomm.jar''' to '''/dsPicProgrammer/rxtx/lib'''<br />
**Copy '''rxtxSerial.dll''' to '''/dsPicProgrammer/rxtx/bin''' (Window)<br />
**Copy '''librxtxSerial.so''' to '''/dsPicProgrammer/rxtx/bin''' (Linux)<br />
====Missing JAVA====<br />
*In case of missing JAVA JDK or JRE, an error message will be prompted.<br />
*Solution:<br />
**Copy the contents under directory '''C:/Program Files/Java/jre$(VERSION)/''' to '''/dsPicProgrammer/jre'''<br />
<br />
== Further reading ==<br />
<br />
* [[PIC Programmers, In Circuit Programming and BootLoaders]]</div>Nelsonhttp://www.opencircuits.com/index.php?title=Programming_the_Device&diff=19218Programming the Device2010-02-01T08:00:04Z<p>Nelson: /* Download and Loading Firmware */ update the new menu</p>
<hr />
<div>Description on how to use dsPicProgrammer to download firmware to [{{SERVER}}/DsPIC30F_5011_Development_Board DsPIC30F 5011 Development Board]<br />
<br />
==Loading Bootloader (Once only)==<br />
<br />
===Hardware Requirement===<br />
#PC with USB port (with Windows)<br />
#ICD2 Programmer<br />
#Target Board<br />
#5V Power Supply<br />
<br />
===Software Requirement===<br />
#[http://ww1.microchip.com/downloads/en/DeviceDoc/MP750.zip MPLAB IDE v7.50]: v7.60 is not compatible with our current [http://www.sure-electronics.com/ ICD2 Programmers]. There are consistent "Devices cannot be founded" warnings. See [http://www.sureelectronics.net/pdfs/DB-DP003.pdf manual] for details.<br />
<br />
===Files===<br />
#[http://chungyan5.no-ip.org/vc/?root=dspic_bootloader dsPicBootloader] ('''bl_$(MODEL).hex''').<br />
<br />
===Procedure===<br />
{|border="1" cellspacing="0" cellpadding="5"<br />
|+ Loading Bootloader<br />
! Step !! Remarks <br />
|-valign="top"<br />
| Install [http://ww1.microchip.com/downloads/en/DeviceDoc/MP750.zip MPLAB IDE] || <br />
*Do '''NOT''' connect ICD 2 (via USB) to PC<br />
*Execute '''MPLAB vX.XX Install.exe'''<br />
|-valign="top"<br />
| Install USB Driver ||<br />
*Follow the instruction in (C:\Program Files\Microchip\MPLAB IDE\ICD2\Drivers\Ddicd2.htm)<br />
|-valign="top"<br />
| Select Target Chip ||<br />
*Run MPLAB IDE on PC<br />
*Select: Configure>Select Devices...<br />
*Choose the correct dsPic model<br />
|-valign="top"<br />
| Load Bootloader ||<br />
*Select: File>Import...<br />
*Select '''bl_$(MODEL).hex'''<br />
|-valign="top"<br />
| ICD 2 <-> PC ||<br />
*Plug-in ICD 2 to PC via USB cable<br />
|-valign="top"<br />
| Target <-> ICD 2 ||<br />
*Connect six pin cable to target board. Beware of the pin assignments. Only pin 1 - 5 are used.<br />
*Power-up the target.<br />
|-valign="top"<br />
| ICD 2 <-> PC ||<br />
*Select: Programmer>Select Programmer>MPLAB ICD 2<br />
*If this is the first time the ICD 2 is connected to PC, MPLAB IDE will automatically download the required OS to ICD 2, wait until it has finished<br />
*If you have not connected and powered up the target, you might see Warnings on invalid device IDs, and/or running self tests.<br />
*See results of self test if necessary: Programmer>Settings, Status Tab. Refer to [http://ww1.microchip.com/downloads/en/DeviceDoc/51331B.pdf ICD2 User's Guide] Chapter 7.<br />
|-valign="top"<br />
| Start Programming ||<br />
*Select: Programmer>Program<br />
*Wait until finishes<br />
|-valign="top"<br />
| Finishing ||<br />
*Power-down the Target<br />
*Select: Programmer>Select Programmer>None<br />
*Unplug USB cable<br />
|-<br />
|}<br />
<br />
<br />
==Download and Loading Firmware==<br />
===dsPicProgrammer User Guide===<br />
[http://chungyan5.no-ip.org/open_data/electronic_computer/platforms/dspic/dsPicProgrammer/dsPicProgrammerUserGuide_V1.0.0.pdf dsPicProgrammerUserGuide_V1.0.0]<br />
===Hardware Requirement===<br />
#PC (Linux/Windows) with COM Port OR USB-COM converter cable<br />
#Target Board (with bootloader)<br />
#5V Power Supply<br />
<br />
===Software Requirement===<br />
#[http://java.sun.com/javase/downloads/index.jsp JAVA JDK or JRE]<br />
#[http://users.frii.com/jarvi/rxtx/download.html RXTX Driver]: Download rxtx-2.1-7-bins-r2.zip or later<br />
#[http://chungyan5.no-ip.org/vc/?root=dspicProgrammer dsPicProgrammer] ('''dsPicProgrammer.jar''')<br />
<br />
===Files===<br />
#Application hex file (e.g. '''app.hex''')<br />
<br />
===Procedure===<br />
<br />
====Setup COM Port====<br />
:[[Image:DSC00921.JPG]]<br />
*Connect your USB-COM converter cable to your computer<br />
*Or Using a real COM PORT<br />
<br />
<br />
----<br />
<br />
=====Find out your COM port Number=====<br />
[[Image:1.jpg]]<br />
*Go to Control Panel \ Device Manager<br />
<br />
----<br />
<br />
<br />
[[Image:2.jpg]]<br />
*Find out your Device COM Port Number<br />
<br />
----<br />
<br />
<br />
====Get the Dspic Programmer====<br />
[[Image:programmer_3.jpg]]<br />
*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]<br />
*Unzip the dsPicProgrammer.zip, then you have an unziped file.<br />
<br />
<br />
----<br />
<br />
<br />
<br />
====Download Firmware====<br />
[[Image:programmer_4.jpg]]<br />
*Save your .hex file(foo.hex) to the folder called firmware.<br />
*Run dsPicProgrammer.bat (Windows) / dsPicProgrammer.sh (linux)<br />
**Make sure your device is connected through a "Direct RS232 Cable" to PC Serial Port. <br />
<br />
<br />
----<br />
<br />
<br />
[[Image:programmer_6.jpg]]<br />
*Choose a COM port<br />
*Choose a braudrate <br />
::115200 is communication speed [in bps]<br />
<br />
----<br />
<br />
<br />
<br />
[[Image:programmer_7.jpg]]<br />
*Choose a .hex file<br />
<br />
<br />
----<br />
<br />
<br />
<br />
<br />
[[Image:programmer_8.jpg]]<br />
*Press start <br />
*Then press Yes to confirm programming the device<br />
<br />
<br />
<br />
----<br />
[[Image:programmer_9.jpg]]<br />
*The status during programming<br />
<br />
----<br />
<br />
[[Image:programmer_10.jpg]]<br />
*The the programming have been completed, press OK the close the message box<br />
<br />
<br />
===Troubleshooting===<br />
====Invalid COM Port====<br />
*In case of selecting an invalid COM port, you should see the error message:<br>''gnu.io.NoSuchPortException: Choosing COM Port Error''<br>[[Image:3 1 com err.JPG]]<br><br><br />
*Solution: check the COM port ID, or close any programs that are using the COM Port<br />
====Missing firmware file====<br />
*In case of selecting a firmware file that does not exist, you should see the error message:<br>''java.io.FileNotFoundException: foo1.hex <The system cannot find the file specified>''<br>[[Image:3 2 file err.JPG]]<br><br><br />
*Solution: check the file path<br />
====Missing RXTX driver====<br />
*In case of missing the RXTX driver, you should see the error message:<br>''Exception in thread “main” java.lang.NoClassDefFoundError: gnu/io/UnsupportedCommOperationException''<br>[[Image:3 3 rxtx err.JPG]]<br><br><br />
*Solution: <br />
**Copy '''RXTXcomm.jar''' to '''/dsPicProgrammer/rxtx/lib'''<br />
**Copy '''rxtxSerial.dll''' to '''/dsPicProgrammer/rxtx/bin''' (Window)<br />
**Copy '''librxtxSerial.so''' to '''/dsPicProgrammer/rxtx/bin''' (Linux)<br />
====Missing JAVA====<br />
*In case of missing JAVA JDK or JRE, an error message will be prompted.<br />
*Solution:<br />
**Copy the contents under directory '''C:/Program Files/Java/jre$(VERSION)/''' to '''/dsPicProgrammer/jre'''<br />
<br />
== Further reading ==<br />
<br />
* [[PIC Programmers, In Circuit Programming and BootLoaders]]</div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Programmer_10.jpg&diff=19217File:Programmer 10.jpg2010-02-01T07:33:31Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Programmer_9.jpg&diff=19216File:Programmer 9.jpg2010-02-01T07:33:18Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Programmer_8.jpg&diff=19215File:Programmer 8.jpg2010-02-01T07:33:02Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Programmer_7.jpg&diff=19214File:Programmer 7.jpg2010-02-01T07:32:47Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Programmer_6.jpg&diff=19213File:Programmer 6.jpg2010-02-01T07:32:32Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Programmer_5.jpg&diff=19212File:Programmer 5.jpg2010-02-01T07:32:19Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Programmer_4.jpg&diff=19211File:Programmer 4.jpg2010-02-01T07:32:07Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Programmer_3.jpg&diff=19210File:Programmer 3.jpg2010-02-01T07:31:53Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Programmer_2.jpg&diff=19209File:Programmer 2.jpg2010-02-01T07:31:28Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Programmer_1.jpg&diff=19208File:Programmer 1.jpg2010-02-01T07:31:14Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Prog_guid_hex.JPG&diff=19207File:Prog guid hex.JPG2010-02-01T07:28:58Z<p>Nelson: uploaded a new version of "File:Prog guid hex.JPG"</p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Prog_guid_drag.JPG&diff=19206File:Prog guid drag.JPG2010-02-01T07:27:06Z<p>Nelson: uploaded a new version of "File:Prog guid drag.JPG"</p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:2.jpg&diff=19204File:2.jpg2010-02-01T07:25:26Z<p>Nelson: uploaded a new version of "File:2.jpg"</p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:1.jpg&diff=19203File:1.jpg2010-02-01T07:24:18Z<p>Nelson: uploaded a new version of "File:1.jpg"</p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Incorrect_network_setting.png&diff=18028File:Incorrect network setting.png2009-02-25T07:09:44Z<p>Nelson: uploaded a new version of "Image:Incorrect network setting.png"</p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Incorrect_network_setting.png&diff=18027File:Incorrect network setting.png2009-02-25T07:05:11Z<p>Nelson: uploaded a new version of "Image:Incorrect network setting.png"</p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Incorrect_network_setting.png&diff=18026File:Incorrect network setting.png2009-02-25T07:03:15Z<p>Nelson: uploaded a new version of "Image:Incorrect network setting.png"</p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Incorrect_network_setting.png&diff=18025File:Incorrect network setting.png2009-02-25T07:01:55Z<p>Nelson: uploaded a new version of "Image:Incorrect network setting.png"</p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Correct_network_setting.png&diff=18024File:Correct network setting.png2009-02-25T07:01:39Z<p>Nelson: uploaded a new version of "Image:Correct network setting.png"</p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Correct_network_setting.png&diff=18023File:Correct network setting.png2009-02-25T07:00:04Z<p>Nelson: uploaded a new version of "Image:Correct network setting.png"</p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=Ethernet_Module&diff=18022Ethernet Module2009-02-25T06:56:25Z<p>Nelson: /* Internet Connection */</p>
<hr />
<div>This project aims to develop an Ethernet Module, to be used in conjunction with a 8/16 bits embedded system such as the dsPic33F development board. <br />
<br />
==Objectives==<br />
The Internet provides an indispensable means to exchange information over long distances. Connection to the Internet is enabled by following the implementation of the Open Systems Interconnection Reference Model (OSI model). In simple words, internet applications require a TCP/IP stack to pack and unpack information into data packets for proper transmission and reception over the Internet. The TCP/IP stack is usually implemented by software and included in the Operating System. Applications can use the stack transparently through socket programming.<br />
<br />
Since a full-scale TCP/IP stack consumes a large amount of memory and processing power, a number of small footprint TCP/IP stacks have been devised for embedded systems, such as uIP and lwIP. Nevertheless, these TCP/IP stacks are usually not compatible to socket programming, and being implemented by software, still consumes a considerable amount of system resources. Therefore, hardware chips that implemented the TCP/IP stack (e.g. [http://www.wiznet.co.kr/en/pro02.php?&page=1&num=26 WIZNET W5300]) emerged in recent years so as to offload the computation power from the host microcontroller unit (MCU).<br />
<br />
This project aims to devise a driver and Linux socket wrapper inside freertos_posix for a hardware implemented TCP/IP stack. It is to be used in conjunction with a 8/16 bits embedded system such as (but not restricted to) the [http://opencircuits.com/DsPIC30F_5011_Development_Board dsPic33F development board]. Based on the Linux socket API, common application protocols (DHCP/HTTP/DNS/SMTP/SNMP/TELNET) are devised to enable remote control and monitoring.<br />
<br />
===Benefits===<br />
*Provide a means to perform remote control and monitoring via Internet<br />
*Offload TCP/IP stack to chip, freeing memory and processing power of MCU to perform other tasks (e.g. HTTPS)<br />
*Socket API implementation allows more extensible framework for future development and upgrades<br />
*Enable remote control and monitoring via<br />
**Web browser on desktop computer (better web page design and implementation)<br />
**SNMP agents, controlling and monitoring several instruments simultaneously<br />
**TELNET applications for command prompt control and monitoring<br />
**SMTP by sending out email when critical events occur<br />
<br />
===Limitations===<br />
*Higher cost chips compare to software stack<br />
*Need to change hardware if features in stack are updated<br />
<br />
<br />
==Architecture==<br />
*See [http://www.opencircuits.com/Multi-purpose_Embedded_System#TCP.2FIP_Stack here] for block diagram<br />
<br />
<br />
==Development Roadmap==<br />
===Phase 1===<br />
*Select chips and draw schematic and pcb<br />
*Obtain samples for chip<br />
<br />
===Phase 2===<br />
*Device driver<br />
*Create a Linux socket API wrapper in freertos_posix<br />
<br />
===Phase 3===<br />
*Reference to Linux socket/lwip, create libraries for<br />
**DHCP client<br />
**HTTP server<br />
***Decide how to get files (html, css, cgi, etc) from nvm (with/without file system)<br />
***Decide an efficient means to create and download web page to nvm<br />
**DNS resolver<br />
**SMTP mail client<br />
**SNMP agent<br />
**TELNET application<br />
<br />
===Phase 4===<br />
*Explore wireless-bridge solutions<br />
**[http://www.wiznet.co.kr/en/pro02.php?&page=1&num=180 WIZ610wi]<br />
**[http://ftp1.digi.com/support/documentation/productmanual_xstream_oem_rfmodule_v5.x00.pdf XStream OEM RF Module]<br />
<br />
<br />
==Network Configuration==<br />
Our Ethernet products (units) can be controlled by a PC using the TCP-IP protocol. The PC and the units can be setup using one of three topologies:<br />
#Direct Connection;<br />
#Intranet Connection; <br />
#Internet Connection.<br />
===Direct Connection===<br />
An example showing how to connect a PC and a unit directly is shown in Fig. 1. In this topology, the unit can be connected with the PC simply using a direct Ethernet cable. Please ensure that the PC and the unit share the same subnet mask and gateway, but different IP addresses. An incorrect example is shown in Fig. 2. Under direct connection, the user has to set these network configurations manually.<br />
:[[Image:correct_network_setting.png]]<br />
:[[Image:incorrect_network_setting.png]]<br />
To set the network configuration on the unit, the user has to select the Static mode. The default IP addresses, subnet mask, and gateway are 192.168.1.128, 255.255.255.0 and 192.168.1.1 respectively. These settings can only be changed when the Ethernet status is Down. Once they have been changed, the values will be automatically saved.<br />
<br />
'''To configure the network settings on the PC, '''<br />
*Goto '''<Start>''' and '''<Control Panel>''', open '''<Network Connections>'''<br />
:[[Image:Nict_networksetting11.png]]<br />
*Select the Local Area Connection corresponding to the network card on your PC. Right click and select '''<Properties>'''<br />
:[[Image:Nict_networksetting12.png]]<br />
*Under '''<General>''' tab, scroll down to '''<Internet Protocol (TCP/IP)>'''and click '''<Properties>'''<br />
:[[Image:Nict_networksetting13.png]]<br />
*Select '''<Use the following IP address:>''' and enter the appropriate network settings. Please ensure that the IP address is different from the one used by the unit.<br />
:[[Image:Nict_networksetting14.png]]<br />
<br />
===Intranet Connection===<br />
An example showing how to connect a PC and 3 units in an intranet is shown in Fig. 3. In this topology, the PC and the units can be plugged into the network sockets directly or through a hub. The units can obtain IP addresses either dynamically by DHCP or statically by assignment. <br />
:[[Image:Nict_networksetting_intranet.png]]<br />
In a network supporting DHCP, the IP address, subnet mask and gateway can be configured automatically if DHCP mode is selected. If the unit cannot acquired a valid connection via DHCP, the IP address, subnet mask and gateway will be displayed as 0.0.0.0. Please consult your network administrator whether your network supports DHCP.<br />
<br />
In Static mode, the user has to configure the IP address, subnet mask and gateway manually. These settings can only be changed when the Ethernet status is Down. The default settings are 192.168.1.128, 255.255.255.0 and 192.168.1.1 respectively. Please note that a logical network cannot accommodate two units with the same IP address, so you should consult your network administrator before using the Static mode. The network administrator will give you the appropriate settings.<br />
===Internet Connection===<br />
An example showing how to connect a PC and a unit (Unit 4) in the Internet is shown in Fig. 4. Similar to the intranet topology, the PC and the units can also be plugged into the network sockets directly or through a hub. The units can also obtain IP addresses either dynamically by DHCP or statically by assignment. <br />
:[[Image:Nict_networksetting_internet.png]]<br />
Network configuration on the unit is identical to that described in intranet connection (section 1.2). Note that the IP address displayed on the unit is the local IP address. To remote access a unit under Internet connection, the PC needs to know the global IP address of the unit. Please consult your network administrator of the corresponding global IP address.<br />
<br />
==Software TCP/IP Stack Solution==<br />
===Circuit and PCB===<br />
*In [http://chungyan5.no-ip.org/vc/?root=ethernet gEDA format] and its gEDA [http://www.opencircuits.com/PCB_Footprints#gEDA_Symbols_and_footprints sym and footprints]<br />
{|border="1" cellspacing="0" cellpadding="5"<br />
! Special Item !! Description !! Quantity<br />
|-valign="top"<br />
| [http://www.davicom.com.tw/userfile/24247/DM9000A-DS-F01-101906.pdf DM9000AEP] || Ethernet Controller from [http://www.davicom.com.tw/ Davicom] || 1<br />
|-<br />
| [http://www.hanrun.com/hr/upfile/2_1_113.pdf HR911102A] || RJ45 Connector with Integrated Magnetics for 10/100 Base-TX || 1<br />
|-<br />
| [http://ww1.microchip.com/downloads/en/DeviceDoc/21749F.pdf 93LC46B-I/SN] || 1K Serial EEPROM || 1 (Optional)<br />
|-<br />
| 25MHz Crystal || Crystal || 1<br />
|-<br />
| 22pF || For Crystal Use || 2<br />
|-<br />
| 220uF || For RXVDD25/TXVDD25 || 1<br />
|-<br />
| 49.9ohm || For RX+/RX-/TX+/TX- || 4<br />
|-<br />
| 6.8kohm || For BGRES/BGGND || 1<br />
|-<br />
| 510ohm || For LEDs|| 2<br />
|-<br />
|}<br />
*[http://www.davicom.com.tw/eng/products/dm9000a.htm DM9000A Description]<br />
*[http://www.davicom.com.tw/big5/download/Data%20Sheet/DM9000A-DS-F01-101906.pdf DM9000A Datasheet]<br />
*[http://www.davicom.com.tw/big5/download/AC/dm9000a/DM9000A%20circuit_EMI_052306.pdf Application Circuit]<br />
*[http://www.davicom.com.tw/big5/download/LayoutGuide/DM9000A_9010-LG-V11_031706.pdf Layout Guidelines]<br />
*[http://www.davicom.com.tw/big5/download/ApplicationNote/DM9000A%20Application%20Notes%20Ver%201_20_101906.pdf Application Note]<br />
*[http://www.davicom.com.tw/eng/download/Driver/driver_9000.htm DM9000A Official Drivers]<br />
<br />
<br />
===Software Implementation===<br />
====Driver====<br />
*Download [http://chungyan5.no-ip.org/vc/trunk/demo_posix/dspic/drivers/?root=freertos_posix dm9000a.c]<br />
*Download [http://chungyan5.no-ip.org/vc/trunk/demo_posix/dspic/drivers/include/?root=freertos_posix dm9000a.h]<br />
*Base on [http://www.freertos.org/ FreeRTOS] and [http://opencircuits.com/DsPIC30F_5011_Development_Board dsPIC33 platform]<br />
*Using POSIX-like API:<br />
**'''int dmfe_open(int flags)''': initialize the Ethernet controller for 10MHz Half-Duplex<br />
**'''int dmfe_close()''': turn off the PHY layer<br />
**'''int dmfe_read(void)''': copy a packet to the default buffer<br />
**'''int dmfe_write(unsigned char device, unsigned char *buf, int count)''': copy count bytes of the data from buf and transmit<br />
**'''void dmfe_interrupt(void)''': process the transmit interrupt from DM9000A<br />
<br />
====[[uIP]]====<br />
*Light-weight TCP/IP stack designed for 8-bit/16-bit embedded systems<br />
<br />
====[[lwIP]]====<br />
*Light-weight TCP/IP stack designed for 8-bit/16-bit embedded systems<br />
*Consume more resource than uIP<br />
<br />
<br />
==Hardware TCP/IP Stack Solution==<br />
<br />
===Circuit and PCB===<br />
*[http://www.wiznet.co.kr/en/pro02.php?&page=1&num=26 WIZNET W5300]<br />
<br />
<br />
[[category:projects]]</div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Nict_networksetting14.png&diff=18019File:Nict networksetting14.png2009-02-25T04:12:43Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Nict_networksetting13.png&diff=18018File:Nict networksetting13.png2009-02-25T04:12:27Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Nict_networksetting12.png&diff=18017File:Nict networksetting12.png2009-02-25T04:12:10Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Nict_networksetting11.png&diff=18016File:Nict networksetting11.png2009-02-25T04:11:50Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Nict_networksetting_intranet.png&diff=18015File:Nict networksetting intranet.png2009-02-25T04:07:59Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Nict_networksetting_internet.png&diff=18014File:Nict networksetting internet.png2009-02-25T04:07:46Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=Ethernet_Module&diff=18013Ethernet Module2009-02-25T04:07:15Z<p>Nelson: </p>
<hr />
<div>This project aims to develop an Ethernet Module, to be used in conjunction with a 8/16 bits embedded system such as the dsPic33F development board. <br />
<br />
==Objectives==<br />
The Internet provides an indispensable means to exchange information over long distances. Connection to the Internet is enabled by following the implementation of the Open Systems Interconnection Reference Model (OSI model). In simple words, internet applications require a TCP/IP stack to pack and unpack information into data packets for proper transmission and reception over the Internet. The TCP/IP stack is usually implemented by software and included in the Operating System. Applications can use the stack transparently through socket programming.<br />
<br />
Since a full-scale TCP/IP stack consumes a large amount of memory and processing power, a number of small footprint TCP/IP stacks have been devised for embedded systems, such as uIP and lwIP. Nevertheless, these TCP/IP stacks are usually not compatible to socket programming, and being implemented by software, still consumes a considerable amount of system resources. Therefore, hardware chips that implemented the TCP/IP stack (e.g. [http://www.wiznet.co.kr/en/pro02.php?&page=1&num=26 WIZNET W5300]) emerged in recent years so as to offload the computation power from the host microcontroller unit (MCU).<br />
<br />
This project aims to devise a driver and Linux socket wrapper inside freertos_posix for a hardware implemented TCP/IP stack. It is to be used in conjunction with a 8/16 bits embedded system such as (but not restricted to) the [http://opencircuits.com/DsPIC30F_5011_Development_Board dsPic33F development board]. Based on the Linux socket API, common application protocols (DHCP/HTTP/DNS/SMTP/SNMP/TELNET) are devised to enable remote control and monitoring.<br />
<br />
===Benefits===<br />
*Provide a means to perform remote control and monitoring via Internet<br />
*Offload TCP/IP stack to chip, freeing memory and processing power of MCU to perform other tasks (e.g. HTTPS)<br />
*Socket API implementation allows more extensible framework for future development and upgrades<br />
*Enable remote control and monitoring via<br />
**Web browser on desktop computer (better web page design and implementation)<br />
**SNMP agents, controlling and monitoring several instruments simultaneously<br />
**TELNET applications for command prompt control and monitoring<br />
**SMTP by sending out email when critical events occur<br />
<br />
===Limitations===<br />
*Higher cost chips compare to software stack<br />
*Need to change hardware if features in stack are updated<br />
<br />
<br />
==Architecture==<br />
*See [http://www.opencircuits.com/Multi-purpose_Embedded_System#TCP.2FIP_Stack here] for block diagram<br />
<br />
<br />
==Development Roadmap==<br />
===Phase 1===<br />
*Select chips and draw schematic and pcb<br />
*Obtain samples for chip<br />
<br />
===Phase 2===<br />
*Device driver<br />
*Create a Linux socket API wrapper in freertos_posix<br />
<br />
===Phase 3===<br />
*Reference to Linux socket/lwip, create libraries for<br />
**DHCP client<br />
**HTTP server<br />
***Decide how to get files (html, css, cgi, etc) from nvm (with/without file system)<br />
***Decide an efficient means to create and download web page to nvm<br />
**DNS resolver<br />
**SMTP mail client<br />
**SNMP agent<br />
**TELNET application<br />
<br />
===Phase 4===<br />
*Explore wireless-bridge solutions<br />
**[http://www.wiznet.co.kr/en/pro02.php?&page=1&num=180 WIZ610wi]<br />
**[http://ftp1.digi.com/support/documentation/productmanual_xstream_oem_rfmodule_v5.x00.pdf XStream OEM RF Module]<br />
<br />
===Network Configuration===<br />
Our Ethernet products (units) can be controlled by a PC using the TCP-IP protocol. The PC and the units can be setup using one of three topologies:<br />
#Direct Connection;<br />
#Intranet Connection; <br />
#Internet Connection.<br />
===Direct Connection===<br />
An example showing how to connect a PC and a unit directly is shown in Fig. 1. In this topology, the unit can be connected with the PC simply using a direct Ethernet cable. Please ensure that the PC and the unit share the same subnet mask and gateway, but different IP addresses. An incorrect example is shown in Fig. 2. Under direct connection, the user has to set these network configurations manually.<br />
:[[Image:correct_network_setting.png]]<br />
:[[Image:incorrect_network_setting.png]]<br />
To set the network configuration on the unit, the user has to select the Static mode. The default IP addresses, subnet mask, and gateway are 192.168.1.128, 255.255.255.0 and 192.168.1.1 respectively. These settings can only be changed when the Ethernet status is Down. Once they have been changed, the values will be automatically saved.<br />
<br />
'''To configure the network settings on the PC, '''<br />
*Goto '''<Start>''' and '''<Control Panel>''', open '''<Network Connections>'''<br />
:[[Image:Nict_networksetting11.png]]<br />
*Select the Local Area Connection corresponding to the network card on your PC. Right click and select '''<Properties>'''<br />
:[[Image:Nict_networksetting12.png]]<br />
*Under '''<General>''' tab, scroll down to '''<Internet Protocol (TCP/IP)>'''and click '''<Properties>'''<br />
:[[Image:Nict_networksetting13.png]]<br />
*Select '''<Use the following IP address:>''' and enter the appropriate network settings. Please ensure that the IP address is different from the one used by the unit.<br />
:[[Image:Nict_networksetting14.png]]<br />
<br />
===Intranet Connection===<br />
An example showing how to connect a PC and 3 units in an intranet is shown in Fig. 3. In this topology, the PC and the units can be plugged into the network sockets directly or through a hub. The units can obtain IP addresses either dynamically by DHCP or statically by assignment. <br />
:[[Image:Nict_networksetting_intranet.png]]<br />
In a network supporting DHCP, the IP address, subnet mask and gateway can be configured automatically if DHCP mode is selected. If the unit cannot acquired a valid connection via DHCP, the IP address, subnet mask and gateway will be displayed as 0.0.0.0. Please consult your network administrator whether your network supports DHCP.<br />
<br />
In Static mode, the user has to configure the IP address, subnet mask and gateway manually. These settings can only be changed when the Ethernet status is Down. The default settings are 192.168.1.128, 255.255.255.0 and 192.168.1.1 respectively. Please note that a logical network cannot accommodate two units with the same IP address, so you should consult your network administrator before using the Static mode. The network administrator will give you the appropriate settings.<br />
===Internet Connection===<br />
An example showing how to connect a PC and a unit (Unit 4) in the Internet is shown in Fig. 4. Similar to the intranet topology, the PC and the units can also be plugged into the network sockets directly or through a hub. The units can also obtain IP addresses either dynamically by DHCP or statically by assignment. <br />
:[[Image:Nict_networksetting_internet.png]]<br />
Network configuration on the unit is identical to that described in intranet connection (section 1.2). Note that the IP address displayed on the unit is the local IP address. To remote access a unit under Internet connection, the PC needs to know the global IP address of the unit. Please consult your network administrator of the corresponding gl<br />
==Software TCP/IP Stack Solution==<br />
===Circuit and PCB===<br />
*In [http://chungyan5.no-ip.org/vc/?root=ethernet gEDA format] and its gEDA [http://www.opencircuits.com/PCB_Footprints#gEDA_Symbols_and_footprints sym and footprints]<br />
{|border="1" cellspacing="0" cellpadding="5"<br />
! Special Item !! Description !! Quantity<br />
|-valign="top"<br />
| [http://www.davicom.com.tw/userfile/24247/DM9000A-DS-F01-101906.pdf DM9000AEP] || Ethernet Controller from [http://www.davicom.com.tw/ Davicom] || 1<br />
|-<br />
| [http://www.hanrun.com/hr/upfile/2_1_113.pdf HR911102A] || RJ45 Connector with Integrated Magnetics for 10/100 Base-TX || 1<br />
|-<br />
| [http://ww1.microchip.com/downloads/en/DeviceDoc/21749F.pdf 93LC46B-I/SN] || 1K Serial EEPROM || 1 (Optional)<br />
|-<br />
| 25MHz Crystal || Crystal || 1<br />
|-<br />
| 22pF || For Crystal Use || 2<br />
|-<br />
| 220uF || For RXVDD25/TXVDD25 || 1<br />
|-<br />
| 49.9ohm || For RX+/RX-/TX+/TX- || 4<br />
|-<br />
| 6.8kohm || For BGRES/BGGND || 1<br />
|-<br />
| 510ohm || For LEDs|| 2<br />
|-<br />
|}<br />
*[http://www.davicom.com.tw/eng/products/dm9000a.htm DM9000A Description]<br />
*[http://www.davicom.com.tw/big5/download/Data%20Sheet/DM9000A-DS-F01-101906.pdf DM9000A Datasheet]<br />
*[http://www.davicom.com.tw/big5/download/AC/dm9000a/DM9000A%20circuit_EMI_052306.pdf Application Circuit]<br />
*[http://www.davicom.com.tw/big5/download/LayoutGuide/DM9000A_9010-LG-V11_031706.pdf Layout Guidelines]<br />
*[http://www.davicom.com.tw/big5/download/ApplicationNote/DM9000A%20Application%20Notes%20Ver%201_20_101906.pdf Application Note]<br />
*[http://www.davicom.com.tw/eng/download/Driver/driver_9000.htm DM9000A Official Drivers]<br />
<br />
<br />
===Software Implementation===<br />
====Driver====<br />
*Download [http://chungyan5.no-ip.org/vc/trunk/demo_posix/dspic/drivers/?root=freertos_posix dm9000a.c]<br />
*Download [http://chungyan5.no-ip.org/vc/trunk/demo_posix/dspic/drivers/include/?root=freertos_posix dm9000a.h]<br />
*Base on [http://www.freertos.org/ FreeRTOS] and [http://opencircuits.com/DsPIC30F_5011_Development_Board dsPIC33 platform]<br />
*Using POSIX-like API:<br />
**'''int dmfe_open(int flags)''': initialize the Ethernet controller for 10MHz Half-Duplex<br />
**'''int dmfe_close()''': turn off the PHY layer<br />
**'''int dmfe_read(void)''': copy a packet to the default buffer<br />
**'''int dmfe_write(unsigned char device, unsigned char *buf, int count)''': copy count bytes of the data from buf and transmit<br />
**'''void dmfe_interrupt(void)''': process the transmit interrupt from DM9000A<br />
<br />
====[[uIP]]====<br />
*Light-weight TCP/IP stack designed for 8-bit/16-bit embedded systems<br />
<br />
====[[lwIP]]====<br />
*Light-weight TCP/IP stack designed for 8-bit/16-bit embedded systems<br />
*Consume more resource than uIP<br />
<br />
<br />
==Hardware TCP/IP Stack Solution==<br />
<br />
===Circuit and PCB===<br />
*[http://www.wiznet.co.kr/en/pro02.php?&page=1&num=26 WIZNET W5300]<br />
<br />
<br />
[[category:projects]]</div>Nelsonhttp://www.opencircuits.com/index.php?title=Ethernet_Module&diff=18002Ethernet Module2009-02-24T08:41:48Z<p>Nelson: </p>
<hr />
<div>This project aims to develop an Ethernet Module, to be used in conjunction with a 8/16 bits embedded system such as the dsPic33F development board. <br />
<br />
==Objectives==<br />
The Internet provides an indispensable means to exchange information over long distances. Connection to the Internet is enabled by following the implementation of the Open Systems Interconnection Reference Model (OSI model). In simple words, internet applications require a TCP/IP stack to pack and unpack information into data packets for proper transmission and reception over the Internet. The TCP/IP stack is usually implemented by software and included in the Operating System. Applications can use the stack transparently through socket programming.<br />
<br />
Since a full-scale TCP/IP stack consumes a large amount of memory and processing power, a number of small footprint TCP/IP stacks have been devised for embedded systems, such as uIP and lwIP. Nevertheless, these TCP/IP stacks are usually not compatible to socket programming, and being implemented by software, still consumes a considerable amount of system resources. Therefore, hardware chips that implemented the TCP/IP stack (e.g. [http://www.wiznet.co.kr/en/pro02.php?&page=1&num=26 WIZNET W5300]) emerged in recent years so as to offload the computation power from the host microcontroller unit (MCU).<br />
<br />
This project aims to devise a driver and Linux socket wrapper inside freertos_posix for a hardware implemented TCP/IP stack. It is to be used in conjunction with a 8/16 bits embedded system such as (but not restricted to) the [http://opencircuits.com/DsPIC30F_5011_Development_Board dsPic33F development board]. Based on the Linux socket API, common application protocols (DHCP/HTTP/DNS/SMTP/SNMP/TELNET) are devised to enable remote control and monitoring.<br />
<br />
===Benefits===<br />
*Provide a means to perform remote control and monitoring via Internet<br />
*Offload TCP/IP stack to chip, freeing memory and processing power of MCU to perform other tasks (e.g. HTTPS)<br />
*Socket API implementation allows more extensible framework for future development and upgrades<br />
*Enable remote control and monitoring via<br />
**Web browser on desktop computer (better web page design and implementation)<br />
**SNMP agents, controlling and monitoring several instruments simultaneously<br />
**TELNET applications for command prompt control and monitoring<br />
**SMTP by sending out email when critical events occur<br />
<br />
===Limitations===<br />
*Higher cost chips compare to software stack<br />
*Need to change hardware if features in stack are updated<br />
<br />
<br />
==Architecture==<br />
*See [http://www.opencircuits.com/Multi-purpose_Embedded_System#TCP.2FIP_Stack here] for block diagram<br />
<br />
<br />
==Development Roadmap==<br />
===Phase 1===<br />
*Select chips and draw schematic and pcb<br />
*Obtain samples for chip<br />
<br />
===Phase 2===<br />
*Device driver<br />
*Create a Linux socket API wrapper in freertos_posix<br />
<br />
===Phase 3===<br />
*Reference to Linux socket/lwip, create libraries for<br />
**DHCP client<br />
**HTTP server<br />
***Decide how to get files (html, css, cgi, etc) from nvm (with/without file system)<br />
***Decide an efficient means to create and download web page to nvm<br />
**DNS resolver<br />
**SMTP mail client<br />
**SNMP agent<br />
**TELNET application<br />
<br />
===Phase 4===<br />
*Explore wireless-bridge solutions<br />
**[http://www.wiznet.co.kr/en/pro02.php?&page=1&num=180 WIZ610wi]<br />
**[http://ftp1.digi.com/support/documentation/productmanual_xstream_oem_rfmodule_v5.x00.pdf XStream OEM RF Module]<br />
<br />
==Using TCP-IP Remote Control Interface==<br />
===Network Configuration===<br />
Our Ethernet products (units) can be controlled by a PC using the TCP-IP protocol. The PC and the units can be setup using one of three topologies: (i) Direct Connection; (ii) Intranet Connection; (iii) Internet Connection.<br />
====Direct Connection====<br />
An example showing how to connect a PC and a unit directly is shown in Fig. 1. In this topology, the unit can be connected with the PC simply using a direct Ethernet cable. Please ensure that the PC and the unit share the same subnet mask and gateway, but different IP addresses. An incorrect example is shown in Fig. 2. Under direct connection, the user has to set these network configurations manually.<br />
*[[Image:correct_network_setting.png]]<br />
*[[Image:incorrect_network_setting.png]]<br />
To set the network configuration on the unit, the user has to select the Static mode. The default IP addresses, subnet mask, and gateway are 192.168.1.128, 255.255.255.0 and 192.168.1.1 respectively. These settings can only be changed when the Ethernet status is Down. Once they have been changed, the values will be automatically saved.<br />
<br />
To configure the network settings on the PC, <br />
*Goto <Start> and <Control Panel>, open <Network Connections><br />
[[Image:networksetting1.png]]<br />
*Select the Local Area Connection corresponding to the network card on your PC. Right click and select <Properties><br />
[[Image:networksetting2.png]]<br />
*Under <General> tab, scroll down to <Internet Protocol (TCP/IP)> and click <Properties><br />
[[Image:networksetting3.png]]<br />
*Select <Use the following IP address:> and enter the appropriate network settings. Please ensure that the IP address is different from the one used by the unit.<br />
[[Image:networksetting4.png]]<br />
<br />
==Connection Schemes==<br />
[[Image:Connection_schemes.png ]]<br />
[[Image:connection_schemes_withdhcp.png]]<br />
<br />
==Software TCP/IP Stack Solution==<br />
===Circuit and PCB===<br />
*In [http://chungyan5.no-ip.org/vc/?root=ethernet gEDA format] and its gEDA [http://www.opencircuits.com/PCB_Footprints#gEDA_Symbols_and_footprints sym and footprints]<br />
{|border="1" cellspacing="0" cellpadding="5"<br />
! Special Item !! Description !! Quantity<br />
|-valign="top"<br />
| [http://www.davicom.com.tw/userfile/24247/DM9000A-DS-F01-101906.pdf DM9000AEP] || Ethernet Controller from [http://www.davicom.com.tw/ Davicom] || 1<br />
|-<br />
| [http://www.hanrun.com/hr/upfile/2_1_113.pdf HR911102A] || RJ45 Connector with Integrated Magnetics for 10/100 Base-TX || 1<br />
|-<br />
| [http://ww1.microchip.com/downloads/en/DeviceDoc/21749F.pdf 93LC46B-I/SN] || 1K Serial EEPROM || 1 (Optional)<br />
|-<br />
| 25MHz Crystal || Crystal || 1<br />
|-<br />
| 22pF || For Crystal Use || 2<br />
|-<br />
| 220uF || For RXVDD25/TXVDD25 || 1<br />
|-<br />
| 49.9ohm || For RX+/RX-/TX+/TX- || 4<br />
|-<br />
| 6.8kohm || For BGRES/BGGND || 1<br />
|-<br />
| 510ohm || For LEDs|| 2<br />
|-<br />
|}<br />
*[http://www.davicom.com.tw/eng/products/dm9000a.htm DM9000A Description]<br />
*[http://www.davicom.com.tw/big5/download/Data%20Sheet/DM9000A-DS-F01-101906.pdf DM9000A Datasheet]<br />
*[http://www.davicom.com.tw/big5/download/AC/dm9000a/DM9000A%20circuit_EMI_052306.pdf Application Circuit]<br />
*[http://www.davicom.com.tw/big5/download/LayoutGuide/DM9000A_9010-LG-V11_031706.pdf Layout Guidelines]<br />
*[http://www.davicom.com.tw/big5/download/ApplicationNote/DM9000A%20Application%20Notes%20Ver%201_20_101906.pdf Application Note]<br />
*[http://www.davicom.com.tw/eng/download/Driver/driver_9000.htm DM9000A Official Drivers]<br />
<br />
<br />
===Software Implementation===<br />
====Driver====<br />
*Download [http://chungyan5.no-ip.org/vc/trunk/demo_posix/dspic/drivers/?root=freertos_posix dm9000a.c]<br />
*Download [http://chungyan5.no-ip.org/vc/trunk/demo_posix/dspic/drivers/include/?root=freertos_posix dm9000a.h]<br />
*Base on [http://www.freertos.org/ FreeRTOS] and [http://opencircuits.com/DsPIC30F_5011_Development_Board dsPIC33 platform]<br />
*Using POSIX-like API:<br />
**'''int dmfe_open(int flags)''': initialize the Ethernet controller for 10MHz Half-Duplex<br />
**'''int dmfe_close()''': turn off the PHY layer<br />
**'''int dmfe_read(void)''': copy a packet to the default buffer<br />
**'''int dmfe_write(unsigned char device, unsigned char *buf, int count)''': copy count bytes of the data from buf and transmit<br />
**'''void dmfe_interrupt(void)''': process the transmit interrupt from DM9000A<br />
<br />
====[[uIP]]====<br />
*Light-weight TCP/IP stack designed for 8-bit/16-bit embedded systems<br />
<br />
====[[lwIP]]====<br />
*Light-weight TCP/IP stack designed for 8-bit/16-bit embedded systems<br />
*Consume more resource than uIP<br />
<br />
<br />
==Hardware TCP/IP Stack Solution==<br />
<br />
===Circuit and PCB===<br />
*[http://www.wiznet.co.kr/en/pro02.php?&page=1&num=26 WIZNET W5300]<br />
<br />
<br />
[[category:projects]]</div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Networksetting2.png&diff=17999File:Networksetting2.png2009-02-24T08:28:35Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Networksetting1.png&diff=17998File:Networksetting1.png2009-02-24T08:28:21Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Incorrect_network_setting.png&diff=17997File:Incorrect network setting.png2009-02-24T08:28:07Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Correct_network_setting.png&diff=17996File:Correct network setting.png2009-02-24T08:27:55Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=Programming_the_Device&diff=17708Programming the Device2009-02-02T09:14:49Z<p>Nelson: /* Download Firmware */ adding "-Djava.library.path=.\rxtx\bin " in the cmd prompt</p>
<hr />
<div>==Requirements==<br />
<br />
===Hardware===<br />
#PC with COM port (Windows XP Installed for MPLAB)<br />
#ICD2 Programmer<br />
#Target Board<br />
#5V Power Supply<br />
<br />
===Software===<br />
#[http://ww1.microchip.com/downloads/en/DeviceDoc/MP750.zip MPLAB IDE v7.50]: v7.60 is not compatible with our current [http://www.sure-electronics.com/ ICD2 Programmers]. There are consistent "Devices cannot be founded" warnings.<br />
#[http://chungyan5.no-ip.org/websvn/listing.php dsPicProgrammer] ('''dsPicProgrammer.jar''')<br />
<br />
===Files===<br />
#[http://chungyan5.no-ip.org/websvn/listing.php dsPicBootloader] ('''bl_5011.hex'''). Original assembly code by ingenia can be downloaded from [http://www.ingenia-cat.com/download/iBL.s here].<br />
#Application hex file (e.g. '''app.hex''')<br />
<br />
<br />
==Loading Bootloader (Once only)==<br />
{|border="1" cellspacing="0" cellpadding="5"<br />
|+ Loading Bootloader<br />
! Step !! Remarks <br />
|-valign="top"<br />
| Install [http://ww1.microchip.com/downloads/en/DeviceDoc/MP750.zip MPLAB IDE] || <br />
*Do '''NOT''' connect ICD 2 (via USB) to PC<br />
*Execute '''MPLAB vX.XX Install.exe'''<br />
|-valign="top"<br />
| Install USB Driver ||<br />
*Follow the instruction in (C:\Program Files\Microchip\MPLAB IDE\ICD2\Drivers\Ddicd2.htm)<br />
|-valign="top"<br />
| Select Target Chip ||<br />
*Run MPLAB IDE on PC<br />
*Select: Configure>Select Devices...<br />
*Choose dsPIC30F5011<br />
|-valign="top"<br />
| Target <-> ICD 2 ||<br />
*Use six pin cable. Beware of the pin assignments. Only pin 1 - 5 should be used.<br />
*Place Jumper on target board (if any). The Jumper connects target V<sub>cc</sub> to ICD 2.<br />
*Do '''NOT''' power-up the target.<br />
|-valign="top"<br />
| ICD 2 <-> PC ||<br />
*Plug-in ICD 2 to PC via USB cable<br />
*Power-up the target.<br />
*Select: Programmer>Select Programmer>MPLAB ICD 2<br />
*If this is the first time the ICD 2 is connected to PC, MPLAB IDE will automatically download the required OS to ICD 2, wait until it has finished<br />
*If you have not connected and powered up the target, you might see Warnings on invalid device IDs, and/or running self tests.<br />
*See results of self test if necessary: Programmer>Settings, Status Tab. Refer to [http://ww1.microchip.com/downloads/en/DeviceDoc/51331B.pdf ICD2 User's Guide] Chapter 7.<br />
|-valign="top"<br />
| Load Bootloader ||<br />
*Select: File>Import...<br />
*Select '''bl_5011.hex'''<br />
|-valign="top"<br />
| Start Programming ||<br />
*Select: Programmer>Program<br />
|-valign="top"<br />
| Finishing ||<br />
*Power-down the Taget<br />
*Select: Programmer>Select Programmer>None<br />
*Unplug USB cable<br />
|-<br />
|}<br />
<br />
==Hardware Setting==<br />
[[Image:DSC00921.JPG]]<br />
*Connect your usb to rs232 cable to your computer<br />
*Or Using a real RS232 Port -- COM PORT<br />
<br />
==Download and Loading Firmware==<br />
<br />
===Make sure the RS232 Port in your computer===<br />
[[Image:1.jpg]]<br />
*Go to Control Panel \ Device Manager<br />
<br />
[[Image:2.jpg]]<br />
*Find out your Device comm port Number<br />
<br />
===Get the Dspic Programmer===<br />
*Download [http://chungyan5.no-ip.org/open_data/electronic_computer/platforms/dspic/dsPicProgrammer/dsPicProgrammer1.5.5.zip dsPic_Programmer.zip], [http://chungyan5.no-ip.org/open_data/electronic_computer/platforms/dspic/dsPicProgrammer/ws/ updated directory] or [http://chungyan5.no-ip.org/vc svn server]<br />
*Save to a directory.<br />
::e.g. desktop<br />
*Unzip the dsPic_Programmer.zip, then you have an unziped file.<br />
[[Image:prog_guid_dl.JPG]]<br />
<br />
----<br />
<br />
*Drag the unzip file to a director.<br />
::eg. USB memory devics<br />
[[Image:prog_guid_drag.JPG]]<br />
<br />
----<br />
<br />
*Save your .hex file(foo.hex) to your directory location <br />
::e.g. X:\dsPic_Programmer\ ---> X:\ is the driver where the dsPic_Programmer located<br />
[[Image:prog_guid_hex.JPG]]<br />
<br />
===Download Firmware===<br />
*Start a Command Prompt<br />
**Start -> Run<br>[[Image:2 1 run.JPG]]<br><br />
**Enter cmd<br>[[Image:2 2 cmd.JPG]]<br><br />
*Run dsPicProgrammer<br />
**Make sure your device is connected through a "Direct RS232 Cable" to PC Serial Port. <br />
**Change to the directory where dsPicProgrammer.jar is located and run the command:<br />
***for example, jre\bin\java -Djava.library.path=.\rxtx\bin -jar dspicProgrammer.jar COM1 115200 foo.hex<br />
***Or directly using dsPicProgrammer.bat COM1 115200 foo.hex(Windows)<br />
***java -jar dsPicProgrammer.jar /dev/ttyS0 115200 foo.hex (Linux)<br />
:::where COM1 is your COM Port ID<br />
:::115200 is communication speed [in bps]<br />
:::foo.hex is your firmware new file<br />
::[[Image:5.jpg]]<br />
:*When the program prompt you for an input, press y:<br>[[Image:2 4 prompt.JPG]]<br><br />
:*If communication can be established, you should see something like this:<br>[[Image:2 5 progress.JPG]]<br><br />
:*Wait until programming is completed.<br>[[Image:2 6 complete.JPG]]<br><br />
:*after all completed, power OFF your device, then power ON again, enjoy your new updated.<br />
<br />
==Troubleshooting==<br />
===Invalid COM Port===<br />
*In case of selecting an invalid COM port, you should see the error message:<br>gnu.io.NoSuchPortException: Choosing COM Port Error<br>[[Image:3 1 com err.JPG]]<br><br><br />
===Missing firmware file===<br />
*In case of selecting a firmware file that does not exist, you should see the error message:<br>java.io.FileNotFoundException: foo1.hex <The system cannot find the file specified><br>[[Image:3 2 file err.JPG]]<br><br><br />
===Missing RXTX driver===<br />
*In case of missing the RXTX driver, you should see the error message:<br>Exception in thread “main” java.lang.NoClassDefFoundError: gnu/io/UnsupportedCommOperationException<br>[[Image:3 3 rxtx err.JPG]]<br><br></div>Nelsonhttp://www.opencircuits.com/index.php?title=ADuC832_Development_Board&diff=17489ADuC832 Development Board2009-01-20T02:54:03Z<p>Nelson: </p>
<hr />
<div>==Features==<br />
==Implementation==<br />
[http://spreadsheets.google.com/ccc?key=pobKDna9aVYcUXxUpzFPWHQ&hl=en BOM]<br />
==Hardware Setting==<br />
[[Image:Aduc832_cable.JPG]]<br />
[[Image:Aduc832_connector.JPG]]<br />
[[Image:Aduc832_7segment.JPG]]<br />
[[Image:Aduc832_overview.JPG]]<br />
[[Image:Aduc832_circuit.png]]<br />
*Configure the ADuC832 so that it is ready for program download<br />
#You need to press and hold both “RESET” and “DOWNLOAD” buttons on the main board. <br />
#First release the “RESET” button and then the “Download” button<br />
<br />
*Use the below command to download program<br />
java -jar Aduc832Programmer.jar /dev/ttyS0|COM1 hex_file.hex<br />
<br />
Remark : JAVA -jdk1.6.0_01 ,jre1.6.0_01 ,jre1.6.0_03</div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Aduc832_7segment.JPG&diff=17488File:Aduc832 7segment.JPG2009-01-20T02:53:19Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=ADuC832_Development_Board&diff=17484ADuC832 Development Board2009-01-19T09:51:16Z<p>Nelson: </p>
<hr />
<div>==Features==<br />
==Implementation==<br />
[http://spreadsheets.google.com/ccc?key=pobKDna9aVYcUXxUpzFPWHQ&hl=en BOM]<br />
==Hardware Setting==<br />
[[Image:Aduc832_cable.JPG]]<br />
[[Image:Aduc832_connector.JPG]]<br />
[[Image:Aduc832_overview.JPG]]<br />
[[Image:Aduc832_circuit.png]]<br />
*Configure the ADuC832 so that it is ready for program download<br />
#You need to press and hold both “RESET” and “DOWNLOAD” buttons on the main board. <br />
#First release the “RESET” button and then the “Download” button<br />
<br />
*Use the below command to download program<br />
java -jar Aduc832Programmer.jar /dev/ttyS0|COM1 hex_file.hex<br />
<br />
Remark : JAVA -jdk1.6.0_01 ,jre1.6.0_01 ,jre1.6.0_03</div>Nelsonhttp://www.opencircuits.com/index.php?title=ADuC832_Development_Board&diff=17483ADuC832 Development Board2009-01-19T09:15:51Z<p>Nelson: </p>
<hr />
<div>==Features==<br />
==Implementation==<br />
[http://spreadsheets.google.com/ccc?key=pobKDna9aVYcUXxUpzFPWHQ&hl=en BOM]<br />
==Hardware Setting==<br />
[[Image:Aduc832_cable.JPG]]<br />
[[Image:Aduc832_connector.JPG]]<br />
[[Image:Aduc832_overview.JPG]]<br />
[[Image:Aduc832_circuit.png]]<br />
*Configure the ADuC832 so that it is ready for program download<br />
#You need to press and hold both “RESET” and “DOWNLOAD” buttons on the main board. <br />
#First release the “RESET” button and then the “Download” button<br />
<br />
*Use the below command to download program<br />
java -jar Aduc832Programmer.jar /dev/ttyS0|COM1 hex_file.hex</div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Aduc832_circuit.png&diff=17482File:Aduc832 circuit.png2009-01-19T09:08:28Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Aduc832_overview.JPG&diff=17481File:Aduc832 overview.JPG2009-01-19T09:07:38Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Aduc832_connector.JPG&diff=17480File:Aduc832 connector.JPG2009-01-19T09:06:29Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:Aduc832_cable.JPG&diff=17479File:Aduc832 cable.JPG2009-01-19T09:04:41Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=Programming_the_Device&diff=17431Programming the Device2009-01-15T08:05:33Z<p>Nelson: </p>
<hr />
<div>==Requirements==<br />
<br />
===Hardware===<br />
#PC with COM port (Windows XP Installed for MPLAB)<br />
#ICD2 Programmer<br />
#Target Board<br />
#5V Power Supply<br />
<br />
===Software===<br />
#[http://ww1.microchip.com/downloads/en/DeviceDoc/MP750.zip MPLAB IDE v7.50]: v7.60 is not compatible with our current [http://www.sure-electronics.com/ ICD2 Programmers]. There are consistent "Devices cannot be founded" warnings.<br />
#[http://chungyan5.no-ip.org/websvn/listing.php dsPicProgrammer] ('''dsPicProgrammer.jar''')<br />
<br />
===Files===<br />
#[http://chungyan5.no-ip.org/websvn/listing.php dsPicBootloader] ('''bl_5011.hex'''). Original assembly code by ingenia can be downloaded from [http://www.ingenia-cat.com/download/iBL.s here].<br />
#Application hex file (e.g. '''app.hex''')<br />
<br />
<br />
==Loading Bootloader (Once only)==<br />
{|border="1" cellspacing="0" cellpadding="5"<br />
|+ Loading Bootloader<br />
! Step !! Remarks <br />
|-valign="top"<br />
| Install [http://ww1.microchip.com/downloads/en/DeviceDoc/MP750.zip MPLAB IDE] || <br />
*Do '''NOT''' connect ICD 2 (via USB) to PC<br />
*Execute '''MPLAB vX.XX Install.exe'''<br />
|-valign="top"<br />
| Install USB Driver ||<br />
*Follow the instruction in (C:\Program Files\Microchip\MPLAB IDE\ICD2\Drivers\Ddicd2.htm)<br />
|-valign="top"<br />
| Select Target Chip ||<br />
*Run MPLAB IDE on PC<br />
*Select: Configure>Select Devices...<br />
*Choose dsPIC30F5011<br />
|-valign="top"<br />
| Target <-> ICD 2 ||<br />
*Use six pin cable. Beware of the pin assignments. Only pin 1 - 5 should be used.<br />
*Place Jumper on target board (if any). The Jumper connects target V<sub>cc</sub> to ICD 2.<br />
*Do '''NOT''' power-up the target.<br />
|-valign="top"<br />
| ICD 2 <-> PC ||<br />
*Plug-in ICD 2 to PC via USB cable<br />
*Power-up the target.<br />
*Select: Programmer>Select Programmer>MPLAB ICD 2<br />
*If this is the first time the ICD 2 is connected to PC, MPLAB IDE will automatically download the required OS to ICD 2, wait until it has finished<br />
*If you have not connected and powered up the target, you might see Warnings on invalid device IDs, and/or running self tests.<br />
*See results of self test if necessary: Programmer>Settings, Status Tab. Refer to [http://ww1.microchip.com/downloads/en/DeviceDoc/51331B.pdf ICD2 User's Guide] Chapter 7.<br />
|-valign="top"<br />
| Load Bootloader ||<br />
*Select: File>Import...<br />
*Select '''bl_5011.hex'''<br />
|-valign="top"<br />
| Start Programming ||<br />
*Select: Programmer>Program<br />
|-valign="top"<br />
| Finishing ||<br />
*Power-down the Taget<br />
*Select: Programmer>Select Programmer>None<br />
*Unplug USB cable<br />
|-<br />
|}<br />
<br />
==Hardware Setting==<br />
[[Image:DSC00921.JPG]]<br />
*Connect your usb to rs232 cable to your computer<br />
==Download and Loading Firmware==<br />
===Windows Vista===<br />
[[Image:1.jpg]]<br />
*Go to Control Panel \ Device Manager<br />
<br />
[[Image:2.jpg]]<br />
*Find out your Device comm port Number<br />
<br />
[[Image:3.jpg]]<br />
*Open a command prompt<br />
<br />
[[Image:4.jpg]]<br />
*Run dsPicProgrammer<br />
**Input cd Desktop\dsPic_production\dsPicProgrammer<br />
<br />
[[Image:5.jpg]]<br />
*Loading Firmware<br />
**Input jre\bin\java -Djava.library.path=.\rxtx\bin -jar dspicProgrammer.jar COM1 115200 ./firmware/foo.hex<br />
**eg. jre\bin\java -Djava.library.path=.\rxtx\bin -jar dspicProgrammer.jar COM9 115200 ./firmware/8072303.hex<br />
:::where COM9 is your COM Port ID<br />
:::115200 is communication speed [in bps]<br />
:::foo.hex is your firmware new file<br />
<br />
[[Image:6.jpg]]<br />
*Enter Y to comfirm<br />
<br />
[[Image:2 6 complete.JPG]]<br />
:*Wait until programming is completed.<br />
:*after all completed, power OFF your device, then power ON again, enjoy your new updated.<br />
<br />
<br />
<br />
===Windows XP===<br />
*If the RS232 converter hardware required, pls go there [[RS232_RS485_USB_Converter_Board]] for RS232 converter only<br />
*Download [http://chungyan5.no-ip.org/open_data/electronic_computer/platforms/dspic/dsPicProgrammer/dsPicProgrammer1.5.5.zip dsPic_Programmer.zip], [http://chungyan5.no-ip.org/open_data/electronic_computer/platforms/dspic/dsPicProgrammer/ws/ updated directory] or [http://chungyan5.no-ip.org/vc svn server]<br />
*Save to a directory.<br />
::e.g. desktop<br />
*Unzip the dsPic_Programmer.zip, then you have an unziped file.<br />
[[Image:prog_guid_dl.JPG]]<br />
<br />
----<br />
<br />
*Drag the unzip file to a director.<br />
::eg. USB memory devics<br />
[[Image:prog_guid_drag.JPG]]<br />
<br />
----<br />
<br />
*Save your .hex file(foo.hex) to your directory location <br />
::e.g. X:\dsPic_Programmer\ ---> X:\ is the driver where the dsPic_Programmer located<br />
[[Image:prog_guid_hex.JPG]]<br />
===Download Firmware===<br />
*Start a Command Prompt<br />
**Start -> Run<br>[[Image:2 1 run.JPG]]<br><br />
**Enter cmd<br>[[Image:2 2 cmd.JPG]]<br><br />
*Run dsPicProgrammer<br />
**Make sure your device is connected through a "Direct RS232 Cable" to PC Serial Port. <br />
**Change to the directory where dsPicProgrammer.jar is located and run the command:<br />
***for example, jre\bin\java -Djava.library.path=.\rxtx\bin -jar dspicProgrammer.jar COM1 115200 foo.hex<br />
***Or directly using dsPicProgrammer.bat COM1 115200 foo.hex(Windows)<br />
***java -jar dsPicProgrammer.jar /dev/ttyS0 115200 foo.hex (Linux)<br />
:::where COM1 is your COM Port ID<br />
:::115200 is communication speed [in bps]<br />
:::foo.hex is your firmware new file<br />
::[[Image:2 3 command.JPG]]<br />
:*When the program prompt you for an input, press y:<br>[[Image:2 4 prompt.JPG]]<br><br />
:*If communication can be established, you should see something like this:<br>[[Image:2 5 progress.JPG]]<br><br />
:*Wait until programming is completed.<br>[[Image:2 6 complete.JPG]]<br><br />
:*after all completed, power OFF your device, then power ON again, enjoy your new updated.<br />
<br />
==Troubleshooting==<br />
===Invalid COM Port===<br />
*In case of selecting an invalid COM port, you should see the error message:<br>gnu.io.NoSuchPortException: Choosing COM Port Error<br>[[Image:3 1 com err.JPG]]<br><br><br />
===Missing firmware file===<br />
*In case of selecting a firmware file that does not exist, you should see the error message:<br>java.io.FileNotFoundException: foo1.hex <The system cannot find the file specified><br>[[Image:3 2 file err.JPG]]<br><br><br />
===Missing RXTX driver===<br />
*In case of missing the RXTX driver, you should see the error message:<br>Exception in thread “main” java.lang.NoClassDefFoundError: gnu/io/UnsupportedCommOperationException<br>[[Image:3 3 rxtx err.JPG]]<br><br></div>Nelsonhttp://www.opencircuits.com/index.php?title=Programming_the_Device&diff=17430Programming the Device2009-01-15T07:49:35Z<p>Nelson: </p>
<hr />
<div>==Requirements==<br />
<br />
===Hardware===<br />
#PC with COM port (Windows XP Installed for MPLAB)<br />
#ICD2 Programmer<br />
#Target Board<br />
#5V Power Supply<br />
<br />
===Software===<br />
#[http://ww1.microchip.com/downloads/en/DeviceDoc/MP750.zip MPLAB IDE v7.50]: v7.60 is not compatible with our current [http://www.sure-electronics.com/ ICD2 Programmers]. There are consistent "Devices cannot be founded" warnings.<br />
#[http://chungyan5.no-ip.org/websvn/listing.php dsPicProgrammer] ('''dsPicProgrammer.jar''')<br />
<br />
===Files===<br />
#[http://chungyan5.no-ip.org/websvn/listing.php dsPicBootloader] ('''bl_5011.hex'''). Original assembly code by ingenia can be downloaded from [http://www.ingenia-cat.com/download/iBL.s here].<br />
#Application hex file (e.g. '''app.hex''')<br />
<br />
<br />
==Loading Bootloader (Once only)==<br />
{|border="1" cellspacing="0" cellpadding="5"<br />
|+ Loading Bootloader<br />
! Step !! Remarks <br />
|-valign="top"<br />
| Install [http://ww1.microchip.com/downloads/en/DeviceDoc/MP750.zip MPLAB IDE] || <br />
*Do '''NOT''' connect ICD 2 (via USB) to PC<br />
*Execute '''MPLAB vX.XX Install.exe'''<br />
|-valign="top"<br />
| Install USB Driver ||<br />
*Follow the instruction in (C:\Program Files\Microchip\MPLAB IDE\ICD2\Drivers\Ddicd2.htm)<br />
|-valign="top"<br />
| Select Target Chip ||<br />
*Run MPLAB IDE on PC<br />
*Select: Configure>Select Devices...<br />
*Choose dsPIC30F5011<br />
|-valign="top"<br />
| Target <-> ICD 2 ||<br />
*Use six pin cable. Beware of the pin assignments. Only pin 1 - 5 should be used.<br />
*Place Jumper on target board (if any). The Jumper connects target V<sub>cc</sub> to ICD 2.<br />
*Do '''NOT''' power-up the target.<br />
|-valign="top"<br />
| ICD 2 <-> PC ||<br />
*Plug-in ICD 2 to PC via USB cable<br />
*Power-up the target.<br />
*Select: Programmer>Select Programmer>MPLAB ICD 2<br />
*If this is the first time the ICD 2 is connected to PC, MPLAB IDE will automatically download the required OS to ICD 2, wait until it has finished<br />
*If you have not connected and powered up the target, you might see Warnings on invalid device IDs, and/or running self tests.<br />
*See results of self test if necessary: Programmer>Settings, Status Tab. Refer to [http://ww1.microchip.com/downloads/en/DeviceDoc/51331B.pdf ICD2 User's Guide] Chapter 7.<br />
|-valign="top"<br />
| Load Bootloader ||<br />
*Select: File>Import...<br />
*Select '''bl_5011.hex'''<br />
|-valign="top"<br />
| Start Programming ||<br />
*Select: Programmer>Program<br />
|-valign="top"<br />
| Finishing ||<br />
*Power-down the Taget<br />
*Select: Programmer>Select Programmer>None<br />
*Unplug USB cable<br />
|-<br />
|}<br />
<br />
==Hardware Setting==<br />
[[Image:DSC00921.JPG]]<br />
*Connect your usb to rs232 cable to your computer<br />
==Download Loading Firmware==<br />
===Windows Vista===<br />
[[Image:1.jpg]]<br />
*Go to Control Panel \ Device Manager<br />
<br />
[[Image:2.jpg]]<br />
*Find out your Device comm port Number<br />
<br />
[[Image:3.jpg]]<br />
*Open a command prompt<br />
<br />
[[Image:4.jpg]]<br />
*Run dsPicProgrammer<br />
**Input cd Desktop\dsPic_production\dsPicProgrammer<br />
<br />
[[Image:5.jpg]]<br />
*Loading Firmware<br />
**Input jre\bin\java -Djava.library.path=.\rxtx\bin -jar dspicProgrammer.jar COM1 115200 ./firmware/foo.hex<br />
**eg. jre\bin\java -Djava.library.path=.\rxtx\bin -jar dspicProgrammer.jar COM9 115200 ./firmware/8072303.hex<br />
:::where COM9 is your COM Port ID<br />
:::115200 is communication speed [in bps]<br />
:::foo.hex is your firmware new file<br />
<br />
[[Image:6.jpg]]<br />
*Enter Y to comfirm<br />
<br />
[[Image:2 6 complete.JPG]]<br />
:*Wait until programming is completed.<br />
:*after all completed, power OFF your device, then power ON again, enjoy your new updated.<br />
<br />
<br />
<br />
===Windows XP===<br />
*If the RS232 converter hardware required, pls go there [[RS232_RS485_USB_Converter_Board]] for RS232 converter only<br />
*Download [http://chungyan5.no-ip.org/open_data/electronic_computer/platforms/dspic/dsPicProgrammer/dsPicProgrammer1.5.5.zip dsPic_Programmer.zip], [http://chungyan5.no-ip.org/open_data/electronic_computer/platforms/dspic/dsPicProgrammer/ws/ updated directory] or [http://chungyan5.no-ip.org/vc svn server]<br />
*Save to a directory.<br />
::e.g. desktop<br />
*Unzip the dsPic_Programmer.zip, then you have an unziped file.<br />
[[Image:prog_guid_dl.JPG]]<br />
<br />
----<br />
<br />
*Drag the unzip file to a director.<br />
::eg. USB memory devics<br />
[[Image:prog_guid_drag.JPG]]<br />
<br />
----<br />
<br />
*Save your .hex file(foo.hex) to your directory location <br />
::e.g. X:\dsPic_Programmer\ ---> X:\ is the driver where the dsPic_Programmer located<br />
[[Image:prog_guid_hex.JPG]]<br />
===Download Firmware===<br />
*Start a Command Prompt<br />
**Start -> Run<br>[[Image:2 1 run.JPG]]<br><br />
**Enter cmd<br>[[Image:2 2 cmd.JPG]]<br><br />
*Run dsPicProgrammer<br />
**Make sure your device is connected through a "Direct RS232 Cable" to PC Serial Port. <br />
**Change to the directory where dsPicProgrammer.jar is located and run the command:<br />
***for example, jre\bin\java -Djava.library.path=.\rxtx\bin -jar dspicProgrammer.jar COM1 115200 foo.hex<br />
***Or directly using dsPicProgrammer.bat COM1 115200 foo.hex(Windows)<br />
***java -jar dsPicProgrammer.jar /dev/ttyS0 115200 foo.hex (Linux)<br />
:::where COM1 is your COM Port ID<br />
:::115200 is communication speed [in bps]<br />
:::foo.hex is your firmware new file<br />
::[[Image:2 3 command.JPG]]<br />
:*When the program prompt you for an input, press y:<br>[[Image:2 4 prompt.JPG]]<br><br />
:*If communication can be established, you should see something like this:<br>[[Image:2 5 progress.JPG]]<br><br />
:*Wait until programming is completed.<br>[[Image:2 6 complete.JPG]]<br><br />
:*after all completed, power OFF your device, then power ON again, enjoy your new updated.<br />
<br />
==Troubleshooting==<br />
===Invalid COM Port===<br />
*In case of selecting an invalid COM port, you should see the error message:<br>gnu.io.NoSuchPortException: Choosing COM Port Error<br>[[Image:3 1 com err.JPG]]<br><br><br />
===Missing firmware file===<br />
*In case of selecting a firmware file that does not exist, you should see the error message:<br>java.io.FileNotFoundException: foo1.hex <The system cannot find the file specified><br>[[Image:3 2 file err.JPG]]<br><br><br />
===Missing RXTX driver===<br />
*In case of missing the RXTX driver, you should see the error message:<br>Exception in thread “main” java.lang.NoClassDefFoundError: gnu/io/UnsupportedCommOperationException<br>[[Image:3 3 rxtx err.JPG]]<br><br></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:6.jpg&diff=17429File:6.jpg2009-01-15T07:47:50Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:5.jpg&diff=17428File:5.jpg2009-01-15T07:47:39Z<p>Nelson: </p>
<hr />
<div></div>Nelsonhttp://www.opencircuits.com/index.php?title=Programming_the_Device&diff=17427Programming the Device2009-01-15T07:47:29Z<p>Nelson: </p>
<hr />
<div>==Requirements==<br />
<br />
===Hardware===<br />
#PC with COM port (Windows XP Installed for MPLAB)<br />
#ICD2 Programmer<br />
#Target Board<br />
#5V Power Supply<br />
<br />
===Software===<br />
#[http://ww1.microchip.com/downloads/en/DeviceDoc/MP750.zip MPLAB IDE v7.50]: v7.60 is not compatible with our current [http://www.sure-electronics.com/ ICD2 Programmers]. There are consistent "Devices cannot be founded" warnings.<br />
#[http://chungyan5.no-ip.org/websvn/listing.php dsPicProgrammer] ('''dsPicProgrammer.jar''')<br />
<br />
===Files===<br />
#[http://chungyan5.no-ip.org/websvn/listing.php dsPicBootloader] ('''bl_5011.hex'''). Original assembly code by ingenia can be downloaded from [http://www.ingenia-cat.com/download/iBL.s here].<br />
#Application hex file (e.g. '''app.hex''')<br />
<br />
<br />
==Loading Bootloader (Once only)==<br />
{|border="1" cellspacing="0" cellpadding="5"<br />
|+ Loading Bootloader<br />
! Step !! Remarks <br />
|-valign="top"<br />
| Install [http://ww1.microchip.com/downloads/en/DeviceDoc/MP750.zip MPLAB IDE] || <br />
*Do '''NOT''' connect ICD 2 (via USB) to PC<br />
*Execute '''MPLAB vX.XX Install.exe'''<br />
|-valign="top"<br />
| Install USB Driver ||<br />
*Follow the instruction in (C:\Program Files\Microchip\MPLAB IDE\ICD2\Drivers\Ddicd2.htm)<br />
|-valign="top"<br />
| Select Target Chip ||<br />
*Run MPLAB IDE on PC<br />
*Select: Configure>Select Devices...<br />
*Choose dsPIC30F5011<br />
|-valign="top"<br />
| Target <-> ICD 2 ||<br />
*Use six pin cable. Beware of the pin assignments. Only pin 1 - 5 should be used.<br />
*Place Jumper on target board (if any). The Jumper connects target V<sub>cc</sub> to ICD 2.<br />
*Do '''NOT''' power-up the target.<br />
|-valign="top"<br />
| ICD 2 <-> PC ||<br />
*Plug-in ICD 2 to PC via USB cable<br />
*Power-up the target.<br />
*Select: Programmer>Select Programmer>MPLAB ICD 2<br />
*If this is the first time the ICD 2 is connected to PC, MPLAB IDE will automatically download the required OS to ICD 2, wait until it has finished<br />
*If you have not connected and powered up the target, you might see Warnings on invalid device IDs, and/or running self tests.<br />
*See results of self test if necessary: Programmer>Settings, Status Tab. Refer to [http://ww1.microchip.com/downloads/en/DeviceDoc/51331B.pdf ICD2 User's Guide] Chapter 7.<br />
|-valign="top"<br />
| Load Bootloader ||<br />
*Select: File>Import...<br />
*Select '''bl_5011.hex'''<br />
|-valign="top"<br />
| Start Programming ||<br />
*Select: Programmer>Program<br />
|-valign="top"<br />
| Finishing ||<br />
*Power-down the Taget<br />
*Select: Programmer>Select Programmer>None<br />
*Unplug USB cable<br />
|-<br />
|}<br />
<br />
==Hardware Setting==<br />
[[Image:DSC00921.JPG]]<br />
*Connect your usb to rs232 cable to your computer<br />
==Download Loading Firmware==<br />
===Windows Vista===<br />
[[Image:1.jpg]]<br />
*Go to Control Panel \ Device Manager<br />
<br />
[[Image:2.jpg]]<br />
*Find out your Device comm port Number<br />
<br />
[[Image:3.jpg]]<br />
*Open a command prompt<br />
<br />
[[Image:4.jpg]]<br />
*Run dsPicProgrammer<br />
**Input cd Desktop\dsPic_production\dsPicProgrammer<br />
<br />
[[Image:5.jpg]]<br />
*Loading Firmware<br />
**Input jre\bin\java -Djava.library.path=.\rxtx\bin -jar dspicProgrammer.jar COM1 115200 ./firmware/foo.hex<br />
**eg. jre\bin\java -Djava.library.path=.\rxtx\bin -jar dspicProgrammer.jar COM9 115200 ./firmware/8072303.hex<br />
:::where COM9 is your COM Port ID<br />
:::115200 is communication speed [in bps]<br />
:::foo.hex is your firmware new file<br />
<br />
[[Image:6.jpg]]<br />
:*Wait until programming is completed.<br />
:*after all completed, power OFF your device, then power ON again, enjoy your new updated.<br />
<br />
<br />
<br />
===Windows XP===<br />
*If the RS232 converter hardware required, pls go there [[RS232_RS485_USB_Converter_Board]] for RS232 converter only<br />
*Download [http://chungyan5.no-ip.org/open_data/electronic_computer/platforms/dspic/dsPicProgrammer/dsPicProgrammer1.5.5.zip dsPic_Programmer.zip], [http://chungyan5.no-ip.org/open_data/electronic_computer/platforms/dspic/dsPicProgrammer/ws/ updated directory] or [http://chungyan5.no-ip.org/vc svn server]<br />
*Save to a directory.<br />
::e.g. desktop<br />
*Unzip the dsPic_Programmer.zip, then you have an unziped file.<br />
[[Image:prog_guid_dl.JPG]]<br />
<br />
----<br />
<br />
*Drag the unzip file to a director.<br />
::eg. USB memory devics<br />
[[Image:prog_guid_drag.JPG]]<br />
<br />
----<br />
<br />
*Save your .hex file(foo.hex) to your directory location <br />
::e.g. X:\dsPic_Programmer\ ---> X:\ is the driver where the dsPic_Programmer located<br />
[[Image:prog_guid_hex.JPG]]<br />
===Download Firmware===<br />
*Start a Command Prompt<br />
**Start -> Run<br>[[Image:2 1 run.JPG]]<br><br />
**Enter cmd<br>[[Image:2 2 cmd.JPG]]<br><br />
*Run dsPicProgrammer<br />
**Make sure your device is connected through a "Direct RS232 Cable" to PC Serial Port. <br />
**Change to the directory where dsPicProgrammer.jar is located and run the command:<br />
***for example, jre\bin\java -Djava.library.path=.\rxtx\bin -jar dspicProgrammer.jar COM1 115200 foo.hex<br />
***Or directly using dsPicProgrammer.bat COM1 115200 foo.hex(Windows)<br />
***java -jar dsPicProgrammer.jar /dev/ttyS0 115200 foo.hex (Linux)<br />
:::where COM1 is your COM Port ID<br />
:::115200 is communication speed [in bps]<br />
:::foo.hex is your firmware new file<br />
::[[Image:2 3 command.JPG]]<br />
:*When the program prompt you for an input, press y:<br>[[Image:2 4 prompt.JPG]]<br><br />
:*If communication can be established, you should see something like this:<br>[[Image:2 5 progress.JPG]]<br><br />
:*Wait until programming is completed.<br>[[Image:2 6 complete.JPG]]<br><br />
:*after all completed, power OFF your device, then power ON again, enjoy your new updated.<br />
<br />
==Troubleshooting==<br />
===Invalid COM Port===<br />
*In case of selecting an invalid COM port, you should see the error message:<br>gnu.io.NoSuchPortException: Choosing COM Port Error<br>[[Image:3 1 com err.JPG]]<br><br><br />
===Missing firmware file===<br />
*In case of selecting a firmware file that does not exist, you should see the error message:<br>java.io.FileNotFoundException: foo1.hex <The system cannot find the file specified><br>[[Image:3 2 file err.JPG]]<br><br><br />
===Missing RXTX driver===<br />
*In case of missing the RXTX driver, you should see the error message:<br>Exception in thread “main” java.lang.NoClassDefFoundError: gnu/io/UnsupportedCommOperationException<br>[[Image:3 3 rxtx err.JPG]]<br><br></div>Nelsonhttp://www.opencircuits.com/index.php?title=File:4.jpg&diff=17426File:4.jpg2009-01-15T07:31:06Z<p>Nelson: </p>
<hr />
<div></div>Nelson