[En-Nut-Discussion] in portdio.c sample

Alastair Jeremy ajeremy at dotaussie.com.au
Mon Oct 14 12:13:22 CEST 2002


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)

The URL of the complete datasheet is:
http://www.atmel.com/atmel/acrobat/doc2467.pdf

  -----Original Message-----
  From: en-nut-discussion-admin at egnite.de
[mailto:en-nut-discussion-admin at egnite.de]On Behalf Of 조상만
  Sent: Monday, 14 October 2002 7:42 PM
  To: en-nut-discussion at egnite.de
  Subject: [En-Nut-Discussion] in portdio.c sample


  Hi,

  I did use portdio.c sample code.

  I have some questions.

  I modified some parts in the code.

  that is,  (as output)

  1)  outp(0xf0, DDRD);-> outp(0x11, DDRD);
      outp(0x0f, PORTD);-> outp(0xff, PORTD);
  It is ok, I used 'reset' command as below.

  200 Welcome to portdio. Type help to get help.
  210 11111111
  210 OK
  210 01111111
  210 OK
  210 00111111
  210 OK
  210 00011111
  210 OK
  210 00001111

  This time, I modified some parts as below. (as input)

  outp(0xf0, DDRD);-> outp(0x00, DDRD);
  outp(0x0f, PORTD);-> outp(0xff, PORTD);

  Although I used 'reset' command, however, I failed to set Port D bits as
below.
  If Poft D is set as input, Can't I modified port bits?
  If it is right, Can you explain to me the reason ?

  (command sequence in telnet prompt: query -> reset4 ->reset3 -> reset2 ->
reset1 )

  200 Welcome to portdio. Type help to get help.
  210 11111111
  210 OK
  210 11111111
  210 OK
  210 11111111
  210 OK
  210 11011111
  210 OK
  210 11011111

  sincerely yours.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20021014/63c24d5d/attachment-0001.html>


More information about the En-Nut-Discussion mailing list