|
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!)
|