avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Stoooopid Noooobie question...


From: Robert Ussery
Subject: [avr-gcc-list] Stoooopid Noooobie question...
Date: Mon, 1 Dec 2003 20:29:28 -0700

Hi, all.

I've got a very stupid Nubie question, that may turn out to be a case of
RTFM. Anyway, here's my question. How can I address specific pins or bits of
I/O and settings registers? For instance, I want to set only PB3 as an
output after I've set the rest of Port B to be inputs. How can I do this
without modifying all the bits of the DDRB register?  Another example would
be reading the state of, say PB2, while ignoring the rest of the register
(port). I imagine there's some way to do this with elaborate XORing or
something, but I'm convinced there's some obvious, considerably easier way
that I simply haven't run across.

I'm very new to avr-gcc, and I don't have any C programming experience, so
this is a case of learning as I go along. I've been through the ritual LED
blinking programs, but now that I'm trying some more advanced stuff I'm
finding my knowledge level very limiting. Thanx for your help.

 

- Robert


reply via email to

[Prev in Thread] Current Thread [Next in Thread]