[En-Nut-Discussion] Controlling I/O pins

Sigurd Kleppan 021243 at student.hit.no
Wed Mar 3 18:55:07 CET 2004


I know you can control the pins on ethernut with:
Set output:
sbi(PORTA,1) //example

Read input:
If (bit_is_set(PINA,1)){
 (do something here)
}

But it is possible to controll pins on ethernut on this way:
Set output:
DQ=1 //pull pin high
DQ=0 //pull pin low

Read input:
If (DQ==1)
{
 (do something here)
}

I have red some code as use these tecknic? How do i config and use
it on Ethernut?

____________________

How do i answer articles in the discussion forume?

Thanks!
Sigurd




More information about the En-Nut-Discussion mailing list