[En-Nut-Discussion] Programming I/O ports

Harald Kipp harald.kipp at egnite.de
Thu Jan 8 18:27:48 CET 2004


Hi Sigurd,

in general:

DDRB = 0xFF;
sets all pins on port B to output.

PORTB = 0;
sets all outputs to high.

Please refer to the ATmega128 datasheet for further
explanation.

You can't use PORTA and PORTC. Well, you can, but
this requires to switch off the memory interface,
which may become quite complicated to do it the
right way. Better do not use it.

PORTE bit 5 is used by the Ethernet interrupt.

PORTF bits 4-7 are blocked, if the JTAG fuse
is enabled. Again, check the datasheet.

Harald

At 13:38 08.01.2004 +0100, you wrote:
>I have watched the webport example, but i can't find a simple example hos 
>i can programming against the in/out pins on the ethernut board (128). Do 
>someone have a simple example how i can programming against the A,B and D 
>ports on the board which i can compile in ICC.
>
>Sigurd Kleppan
>
>_______________________________________________
>En-Nut-Discussion mailing list
>En-Nut-Discussion at egnite.de
>http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion




More information about the En-Nut-Discussion mailing list