<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<html>
<!-- Generated by AceHTML Freeware http://freeware.acehtml.com -->
<!-- Creation date: 6/3/2004 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>www.mindaugas.com</title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="mindmil@one.lt">
<meta name="generator" content="AceHTML 5 Freeware">


<style type="text/css">
<!--
A:link {font-family: Arial, Helvetica, sans-serif;  text-decoration: none; color: #006600}

A:visited {font-family: Arial, Helvetica, sans-serif;  text-decoration: none; color: #006600}

A:hover {font-family: Arial, Helvetica, sans-serif;  text-decoration: underline; color: #006600}

A:link.menu {font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration: none; color: #f5f5f5}

A:visited.menu {font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration: none; color: #f5f5f5}

A:link.menuhlt {font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration: none; color: #f5f5b5}

A:visited.menuhlt {font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration: none; color: #f5f5b5}

A:hover.menu {font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration:underline; color: #f5f5f5}

.menu {font-family: Verdana, Arial, Helvetica, sans-serif; color: #f5f5f5}

.menuhlt {font-family: Verdana, Arial, Helvetica, sans-serif; color: #f5f5d5}

td {background:   transparent; color: navy; font-family: Arial, Helvetica, sans-serif; font-size: 9pt}

body {background-color: #dcdcdc; font-size: 9pt}

.mainmenu {background-color: #191970; color: #f5f5f5; font-size: 10pt; width: 120px}

.rightpanel {background-color: #191970; color: #f5f5f5; font-size: 10pt; width: 120px}

.mainmenuline {color: #c0c0c0;noshade}

.field_name2 {background-color: #191970; color: #f5f5f5; }
.field_name {background-color: #303080; color: #f5f5f5; }
.field_value {background-color: #dcdcdc; color: #000080; }

.submenu {background-color: #4169E1; color: #f5f5f5; font-size: 9pt}

.submenu2 {background-color: #EAEAF3; color: #000080; font-size: 9pt}

.submenu2_lll {background-color: #fAfAF3; color: #bF4500; font-size: 9pt}

.submenu2_l {background-color: #fff6E0; color: #000080; font-size: 9pt}
.submenu2_l_2 {background-color: #fAfAF3; color: #000080; font-size: 9pt}

.submenu2_anouncement2 {background-color: #ddFFdd; color: #000080; font-size: 9pt}

.submenu2_anouncement {background-color: #FFfbcc; color: #d02000; font-size: 9pt}
.submenu2_anouncement_big {background-color: #FFfbcc; color: #d02000; font-size: 14pt}

.submenu2_anouncement4 {background-color: #FFfbcc; color: #800000; font-size: 9pt}

.submenu2_anouncement3 {background-color: #FFfbcc; color: #000080; font-size: 9pt}

.submenu2_lt {background-color: #fAfAF3; color: #f5f5f5; font-size: 9pt}

.submenu2_body2 {background-color: #FFFFeb; color: ##800000; font-size: 9pt}

.submenu2_body {background-color: #FFFff7; font-size: 9pt}
.submenu2_body3 {background-color: #dcdcdc; font-size: 9pt}

.submenuitem {background-color: #4169E1; color: #f5f5f5; width: 70px}

.titlebar {background: #FFA500; color: #800000}

.footerbar {background: #FFA500; color: #800000}

h1 {font-size: 16pt}

h2 {font-size: 14pt}

h3 {font-size: 12pt}

h4 {font-size: 10pt}

h5 {font-size: 8pt}

h6 {font-size: 6pt}

.textstyle {font: bold 12px Verdana;  line-height: 1.5;}

.rgdsmailstyle {font: italic bold 12px Verdana;  line-height: 1.5;}

.formstyle {background-color: #E1E1E1;}

/* End of style section. Generated by AceHTML at 2/7/2005 11:43:21 PM */
-->
</style>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


<script type="text/javascript">
var contacts=new Array()
contacts[0]=["Mindaugas Milasauskas", "mindaug[eta]mindaugas[taskas]com"]
contacts[1]=["mindaug[eta]mindaugas[taskas]com", "mindaug[eta]mindaugas[taskas]com"]
contacts[2]=["sales[eta]mindaugas[taskas]com", "sales[eta]mindaugas[taskas]com[klaustukas]subject[lygu]MJoy16-C1 ordering"]
var dropmenucaption="CONTACT US FORM "

function displaycontact(emailarray, cssclass, displaymethod, extrainfo)
{
	if (displaymethod=="text")
	{
		document.write('<span class="' + cssclass + '">\n')
		if (typeof emailarray[0]=="object")
		{ 
			for (i=0; i<emailarray.length; i++)
			{
				var seperator=(i<emailarray.length-1)? extrainfo : ""
				if (emailarray[i][0] == "")
					document.write('<a href="mailto:' + modifyemail(emailarray[i][1])+ '">'+ emailarray[i][1] + '</a>' + seperator)
				else
					document.write('<a href="mailto:' + modifyemail(emailarray[i][1])+ '">'+ emailarray[i][0] + '</a>' + seperator)
					
			}
		}
		else //else if it is a single array element
		if (emailarray[0] == "")
			document.write('<a href="mailto:' + modifyemail(emailarray[1])+ '">'+ modifyemail(emailarray[1]) + '</a>')
		else
			document.write('<a href="mailto:' + modifyemail(emailarray[1])+ '">'+ modifyemail(emailarray[0]) + '</a>')
		document.write('</span>')
	}
	else if (displaymethod=="form")
	{
		document.write('<form>\n')
		document.write('<select size="' + extrainfo + '" onChange="jumptooption(this)" class="' + cssclass + '">\n')
		document.write('<option value="caption">' + dropmenucaption + '</option>\n')
		for (i=0; i<emailarray.length; i++)
			document.write('<option value="mailto:' + modifyemail(emailarray[i][1]) +'">' + emailarray[i][0] + ' </option>\n')
		document.write('</select></form>\n')
	}
}

function modifyemail(emailitem){
var modified=emailitem.replace(/\[eta]/gi, "@")
modified=modified.replace(/\[taskas]/gi, ".")
modified=modified.replace(/\[klaustukas]/gi, "?")
modified=modified.replace(/\[lygu]/gi, "=")
return modified
}

function jumptooption(themenu){
if (themenu.options[themenu.selectedIndex].value !="caption")
location=themenu.options[themenu.selectedIndex].value
}
</script>
		
		
</head>
<body>  <!-- bgcolor="#ffffcc" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000"> -->

<table width="800" align="center" border="0" cellpadding="0" cellspacing="0" bordercolor="#000000" summary="">
	<tr>
		<td height="24" class=titlebar align="center">
		<span style="font: normal; font-family:     sans-serif; font-size: 18pt; font-weight: bold">Mindaugas' Home</span>
		</td>
	</tr>
	<tr>
		<td>
	<table border="0" height="600" cellpadding="0" cellspacing="0" bordercolor="#000000" summary="" >
	<tr>
		<td width="120" align="left" valign="top" class=mainmenu> 
			 <table  border="0" cellpadding="4" cellspacing="0" bordercolor="#000000" summary="" >
				<tr>
					<td class=mainmenu > 
					
												<div >
						<b><a href="../../default.htm" title="Home" class=menu>Home</a></b>						 </div>
						 <hr class=mainmenuline>
														<div >
						<b><a href="../../projects/default.htm" title="Projects" class=menu>Projects</a></b>						 </div>
						 <hr class=mainmenuline>
														<div >
						<b><a href="../default.htm" title="Products" class=menu>Products</a></b><br>&nbsp;&nbsp;<a href="default.htm" title="MJoy16-C1" class=menu>MJoy16-C1</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" title="Ordering" class=menu>Ordering</a>						 </div>
						 <hr class=mainmenuline>
														<div >
						<b><a href="../../software/default.htm" title="Software" class=menu>Software</a></b>						 </div>
						 <hr class=mainmenuline>
														<div >
						<b><a href="../../about.php" title="About" class=menu>About</a></b>						 </div>
						 <hr class=mainmenuline>
																				 
					</td>
				</tr>
		 	</table>
		 </td>
		<td width="680" align="justify" valign="top" bgcolor="#FFFFCC"  class="submenu2_body" >
	



		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<a name="top"></a>
<table   width="100%" border="0" cellpadding="4" cellspacing="0" bordercolor="#000000" summary=""  >
 <tr>
      <td class="submenu">
      <table   width="100%" border="0" cellpadding="4" cellspacing="0" bordercolor="#000000" summary="">
         <tr>
            <td class="submenu"><h2>Programming MJoy16-C1</h2></td>
            <td class="submenu"><h4>Brief instruction how to program MJoy16-C1</h4></td>
      </tr>
      </table>   
   </td>
</tr>	
	<tr>
		<td valign="top">
   <table border="0" summary="">
	<tr>
		<td valign="top">

<a name="Writing firmware to MJoy16">		<h3>Writing firmware to MJoy16</h3></a>
<div style="text-align:justify;">  
Below is the procedure to program the chip:

1. Download and install recent PonyProg from www.lancos.com. I am using version 2.06e Beta.<br> 
2. Calibrate PonyProg to your PC speed from Setup -> Calibration <br>
3. Select device from Device-> AVR micro-> ATmega16. See picture below: <br>
	<a href="Select Device.png"><img src="Select Device_thumb.png" border="0" alt=""></a><br>
<br>
4. Setup programming interface from Setup -> Interface Setup... menu. SSee picture below:  <br>
	<a href="Interface_Setup.png"><img src="Interface_Setup_thumb.png" border="0" alt=""></a><br>
<br>
5. Connect the board to USB and connect ISP adapter cable one end to ISP socket on the board and other end to you PC printer port. Note: your printer port must be in working condition i.e. not disabled from BIOS. <br>
6. Try to read the device by selecting Command -> Read Programm (FLASH) from menu. It should say Read Successfull. Otherwise check all the settings above. If it was successful proceed further. <br>
7. Erase the chip by executing Command -> Erase. <br>
8. Open the new firmware .hex file from File -> Open Programm (FLASH) file... menu. <br>
9. Write the program to the chip by executing menu Command -> Write Programm (FLASH). It should finish successfully. <br>
10. You must write the chip configuration bits from Command-> Security and Configuration bits... menu to their correct settings as in picture below:<br>
	<a href="Configuration and Security Bits.png"><img src="Configuration and Security Bits_thumb.png" border="0" alt=""></a><br>
<br>
11. Disconnect the ISP adapter cable. Disconnect and then connect again the USB cable. It should appear as new device in Windows.<br>
	</div>
	
	
    </td>
  	
  		</tr>
  	</table>
			<div align="center"><hr width="95%" color="#c0c0c0"></div>

  </td>
 </tr>
<tr>
	<td valign="top">
<a name="Setting desired Name, Vendor and Product ID">				<h3>Setting desired Name, Vendor and Product ID</h3></a>
	<div style="text-align:justify;">	
	MJoy16-C1 has the ability to easily change the Vendor ID, Product ID and name of MJoy16.<br>
These fields are the first 8 bytes of EEPROM contents.<br>
 <br>
Bytes 4000-4003 - Name<br>
Bytes 4004-4005 - Vendor ID (reverse order)<br>
Bytes 4006-4007 - Product ID (reverse order)<br>
<br> 
	<a href="EEPROM_Bytes.png"><img src="EEPROM_Bytes_thumb.png" border="0" alt=""></a><br>
<br> 
So you may set the Vendor ID to make MJoy16 be behind your main device.
MJ62 would use product ID 3 and so on.<br>
 
You do not need any other firmware. You just need to open PonyProg, read EEPROM contents, edit them, write them
back to the chip, replug the USB connector and voila - you have new device in Windows :)<br>
		</div>

<br>
<br>
<div align="right">	<a href="#top">Go to top of the page</a></div>
		<hr width="95%" color="#c0c0c0">


	
  </td>
 </tr>
    <tr>
  	 <td>
<a name="Notes">		<h3>Notes</h3> </a>
		<div style="text-align:justify;">
		<br>
		Use the information on this page at your own risk. No party can be held responsible for any damage caused.<br>
		
	<br><br>
	<b>&nbsp &nbsp Product Contact:	&nbsp &nbsp 
	<script type="text/javascript">
				displaycontact(contacts[1], "", "text", " | ")
		</script>	
	</b><br>
	<br>		
		
		</div>
		
		<br>

<div align="right">	<a href="#top">Go to top of the page</a></div>
		<hr width="95%" color="#c0c0c0">
		

<h5>Last update: 2005-06-07</h5>		 
	   </td>

</tr>
 
</table>
		

</td>
</tr>
</table>
		</td>
	</tr>
	<tr>
		<td height="12" class=footerbar align="center">
		</td>
	</tr>

</table>


</body>
</html>