[Top][All Lists]

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

Re[2]: [avr-gcc-list] quick question!!

From: Alexey Boyko
Subject: Re[2]: [avr-gcc-list] quick question!!
Date: Wed, 15 May 2002 10:21:38 +0300

Hello Randy,

RO> You can make the AVR ports act like 8051 quasi-bidirectional ports this way:


RO> the '51.  When used this way make sure you NEVER put a 1 in the PORTx
RO> register because it will cause the pin to be forced high and that might
RO> conflict with whatever input is connected to it.  Let the pull-up do the
RO> work.

On '51 strong pull-up switched on for 2 clocks to decrease line
capacitance recharge. So, for full emulation, before putting 0 to DDRx,
put 1 to PORTx for 1-2 clocks.

for example:

  sbi   PORTx, Bit
  cbi   DDRx, Bit

  cbi   PORTx, Bit
  sbi   DDRx, Bit

Best regards,
 Alexey                            mailto:address@hidden

avr-gcc-list at http://avr1.org

reply via email to

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