Programming the ATmega328 ports, need help with code

Hi.

I bought a set with ATmega328s, and I followed the blinking led tutorial. The code is set to send a signal on all ports. I wish to alter the code, so that I can chose which port I want to send a current to.

Something like this:

  1. – 1 sek current to output on port PC1, then PC1 off

  2. – 1 sek to PC2, then PC2 off.

  3. – If there is a signal to input PD3, send a current to PC3 for 10 seconds. End if no signal to PD3.

Can anyone help me with the code, so that I could start experimenting?

Best regards,

Stlnet

Try the tutorials on the AVR Freaks forum.

What address is that?

http://www.avrfreaks.net/

and the forum

http://www.avrfreaks.net/index.php?name … file=index

and the tutorials

http://www.avrfreaks.net/index.php?name … forum&f=11