|
From: | Lars Noschinski |
Subject: | Re: [avr-gcc-list] Using PORTB with variables, PORTB = var |
Date: | Sat, 22 Apr 2006 08:30:33 +0200 |
User-agent: | mutt-ng/devel-r790 (Linux) |
* address@hidden <address@hidden> [2006-04-22 08:09]:
How can I use the PORTB constant with variables? eg: while (1) { var <<= 1; PORTB = var }
This will work. But after seven iterations (if var is (u)int8_t), var will be 0.
That is what I'm trying to acheive. I'd like to be able to do it with variables like I do above, but it doesn't seem to work. Once I replace "var" with an actual number, it works as expected.
The problem lies probably elsewhere.
[Prev in Thread] | Current Thread | [Next in Thread] |