Thread: AVR Help
View Single Post
  #5   Spotlight this post!  
Unread 07-01-2006, 08:47
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: AVR Help

Quote:
Originally Posted by sparksandtabs
For example can I just say portB = 0b00001101?

In the board right now I have an atmega8515
PORTB actually, C is case sensitive, also don't forget the semi-colons ( at the end, and you're good.

Also read up on your Data Direction Registers and to read pin states (when set to input) use PINB (or PINA...PIND..etc) as in
if(PINB == 0b10110000)
do stuff

Have fun, good luck.
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)