<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ks_c_5601-1987">
<META content="MSHTML 5.50.4915.500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=536380910-14102002>Just a
quick question - are you using the 'brief' ATmega128 datasheet (only 19 pages
long) or are you looking at the complete datasheet, which is 367 pages long? The
complete datasheet has a lot more information than the summary one, which might
help you with questions such as this (combined with an analysis of the C code,
of course)</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=536380910-14102002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=536380910-14102002>The
URL of the complete datasheet is: <A
href="http://www.atmel.com/atmel/acrobat/doc2467.pdf">http://www.atmel.com/atmel/acrobat/doc2467.pdf</A></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
en-nut-discussion-admin@egnite.de
[mailto:en-nut-discussion-admin@egnite.de]<B>On Behalf Of
</B>Á¶»ó¸¸<BR><B>Sent:</B> Monday, 14 October 2002 7:42 PM<BR><B>To:</B>
en-nut-discussion@egnite.de<BR><B>Subject:</B> [En-Nut-Discussion] in
portdio.c sample<BR><BR></FONT></DIV>
<DIV><FONT size=2>Hi,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>I did use portdio.c sample code.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>I have some questions.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>I modified some parts in the code.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>that is, (as output)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>1) outp(0xf0, DDRD);-> outp(0x<STRONG>11</STRONG>,
DDRD);</FONT></DIV>
<DIV><FONT size=2> outp(0x0f, PORTD);->
outp(0x<STRONG>ff</STRONG>, PORTD);</FONT></DIV>
<DIV><FONT size=2>It is ok, I used 'reset' command as below.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>200 Welcome to portdio. Type help to get help.<BR>210
11111111<BR>210 OK<BR>210 01111111<BR>210 OK<BR>210 00111111<BR>210 OK<BR>210
00011111<BR>210 OK<BR>210 00001111 </FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>This time, I modified some parts as below.</FONT><FONT
size=2> </FONT><FONT size=2>(as input)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>outp(0xf0, DDRD);-> outp(0x<STRONG>00</STRONG>, DDRD);
<DIV><FONT size=2>outp(0x0f, PORTD);-> outp(0x<STRONG>ff</STRONG>,
PORTD);</FONT></DIV></FONT></DIV>
<DIV><FONT size=2><BR>Although I used 'reset' command, however, I failed to
set Port D bits as below.</FONT></DIV>
<DIV><FONT size=2>If Poft D is set as <STRONG>input</STRONG>, Can't I
modified port bits?</FONT></DIV>
<DIV><FONT size=2>If it is right, Can you explain to me the reason
?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>(command sequence in telnet prompt: query -> reset4
->reset3 -> reset2 -> reset1 ) </FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>200 Welcome to portdio. Type help to get help.<BR>210
11111111<BR>210 OK<BR>210 11111111<BR>210 OK<BR>210 11111111<BR>210 OK<BR>210
11011111<BR>210 OK<BR>210 11011111<BR></FONT></DIV>
<DIV><FONT size=2>sincerely yours.</FONT></DIV>
<DIV><FONT size=2> </DIV></BLOCKQUOTE></FONT></BODY></HTML>