[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Glitch on GPIO
From: |
Galen Seitz |
Subject: |
Re: [avr-gcc-list] Glitch on GPIO |
Date: |
Fri, 24 Feb 2006 08:14:38 -0800 |
Jahagirdar Gopal-AGJ005 <address@hidden> wrote:
> Yes, first I am configuring the direction register and then writing data
> in to it.
> Will this be a problem?
> will it work, If we write data first and then configure the direction
> register?
>
I think that is the problem. The data register has an initial value of
0x00 after reset. When you configure a GPIO as an output first, the
initial value of 0 gets driven on the pin. The pin will continue to drive
a zero until the corresponding data register bit is written with a 1.
Switching the order should solve your problem.
galen