Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Connecting AVRs directly to inputs of 74HC and LS logic chips.

Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-02 by kernels_nz

Hi Guys,

Ive had two different boards lately give a lot of trouble, both had 
OUTPUTS on AVR chips connected directly to inputs on 74HC and 74LS 
logic chips. 

Looking at it with my scope, it appeared that the AVR was unable to 
pull the input on the logic chip completely low ? It would pull it to 
around 1 to 3 volts for a low output.

I did ensure that the pins were set up as OUTPUTS, nothing else 
weird. 

Both problems were solved by connecting 100k resistors from the input 
pins on the logic chips to ground.

Any ideas ? Im sure it will be obvious as soon as someone points out 
the obvious, but it's got me beat.

Cheers
Hein B
Andante Technology
Auckland
New Zealand.

Re: [AVR-Chat] Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-03 by dlc

The LS might require too much drive for a CMOS output, but the AVR's can 
drive LED's directly so they have lots of drive current.  The HC part is 
a CMOS part and should pose no problems to the AVR.  Many parts have 
weak pull up or pull downs on them.  Is is possible to program those on 
when there is an output and create a problem?

DLC

kernels_nz wrote:
> Hi Guys,
> 
> Ive had two different boards lately give a lot of trouble, both had 
> OUTPUTS on AVR chips connected directly to inputs on 74HC and 74LS 
> logic chips. 
> 
> Looking at it with my scope, it appeared that the AVR was unable to 
> pull the input on the logic chip completely low ? It would pull it to 
> around 1 to 3 volts for a low output.
> 
> I did ensure that the pins were set up as OUTPUTS, nothing else 
> weird. 
> 
> Both problems were solved by connecting 100k resistors from the input 
> pins on the logic chips to ground.
> 
> Any ideas ? Im sure it will be obvious as soon as someone points out 
> the obvious, but it's got me beat.
> 
> Cheers
> Hein B
> Andante Technology
> Auckland
> New Zealand.
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 

-- 
-------------------------------------------------
Dennis Clark          TTT Enterprises
www.techtoystoday.com
-------------------------------------------------

Re: [AVR-Chat] Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-03 by Jose Fuentes

I have a board with an AVR driving a LS chip directly,
and it works fine.  But I had problems with source
code like this:
  PORTA = PINA | 0x01;
It seems that under certain conditions PORTA is not
equal to PINA.  I modified the code like this:
  PORTA = PORTA | 0x01;
and it solved the problem.

The first thing that comes to mind when you say that
"AVR was unable to pull the input on the logic chip
completely low" is that AVR pin was actually set as
input.  That way you would be pulling high the pin by
using the internal pull-up.  But you woudn't be able
to pull down the pin because it just would enter into
high impedance state.




Regards

Jose



> kernels_nz wrote:
> > Hi Guys,
> > 
> > Ive had two different boards lately give a lot of
> trouble, both had 
> > OUTPUTS on AVR chips connected directly to inputs
> on 74HC and 74LS 
> > logic chips. 
> > 
> > Looking at it with my scope, it appeared that the
> AVR was unable to 
> > pull the input on the logic chip completely low ?
> It would pull it to 
> > around 1 to 3 volts for a low output.
> > 
> > I did ensure that the pins were set up as OUTPUTS,
> nothing else 
> > weird. 
> > 
> > Both problems were solved by connecting 100k
> resistors from the input 
> > pins on the logic chips to ground.
> > 
> > Any ideas ? Im sure it will be obvious as soon as
> someone points out 
> > the obvious, but it's got me beat.
> > 
> > Cheers
> > Hein B
> > Andante Technology
> > Auckland
> > New Zealand.
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >  
> > Yahoo! Groups Links
> > 
> > 
> > 
> >  
> > 
> > 
> 
> -- 
> -------------------------------------------------
> Dennis Clark          TTT Enterprises
> www.techtoystoday.com
> -------------------------------------------------
> 
> 
>  
> Yahoo! Groups Links
> 
> 
>     AVR-Chat-unsubscribe@yahoogroups.com
> 
>  
> 
> 
> 


__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar

Re: [AVR-Chat] Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-03 by James Hatley

Jose,

All Atmel processors (as far as I know anyway) have three registers for a
port, one is for setting the output bits that you have declared output
(PORTA), one is for reading the input bits you declared input (PINA) and of
course, the DDRA register for setting which bits are input and which are
output.

This is different from other processors that use just one register for both
functions. I know the Motorola processors I've used the bit in PORTA changes
dependent on the definition in the DDR.

Register PINA is used when you want to read the input of the port or just
read a bit in the register. It reflects the input to PORTA.

Register PORTA is used when you what to set bits of the port or just set a
bit. If you read PORTA it is reading what is programmed in to the output
register for PORTA.

It all depends on how you have set DDRA, inputs or outputs as to what
register you use and what you want to do with the bit.

To set a bit with the bit declared output high use PORTA=PORTA|0x01;, to use
your example. Or to set it low use PORTA=PORTA&0xfe; ( Most use macros here
to manipulate bits as it is much more fool proof. )

To read a bit with the bit declared input use FOO=PINA&0xfe, to use your
example.

I'm sure these work and that you will not have any "trouble". Study of the
Atmel manual for the processor you are using also helps.

Maybe this is too simplified but hope it helps some,

Jim




----- Original Message ----- 
From: "Jose Fuentes" <josecarlosfuentes@yahoo.com.ar>
To: <AVR-Chat@yahoogroups.com>
Sent: Sunday, April 02, 2006 11:39 PM
Subject: Re: [AVR-Chat] Connecting AVRs directly to inputs of 74HC and LS
logic chips.
Show quoted textHide quoted text
> I have a board with an AVR driving a LS chip directly,
> and it works fine.  But I had problems with source
> code like this:
>   PORTA = PINA | 0x01;
> It seems that under certain conditions PORTA is not
> equal to PINA.  I modified the code like this:
>   PORTA = PORTA | 0x01;
> and it solved the problem.
>
> The first thing that comes to mind when you say that
> "AVR was unable to pull the input on the logic chip
> completely low" is that AVR pin was actually set as
> input.  That way you would be pulling high the pin by
> using the internal pull-up.  But you woudn't be able
> to pull down the pin because it just would enter into
> high impedance state.
>
>
>
>
> Regards
>
> Jose
>
>
>
> > kernels_nz wrote:
> > > Hi Guys,
> > >
> > > Ive had two different boards lately give a lot of
> > trouble, both had
> > > OUTPUTS on AVR chips connected directly to inputs
> > on 74HC and 74LS
> > > logic chips.
> > >
> > > Looking at it with my scope, it appeared that the
> > AVR was unable to
> > > pull the input on the logic chip completely low ?
> > It would pull it to
> > > around 1 to 3 volts for a low output.
> > >
> > > I did ensure that the pins were set up as OUTPUTS,
> > nothing else
> > > weird.
> > >
> > > Both problems were solved by connecting 100k
> > resistors from the input
> > > pins on the logic chips to ground.
> > >
> > > Any ideas ? Im sure it will be obvious as soon as
> > someone points out
> > > the obvious, but it's got me beat.
> > >
> > > Cheers
> > > Hein B
> > > Andante Technology
> > > Auckland
> > > New Zealand.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> > >
> >
> > -- 
> > -------------------------------------------------
> > Dennis Clark          TTT Enterprises
> > www.techtoystoday.com
> > -------------------------------------------------
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >     AVR-Chat-unsubscribe@yahoogroups.com
> >
> >
> >
> >
> >
>
>
> __________________________________________________
> Correo Yahoo!
> Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
> ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>

Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-03 by kernels_nz

Hmmhm, discussion seems to have strayed a bit, but just in case 
anyone ever runs across the same problem:

* I definately had the pins on the AVRs configured as outputs. 

* The same fault occured with both 74HC and 74LS chips, but only on   
   my newer batches of Mega16s and Tiny26s.

* In both cases, the problem was cured by fitting external 100k    
  pulldown resistors. NO CODE CHANGES.

* I know it sounds like I had the pins configured as inputs and using 
  the internal pullup to pull it high, but thats just not the case.

Cheers
Hein B


--- In AVR-Chat@yahoogroups.com, "James Hatley" <james.hatley@...> 
wrote:
>
> Yes, Jose, good point on pull ups. I forgot about them as I never 
use them
> here. I disable them globally. Old habits from using Motorola 
processors and
> if pull ups are needed I put the specific one required external to 
the
> processor.
> 
> Good luck with your project.
> 
> Jim
> 
> ----- Original Message ----- 
> From: "Jose Fuentes" <josecarlosfuentes@...>
> To: <AVR-Chat@yahoogroups.com>
> Sent: Monday, April 03, 2006 11:57 AM
> Subject: Re: [AVR-Chat] Connecting AVRs directly to inputs of 74HC 
and LS
Show quoted textHide quoted text
> logic chips.
> 
> 
> > --- James Hatley <james.hatley@...> escribió:
> >
> > > Jose,
> > >
> > > All Atmel processors (as far as I know anyway) have
> > > three registers for a
> > > port, one is for setting the output bits that you
> > > have declared output
> > > (PORTA), one is for reading the input bits you
> > > declared input (PINA) and of
> > > course, the DDRA register for setting which bits are
> > > input and which are
> > > output.
> >
> > But it doesn't mean you can not write on the
> > corresponding register PORTx of an input pin.  When
> > you configure a pin as input, and write a "0" to it
> > (by writing PORTx register) the pin enters in high-Z
> > state, if you write a "1" to it and PUD bit is set,
> > then pin is pulled-up.
> >
> > Also you can read PORTx registers because they are
> > read/write registers.
> >
> > > Register PINA is used when you want to read the
> > > input of the port or just
> > > read a bit in the register. It reflects the input to
> > > PORTA.
> >
> > You are right, PINA is a read-only register.
> >
> > > Register PORTA is used when you what to set bits of
> > > the port or just set a
> > > bit. If you read PORTA it is reading what is
> > > programmed in to the output
> > > register for PORTA.
> > >
> > > It all depends on how you have set DDRA, inputs or
> > > outputs as to what
> > > register you use and what you want to do with the
> > > bit.
> > >
> > > To set a bit with the bit declared output high use
> > > PORTA=PORTA|0x01;, to use
> > > your example. Or to set it low use PORTA=PORTA&0xfe;
> > > ( Most use macros here
> > > to manipulate bits as it is much more fool proof. )
> > >
> > > To read a bit with the bit declared input use
> > > FOO=PINA&0xfe, to use your
> > > example.
> > >
> > > Maybe this is too simplified but hope it helps some,
> > >
> > > Jim
> > >
> > >
> > >
> > >
> > > ----- Original Message ----- 
> > > From: "Jose Fuentes"
> > > <josecarlosfuentes@...>
> > > To: <AVR-Chat@yahoogroups.com>
> > > Sent: Sunday, April 02, 2006 11:39 PM
> > > Subject: Re: [AVR-Chat] Connecting AVRs directly to
> > > inputs of 74HC and LS
> > > logic chips.
> > >
> > >
> > > > I have a board with an AVR driving a LS chip
> > > directly,
> > > > and it works fine.  But I had problems with source
> > > > code like this:
> > > >   PORTA = PINA | 0x01;
> > > > It seems that under certain conditions PORTA is
> > > not
> > > > equal to PINA.  I modified the code like this:
> > > >   PORTA = PORTA | 0x01;
> > > > and it solved the problem.
> > > >
> > > > The first thing that comes to mind when you say
> > > that
> > > > "AVR was unable to pull the input on the logic
> > > chip
> > > > completely low" is that AVR pin was actually set
> > > as
> > > > input.  That way you would be pulling high the pin
> > > by
> > > > using the internal pull-up.  But you woudn't be
> > > able
> > > > to pull down the pin because it just would enter
> > > into
> > > > high impedance state.
> > > >
> > > >
> > > >
> > > >
> > > > Regards
> > > >
> > > > Jose
> > > >
> > > >
> > > >
> > > > > kernels_nz wrote:
> > > > > > Hi Guys,
> > > > > >
> > > > > > Ive had two different boards lately give a lot
> > > of
> > > > > trouble, both had
> > > > > > OUTPUTS on AVR chips connected directly to
> > > inputs
> > > > > on 74HC and 74LS
> > > > > > logic chips.
> > > > > >
> > > > > > Looking at it with my scope, it appeared that
> > > the
> > > > > AVR was unable to
> > > > > > pull the input on the logic chip completely
> > > low ?
> > > > > It would pull it to
> > > > > > around 1 to 3 volts for a low output.
> > > > > >
> > > > > > I did ensure that the pins were set up as
> > > OUTPUTS,
> > > > > nothing else
> > > > > > weird.
> > > > > >
> > > > > > Both problems were solved by connecting 100k
> > > > > resistors from the input
> > > > > > pins on the logic chips to ground.
> > > > > >
> > > > > > Any ideas ? Im sure it will be obvious as soon
> > > as
> > > > > someone points out
> > > > > > the obvious, but it's got me beat.
> > > > > >
> > > > > > Cheers
> > > > > > Hein B
> > > > > > Andante Technology
> > > > > > Auckland
> > > > > > New Zealand.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Yahoo! Groups Links
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > > -- 
> > > > >
> > > -------------------------------------------------
> > > > > Dennis Clark          TTT Enterprises
> > > > > www.techtoystoday.com
> > > > >
> > > -------------------------------------------------
> > > > >
> > > > >
> > > > >
> > > > > Yahoo! Groups Links
> > > > >
> > > > >
> > > > >     AVR-Chat-unsubscribe@yahoogroups.com
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > __________________________________________________
> > > > Correo Yahoo!
> > > > Espacio para todos tus mensajes, antivirus y
> > > antispam ¡gratis!
> > > > ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
> > > >
> > > >
> > > >
> > > > Yahoo! Groups Links
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >     AVR-Chat-unsubscribe@yahoogroups.com
> > >
> > >
> > >
> > >
> > >
> >
> >
> > __________________________________________________
> > Correo Yahoo!
> > Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
> > ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>

Re: [AVR-Chat] Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-03 by Jose Fuentes

--- James Hatley <james.hatley@comcast.net> escribió:

> Jose,
> 
> All Atmel processors (as far as I know anyway) have
> three registers for a
> port, one is for setting the output bits that you
> have declared output
> (PORTA), one is for reading the input bits you
> declared input (PINA) and of
> course, the DDRA register for setting which bits are
> input and which are
> output.

But it doesn't mean you can not write on the
corresponding register PORTx of an input pin.  When
you configure a pin as input, and write a "0" to it
(by writing PORTx register) the pin enters in high-Z
state, if you write a "1" to it and PUD bit is set,
then pin is pulled-up.

Also you can read PORTx registers because they are
read/write registers.

> Register PINA is used when you want to read the
> input of the port or just
> read a bit in the register. It reflects the input to
> PORTA.

You are right, PINA is a read-only register.
 
> Register PORTA is used when you what to set bits of
> the port or just set a
> bit. If you read PORTA it is reading what is
> programmed in to the output
> register for PORTA.
> 
> It all depends on how you have set DDRA, inputs or
> outputs as to what
> register you use and what you want to do with the
> bit.
> 
> To set a bit with the bit declared output high use
> PORTA=PORTA|0x01;, to use
> your example. Or to set it low use PORTA=PORTA&0xfe;
> ( Most use macros here
> to manipulate bits as it is much more fool proof. )
> 
> To read a bit with the bit declared input use
> FOO=PINA&0xfe, to use your
> example.
> 
> Maybe this is too simplified but hope it helps some,
> 
> Jim
> 
> 
> 
> 
> ----- Original Message ----- 
> From: "Jose Fuentes"
> <josecarlosfuentes@yahoo.com.ar>
> To: <AVR-Chat@yahoogroups.com>
> Sent: Sunday, April 02, 2006 11:39 PM
> Subject: Re: [AVR-Chat] Connecting AVRs directly to
> inputs of 74HC and LS
> logic chips.
> 
> 
> > I have a board with an AVR driving a LS chip
> directly,
> > and it works fine.  But I had problems with source
> > code like this:
> >   PORTA = PINA | 0x01;
> > It seems that under certain conditions PORTA is
> not
> > equal to PINA.  I modified the code like this:
> >   PORTA = PORTA | 0x01;
> > and it solved the problem.
> >
> > The first thing that comes to mind when you say
> that
> > "AVR was unable to pull the input on the logic
> chip
> > completely low" is that AVR pin was actually set
> as
> > input.  That way you would be pulling high the pin
> by
> > using the internal pull-up.  But you woudn't be
> able
> > to pull down the pin because it just would enter
> into
> > high impedance state.
> >
> >
> >
> >
> > Regards
> >
> > Jose
> >
> >
> >
> > > kernels_nz wrote:
> > > > Hi Guys,
> > > >
> > > > Ive had two different boards lately give a lot
> of
> > > trouble, both had
> > > > OUTPUTS on AVR chips connected directly to
> inputs
> > > on 74HC and 74LS
> > > > logic chips.
> > > >
> > > > Looking at it with my scope, it appeared that
> the
> > > AVR was unable to
> > > > pull the input on the logic chip completely
> low ?
> > > It would pull it to
> > > > around 1 to 3 volts for a low output.
> > > >
> > > > I did ensure that the pins were set up as
> OUTPUTS,
> > > nothing else
> > > > weird.
> > > >
> > > > Both problems were solved by connecting 100k
> > > resistors from the input
> > > > pins on the logic chips to ground.
> > > >
> > > > Any ideas ? Im sure it will be obvious as soon
> as
> > > someone points out
> > > > the obvious, but it's got me beat.
> > > >
> > > > Cheers
> > > > Hein B
> > > > Andante Technology
> > > > Auckland
> > > > New Zealand.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Yahoo! Groups Links
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > > -- 
> > >
> -------------------------------------------------
> > > Dennis Clark          TTT Enterprises
> > > www.techtoystoday.com
> > >
> -------------------------------------------------
> > >
> > >
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >     AVR-Chat-unsubscribe@yahoogroups.com
> > >
> > >
> > >
> > >
> > >
> >
> >
> > __________________________________________________
> > Correo Yahoo!
> > Espacio para todos tus mensajes, antivirus y
> antispam ¡gratis!
> > ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
>     AVR-Chat-unsubscribe@yahoogroups.com
> 
>  
> 
> 
> 


__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar

Re: [AVR-Chat] Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-03 by James Hatley

Yes, Jose, good point on pull ups. I forgot about them as I never use them
here. I disable them globally. Old habits from using Motorola processors and
if pull ups are needed I put the specific one required external to the
processor.

Good luck with your project.

Jim

----- Original Message ----- 
From: "Jose Fuentes" <josecarlosfuentes@yahoo.com.ar>
To: <AVR-Chat@yahoogroups.com>
Sent: Monday, April 03, 2006 11:57 AM
Subject: Re: [AVR-Chat] Connecting AVRs directly to inputs of 74HC and LS
logic chips.
Show quoted textHide quoted text
> --- James Hatley <james.hatley@comcast.net> escribió:
>
> > Jose,
> >
> > All Atmel processors (as far as I know anyway) have
> > three registers for a
> > port, one is for setting the output bits that you
> > have declared output
> > (PORTA), one is for reading the input bits you
> > declared input (PINA) and of
> > course, the DDRA register for setting which bits are
> > input and which are
> > output.
>
> But it doesn't mean you can not write on the
> corresponding register PORTx of an input pin.  When
> you configure a pin as input, and write a "0" to it
> (by writing PORTx register) the pin enters in high-Z
> state, if you write a "1" to it and PUD bit is set,
> then pin is pulled-up.
>
> Also you can read PORTx registers because they are
> read/write registers.
>
> > Register PINA is used when you want to read the
> > input of the port or just
> > read a bit in the register. It reflects the input to
> > PORTA.
>
> You are right, PINA is a read-only register.
>
> > Register PORTA is used when you what to set bits of
> > the port or just set a
> > bit. If you read PORTA it is reading what is
> > programmed in to the output
> > register for PORTA.
> >
> > It all depends on how you have set DDRA, inputs or
> > outputs as to what
> > register you use and what you want to do with the
> > bit.
> >
> > To set a bit with the bit declared output high use
> > PORTA=PORTA|0x01;, to use
> > your example. Or to set it low use PORTA=PORTA&0xfe;
> > ( Most use macros here
> > to manipulate bits as it is much more fool proof. )
> >
> > To read a bit with the bit declared input use
> > FOO=PINA&0xfe, to use your
> > example.
> >
> > Maybe this is too simplified but hope it helps some,
> >
> > Jim
> >
> >
> >
> >
> > ----- Original Message ----- 
> > From: "Jose Fuentes"
> > <josecarlosfuentes@yahoo.com.ar>
> > To: <AVR-Chat@yahoogroups.com>
> > Sent: Sunday, April 02, 2006 11:39 PM
> > Subject: Re: [AVR-Chat] Connecting AVRs directly to
> > inputs of 74HC and LS
> > logic chips.
> >
> >
> > > I have a board with an AVR driving a LS chip
> > directly,
> > > and it works fine.  But I had problems with source
> > > code like this:
> > >   PORTA = PINA | 0x01;
> > > It seems that under certain conditions PORTA is
> > not
> > > equal to PINA.  I modified the code like this:
> > >   PORTA = PORTA | 0x01;
> > > and it solved the problem.
> > >
> > > The first thing that comes to mind when you say
> > that
> > > "AVR was unable to pull the input on the logic
> > chip
> > > completely low" is that AVR pin was actually set
> > as
> > > input.  That way you would be pulling high the pin
> > by
> > > using the internal pull-up.  But you woudn't be
> > able
> > > to pull down the pin because it just would enter
> > into
> > > high impedance state.
> > >
> > >
> > >
> > >
> > > Regards
> > >
> > > Jose
> > >
> > >
> > >
> > > > kernels_nz wrote:
> > > > > Hi Guys,
> > > > >
> > > > > Ive had two different boards lately give a lot
> > of
> > > > trouble, both had
> > > > > OUTPUTS on AVR chips connected directly to
> > inputs
> > > > on 74HC and 74LS
> > > > > logic chips.
> > > > >
> > > > > Looking at it with my scope, it appeared that
> > the
> > > > AVR was unable to
> > > > > pull the input on the logic chip completely
> > low ?
> > > > It would pull it to
> > > > > around 1 to 3 volts for a low output.
> > > > >
> > > > > I did ensure that the pins were set up as
> > OUTPUTS,
> > > > nothing else
> > > > > weird.
> > > > >
> > > > > Both problems were solved by connecting 100k
> > > > resistors from the input
> > > > > pins on the logic chips to ground.
> > > > >
> > > > > Any ideas ? Im sure it will be obvious as soon
> > as
> > > > someone points out
> > > > > the obvious, but it's got me beat.
> > > > >
> > > > > Cheers
> > > > > Hein B
> > > > > Andante Technology
> > > > > Auckland
> > > > > New Zealand.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Yahoo! Groups Links
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > > -- 
> > > >
> > -------------------------------------------------
> > > > Dennis Clark          TTT Enterprises
> > > > www.techtoystoday.com
> > > >
> > -------------------------------------------------
> > > >
> > > >
> > > >
> > > > Yahoo! Groups Links
> > > >
> > > >
> > > >     AVR-Chat-unsubscribe@yahoogroups.com
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > __________________________________________________
> > > Correo Yahoo!
> > > Espacio para todos tus mensajes, antivirus y
> > antispam ¡gratis!
> > > ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
> > >
> > >
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >     AVR-Chat-unsubscribe@yahoogroups.com
> >
> >
> >
> >
> >
>
>
> __________________________________________________
> Correo Yahoo!
> Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
> ¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-04 by James Hatley

Hello Hein,

Yes, sorry... we drifted away from your problem but it was an interesting
discussion between Jose and I.

Delighted that you were able to find and fix the problem but it is
mysterious just why. I drive 74HC chips in several production environments
without problem using AVR processors, ATmega32 and ATmega644 on one such and
ATmega2560 the other.

Maybe someone will enlighten us on just how this happens as it seems odd to
me that a just a high value resistance pull down would be required. Wonder
if others have had this problem?

Jim
Show quoted textHide quoted text
----- Original Message ----- 
From: "kernels_nz" <hein@mediflex.co.nz>
To: <AVR-Chat@yahoogroups.com>
Sent: Monday, April 03, 2006 1:41 PM
Subject: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS
logic chips.


Hmmhm, discussion seems to have strayed a bit, but just in case
anyone ever runs across the same problem:

* I definately had the pins on the AVRs configured as outputs.

* The same fault occured with both 74HC and 74LS chips, but only on
   my newer batches of Mega16s and Tiny26s.

* In both cases, the problem was cured by fitting external 100k
  pulldown resistors. NO CODE CHANGES.

* I know it sounds like I had the pins configured as inputs and using
  the internal pullup to pull it high, but thats just not the case.

Cheers
Hein B

<<<< snip >>>>

Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-04 by kernels_nz

hi Jim,

Yeah, ive almost given up, sounds a bit like a beginner mistake, but
ive been working with AVRs on at least a weekly basis for about 4
years now, so it's nothing new. The DDR was set such that the 4 pins
connecting to the inputs of the logic chip (74ls138 and 74hc138) were 1's.

Ill have a proper proper read through the code again tonite.

I didnt have the problem during development, had the pcb made, now
it's got the problem on about half the Mega chips I use, if I pull the
chip out, and plug an older chip with  the same code in, the problem
dissapears.

I actually thought it was a problem with the Mega the first time I saw
the problem occur, desoldered it and crunched it, before finding one a
few boards later doing the same thing.

Is definately something in the Megas, just thought it would be worth
mentioning to the guys in here in case someone else sees weird things
start happening.

THANKS for all the suggestions guys !

Cheers
Hein B

--- In AVR-Chat@yahoogroups.com, "James Hatley" <james.hatley@...> wrote:
>
> Hello Hein,
> 
> Yes, sorry... we drifted away from your problem but it was an
interesting
> discussion between Jose and I.
> 
> Delighted that you were able to find and fix the problem but it is
> mysterious just why. I drive 74HC chips in several production
environments
> without problem using AVR processors, ATmega32 and ATmega644 on one
such and
> ATmega2560 the other.
> 
> Maybe someone will enlighten us on just how this happens as it seems
odd to
> me that a just a high value resistance pull down would be required.
Wonder
> if others have had this problem?
> 
> Jim
> 
> 
> ----- Original Message ----- 
> From: "kernels_nz" <hein@...>
> To: <AVR-Chat@yahoogroups.com>
> Sent: Monday, April 03, 2006 1:41 PM
> Subject: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC
and LS
Show quoted textHide quoted text
> logic chips.
> 
> 
> Hmmhm, discussion seems to have strayed a bit, but just in case
> anyone ever runs across the same problem:
> 
> * I definately had the pins on the AVRs configured as outputs.
> 
> * The same fault occured with both 74HC and 74LS chips, but only on
>    my newer batches of Mega16s and Tiny26s.
> 
> * In both cases, the problem was cured by fitting external 100k
>   pulldown resistors. NO CODE CHANGES.
> 
> * I know it sounds like I had the pins configured as inputs and using
>   the internal pullup to pull it high, but thats just not the case.
> 
> Cheers
> Hein B
> 
> <<<< snip >>>>
>

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-04 by David VanHorn


* The same fault occured with both 74HC and 74LS chips, but only on
my newer batches of Mega16s and Tiny26s.
This sets my alarm off.. The input threshold in HC is 1/2 VCC, and the gates neither source or sink any appreciable current.
So, something's fishy.
Common ground between the chips?
Same VCC rails?
Hang a scope on it and see what you see.
I've used a lot of HC chips with AVRs, and I've not had a problem, nor would I expect one.

* In both cases, the problem was cured by fitting external 100k
pulldown resistors. NO CODE CHANGES.
So you're seeing that the gate outputs are so weak that a 100k pulldown is a significant improvement? Something's fishy.
* I know it sounds like I had the pins configured as inputs and using
the internal pullup to pull it high, but thats just not the case.
Sanity check here: Unlike the pic, 1 = output and 0 = input.

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-04 by John Samperi

At 06:41 AM 4/04/2006, you wrote:
>* I definately had the pins on the AVRs configured as outputs.

I can't remember your original post...so you are saying that the
Data Direction Register (DDRx) is set at 0xff (all 1)

>* The same fault occured with both 74HC and 74LS chips, but only on
>    my newer batches of Mega16s and Tiny26s.

Very strange seeing that the typical HC chip has an input load
of several MEGA Ohms (ie no current used) the LS has an input load
of several Kilo Ohms (input current <<1ma) and any AVR can sink or
source up to 20ma!! A stupid question I know but are you sure ALL
your ground pins on the chip are going to 0V? Have you measured it?


Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-04 by David VanHorn


Very strange seeing that the typical HC chip has an input load
of several MEGA Ohms (ie no current used) the LS has an input load
of several Kilo Ohms (input current <<1ma) and any AVR can sink or
source up to 20ma!! A stupid question I know but are you sure ALL
your ground pins on the chip are going to 0V? Have you measured it?
Yeah, I smell a rat too. It's just NOT this hard to drive common logic gates.

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-04 by Peter Gargano

I have the reverse concern - Driving AVRs from parts designed to be 
used with TTL. Most AVRs (eg Mega-168) have a 0.6VCC spec. on VIHmin 
meaning 3.0 Volts when run at 5.0 Volts (well, actually worse case is 
0.6 x VCCmax which may give VIHmin of 3.15 Volts).

Many parts you may want to interface to an AVR have a VOHmin of 2.4 
Volts - meaning they are not guaranteed to drive the minimum required 
3.0 Volts.

So, how come people can get away with it? Here's an example (and I 
could quote many more, I use this example because it was ready to hand).

   http://www.prllc.com/productcart/pc/viewPrd.asp?idproduct=9

If you check the schematic on the User's Guide you'll see they have a 
Samsung memory chip (with the above VOHmin of 2.4) interfaced directly 
to the M128 running at VCC of 5.0 Volts (VIHmin of 3.0 Volts).

Peter


.

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-04 by Kathy Quinlan

Peter Gargano wrote:
> I have the reverse concern - Driving AVRs from parts designed to be 
> used with TTL. Most AVRs (eg Mega-168) have a 0.6VCC spec. on VIHmin 
> meaning 3.0 Volts when run at 5.0 Volts (well, actually worse case is 
> 0.6 x VCCmax which may give VIHmin of 3.15 Volts).
> 
> Many parts you may want to interface to an AVR have a VOHmin of 2.4 
> Volts - meaning they are not guaranteed to drive the minimum required 
> 3.0 Volts.
> 
> So, how come people can get away with it? Here's an example (and I 
> could quote many more, I use this example because it was ready to hand).
> 
>    http://www.prllc.com/productcart/pc/viewPrd.asp?idproduct=9
> 
> If you check the schematic on the User's Guide you'll see they have a 
> Samsung memory chip (with the above VOHmin of 2.4) interfaced directly 
> to the M128 running at VCC of 5.0 Volts (VIHmin of 3.0 Volts).
> 
> Peter

You are looking at worst case, typical case is that it will work well.

But this is not the problem for the OP, I would say his problem is more 
likely grounding (either 2 separate ground nets, chips missing ground) 
or he is trying to drive the avr outputs with them set to inputs (which 
would do exactly what he says, reasonable "1" but needs pull down for a "0"


-- 
Regards,

Kat.
---------------------------------------------------------------
  K.A.Q. Electronics     Website: www.kaqelectronics.dyndns.org
  IM: Yahoo: PinkyDwaggy MSN: katinka@kaqelectronics.dyndns.org
  For Everything Electronics 		   Phone: 0419 923 731
---------------------------------------------------------------


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.5/300 - Release Date: 3/04/2006

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-04 by Russell Shaw

Peter Gargano wrote:
> I have the reverse concern - Driving AVRs from parts designed to be 
> used with TTL. Most AVRs (eg Mega-168) have a 0.6VCC spec. on VIHmin 
> meaning 3.0 Volts when run at 5.0 Volts (well, actually worse case is 
> 0.6 x VCCmax which may give VIHmin of 3.15 Volts).
> 
> Many parts you may want to interface to an AVR have a VOHmin of 2.4 
> Volts - meaning they are not guaranteed to drive the minimum required 
> 3.0 Volts.
> 
> So, how come people can get away with it? Here's an example (and I 
> could quote many more, I use this example because it was ready to hand).
> 
>    http://www.prllc.com/productcart/pc/viewPrd.asp?idproduct=9
> 
> If you check the schematic on the User's Guide you'll see they have a 
> Samsung memory chip (with the above VOHmin of 2.4) interfaced directly 
> to the M128 running at VCC of 5.0 Volts (VIHmin of 3.0 Volts).

If you look at fig.182 of the ATmega16 data sheet, you'll find that VIHmin=1.9V,
so the 3V spec must be at some 3-5 sigma distribution point.

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-04 by John Samperi

At 02:34 PM 4/04/2006, you wrote:
>You are looking at worst case, typical case is that it will work well.

...at room temperature of about 25 deg. :-) I would not use that
method for, say, automotive application like Peter would use it for
and definitely would not use it if someone life could depend on it.

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-04 by David VanHorn



On 4/3/06, Peter Gargano <peter@techedge.com.au> wrote:
Show quoted textHide quoted text
I have the reverse concern - Driving AVRs from parts designed to be
used with TTL. Most AVRs (eg Mega-168) have a 0.6VCC spec. on VIHmin
meaning 3.0 Volts when run at 5.0 Volts (well, actually worse case is
0.6 x VCCmax which may give VIHmin of 3.15 Volts).
Right but that's also when loaded to the max current spec for a high output pin.

Many parts you may want to interface to an AVR have a VOHmin of 2.4
Volts - meaning they are not guaranteed to drive the minimum required
3.0 Volts.
Again, when driving a full spec load.

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-04 by John Samperi

At 02:37 PM 4/04/2006, you wrote:
>The DDR was set such that the 4 pins
>connecting to the inputs of the logic chip (74ls138 and 74hc138) were 1's.

hmmm you are not using the JTAG pins of the Mega 16 for your
output are you? If so is the JTAG disabled?

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-04 by Kathy Quinlan

John Samperi wrote:
> At 02:34 PM 4/04/2006, you wrote:
>> You are looking at worst case, typical case is that it will work well.
> 
> ...at room temperature of about 25 deg. :-) I would not use that
> method for, say, automotive application like Peter would use it for
> and definitely would not use it if someone life could depend on it.
> 
> Regards
> 
> John Samperi

Me BAD lol to much work, not enough sleep and not enough CAFFEINE ;)

What I meant to say was that the worst case is full loaded, typical case 
  is not much loading, so the high is usually closer to VCC :)

Sigh, I need a port (a permanent cannula) then I can have IV CAFFEINE ;)


-- 
Regards,

Kat.
---------------------------------------------------------------
  K.A.Q. Electronics     Website: www.kaqelectronics.dyndns.org
  IM: Yahoo: PinkyDwaggy MSN: katinka@kaqelectronics.dyndns.org
  For Everything Electronics 		   Phone: 0419 923 731
---------------------------------------------------------------


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.5/300 - Release Date: 3/04/2006

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-04 by Peter Gargano

Russell Shaw wrote:
> If you look at fig.182 of the ATmega16 data sheet, you'll find that VIHmin=1.9V,
> so the 3V spec must be at some 3-5 sigma distribution point.

Russell, thanks for that. Also fig. 192 and 193 of the M64 datasheet 
say the same thing.

Again, on the M64 data sheet, this is quite different to the DC 
Characteristics (on page 327) where

                          min.     typ.    max.
                         ------------------------------
VIL Input Low Voltage    -0.5             0.2 VCC
VIH Input High Voltage    0.6 VCC         VCC + 0.5 V

Peter



.

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-04 by Russell Shaw

Peter Gargano wrote:
> Russell Shaw wrote:
> 
>>If you look at fig.182 of the ATmega16 data sheet, you'll find that VIHmin=1.9V,
>>so the 3V spec must be at some 3-5 sigma distribution point.
> 
> 
> Russell, thanks for that. Also fig. 192 and 193 of the M64 datasheet 
> say the same thing.
> 
> Again, on the M64 data sheet, this is quite different to the DC 
> Characteristics (on page 327) where
> 
>                           min.     typ.    max.
>                          ------------------------------
> VIL Input Low Voltage    -0.5             0.2 VCC
> VIH Input High Voltage    0.6 VCC         VCC + 0.5 V

You could enable the input pullup resistor, or add an external one.
Also look at the datasheet for the device driving it, and check if
the 2.4V output limit only happens at higher load current.

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-04 by Leon Heller

----- Original Message -----
Sent: Tuesday, April 04, 2006 4:23 AM
Subject: Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.


Very strange seeing that the typical HC chip has an input load
of several MEGA Ohms (ie no current used) the LS has an input load
of several Kilo Ohms (input current <<1ma) and any AVR can sink or
source up to 20ma!! A stupid question I know but are you sure ALL
your ground pins on the chip are going to 0V? Have you measured it?
Yeah, I smell a rat too. It's just NOT this hard to drive common logic gates.
There *must* be something wrong with the design or construction! The DC characteristics table shows VOH as 4.2 V min. and VOL as 0.7 V max. when sourcing or sinking 20 mA.
Leon
--

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-05 by Timothy D. Lenz

Sounds like a flaky batch of chips.
----- Original Message ----- 
From: "kernels_nz" <hein@mediflex.co.nz>
To: <AVR-Chat@yahoogroups.com>
Sent: Monday, April 03, 2006 9:37 PM
Subject: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS
logic chips.
Show quoted textHide quoted text
> hi Jim,
>
> Yeah, ive almost given up, sounds a bit like a beginner mistake, but
> ive been working with AVRs on at least a weekly basis for about 4
> years now, so it's nothing new. The DDR was set such that the 4 pins
> connecting to the inputs of the logic chip (74ls138 and 74hc138) were 1's.
>
> Ill have a proper proper read through the code again tonite.
>
> I didnt have the problem during development, had the pcb made, now
> it's got the problem on about half the Mega chips I use, if I pull the
> chip out, and plug an older chip with  the same code in, the problem
> dissapears.
>
> I actually thought it was a problem with the Mega the first time I saw
> the problem occur, desoldered it and crunched it, before finding one a
> few boards later doing the same thing.
>
> Is definately something in the Megas, just thought it would be worth
> mentioning to the guys in here in case someone else sees weird things
> start happening.
>
> THANKS for all the suggestions guys !
>
> Cheers
> Hein B
>
> --- In AVR-Chat@yahoogroups.com, "James Hatley" <james.hatley@...> wrote:
> >
> > Hello Hein,
> >
> > Yes, sorry... we drifted away from your problem but it was an
> interesting
> > discussion between Jose and I.
> >
> > Delighted that you were able to find and fix the problem but it is
> > mysterious just why. I drive 74HC chips in several production
> environments
> > without problem using AVR processors, ATmega32 and ATmega644 on one
> such and
> > ATmega2560 the other.
> >
> > Maybe someone will enlighten us on just how this happens as it seems
> odd to
> > me that a just a high value resistance pull down would be required.
> Wonder
> > if others have had this problem?
> >
> > Jim
> >
> >
> > ----- Original Message ----- 
> > From: "kernels_nz" <hein@...>
> > To: <AVR-Chat@yahoogroups.com>
> > Sent: Monday, April 03, 2006 1:41 PM
> > Subject: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC
> and LS
> > logic chips.
> >
> >
> > Hmmhm, discussion seems to have strayed a bit, but just in case
> > anyone ever runs across the same problem:
> >
> > * I definately had the pins on the AVRs configured as outputs.
> >
> > * The same fault occured with both 74HC and 74LS chips, but only on
> >    my newer batches of Mega16s and Tiny26s.
> >
> > * In both cases, the problem was cured by fitting external 100k
> >   pulldown resistors. NO CODE CHANGES.
> >
> > * I know it sounds like I had the pins configured as inputs and using
> >   the internal pullup to pull it high, but thats just not the case.
> >
> > Cheers
> > Hein B
> >
> > <<<< snip >>>>
> >
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-05 by Kathy Quinlan

dlc wrote:
> Not uncommon with AVR's in my experience.  I have yet to get a board 
> designed that didn't have problems with resets on an AVR or MEGAAVR 
> part.  I've found that if I run the part at its maximum rated frequency, 
> I get flaky boards, if I derate by 20% or so then the board gets more 
> reliable, and if I derate by 50% the clock speed everything works fine. 
>   This seems to indicate that I've got noise on the clock lines - but 
> after my first experience with these things I've started designing with 
> guard rings on my oscillator circuits, whole plane grounds, bypass caps 
> up the nose, low pass filters on my VDD and everything else I've found 
> in app notes on the Atmel site, still I can get flaky boards.  I never 
> have these problems with PICs <did I say that?>.
> 
> I love these chips, they have speed, capability and low cost.  But oh 
> the problems with Atmel availability and quirkyness.
> 
> IMO, YMMV,
> DLC

If you want to first check your CKOPT fuse (the default is UNCHECKED, 
CHECK IT!!!!) that will fix a lot of problems.

OK if you want to send me the pcb and schematic I can check over, as I 
have NEVER HAD flaky AVR boards since setting the CKOPT fuse :) I have 
over 300 ATMega128's in the field right now, (the only problem ones are 
the ones that have not had the fuse ticked (someone else programmed them 
lol) (but they are coming back as we take them all to the current 
revision (some hardware mods and firmware upgrades)

-- 
Regards,

Kat.
---------------------------------------------------------------
  K.A.Q. Electronics     Website: www.kaqelectronics.dyndns.org
  IM: Yahoo: PinkyDwaggy MSN: katinka@kaqelectronics.dyndns.org
  For Everything Electronics 		   Phone: 0419 923 731
---------------------------------------------------------------


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.5/301 - Release Date: 4/04/2006

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-05 by dlc

Not uncommon with AVR's in my experience.  I have yet to get a board 
designed that didn't have problems with resets on an AVR or MEGAAVR 
part.  I've found that if I run the part at its maximum rated frequency, 
I get flaky boards, if I derate by 20% or so then the board gets more 
reliable, and if I derate by 50% the clock speed everything works fine. 
  This seems to indicate that I've got noise on the clock lines - but 
after my first experience with these things I've started designing with 
guard rings on my oscillator circuits, whole plane grounds, bypass caps 
up the nose, low pass filters on my VDD and everything else I've found 
in app notes on the Atmel site, still I can get flaky boards.  I never 
have these problems with PICs <did I say that?>.

I love these chips, they have speed, capability and low cost.  But oh 
the problems with Atmel availability and quirkyness.

IMO, YMMV,
DLC

Timothy D. Lenz wrote:
> Sounds like a flaky batch of chips.
> ----- Original Message ----- 
> From: "kernels_nz" <hein@mediflex.co.nz>
> To: <AVR-Chat@yahoogroups.com>
> Sent: Monday, April 03, 2006 9:37 PM
> Subject: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS
> logic chips.
> 
> 
> 
>>hi Jim,
>>
>>Yeah, ive almost given up, sounds a bit like a beginner mistake, but
>>ive been working with AVRs on at least a weekly basis for about 4
>>years now, so it's nothing new. The DDR was set such that the 4 pins
>>connecting to the inputs of the logic chip (74ls138 and 74hc138) were 1's.
>>
>>Ill have a proper proper read through the code again tonite.
>>
>>I didnt have the problem during development, had the pcb made, now
>>it's got the problem on about half the Mega chips I use, if I pull the
>>chip out, and plug an older chip with  the same code in, the problem
>>dissapears.
>>
>>I actually thought it was a problem with the Mega the first time I saw
>>the problem occur, desoldered it and crunched it, before finding one a
>>few boards later doing the same thing.
>>
>>Is definately something in the Megas, just thought it would be worth
>>mentioning to the guys in here in case someone else sees weird things
>>start happening.
>>
>>THANKS for all the suggestions guys !
>>
>>Cheers
>>Hein B
>>
>>--- In AVR-Chat@yahoogroups.com, "James Hatley" <james.hatley@...> wrote:
>>
>>>Hello Hein,
>>>
>>>Yes, sorry... we drifted away from your problem but it was an
>>
>>interesting
>>
>>>discussion between Jose and I.
>>>
>>>Delighted that you were able to find and fix the problem but it is
>>>mysterious just why. I drive 74HC chips in several production
>>
>>environments
>>
>>>without problem using AVR processors, ATmega32 and ATmega644 on one
>>
>>such and
>>
>>>ATmega2560 the other.
>>>
>>>Maybe someone will enlighten us on just how this happens as it seems
>>
>>odd to
>>
>>>me that a just a high value resistance pull down would be required.
>>
>>Wonder
>>
>>>if others have had this problem?
>>>
>>>Jim
>>>
>>>
>>>----- Original Message ----- 
>>>From: "kernels_nz" <hein@...>
>>>To: <AVR-Chat@yahoogroups.com>
>>>Sent: Monday, April 03, 2006 1:41 PM
>>>Subject: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC
>>
>>and LS
>>
>>>logic chips.
>>>
>>>
>>>Hmmhm, discussion seems to have strayed a bit, but just in case
>>>anyone ever runs across the same problem:
>>>
>>>* I definately had the pins on the AVRs configured as outputs.
>>>
>>>* The same fault occured with both 74HC and 74LS chips, but only on
>>>   my newer batches of Mega16s and Tiny26s.
>>>
>>>* In both cases, the problem was cured by fitting external 100k
>>>  pulldown resistors. NO CODE CHANGES.
>>>
>>>* I know it sounds like I had the pins configured as inputs and using
>>>  the internal pullup to pull it high, but thats just not the case.
>>>
>>>Cheers
>>>Hein B
>>>
>>><<<< snip >>>>
>>>
>>
>>
>>
>>
>>
>>
>>Yahoo! Groups Links
>>
>>
>>
>>
>>
>>
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 

-- 
-------------------------------------------------
Dennis Clark          TTT Enterprises
www.techtoystoday.com
-------------------------------------------------

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-05 by DLC

Indeed, I'll have to check that one out.  Hmm, limited frequency, 
increased noise susceptability when unchecked, additional amp, rail to 
rail operation when checked.  D@M! that sure sounds like the pill!  I 
never saw that one, that is some really hefty fine print hidden in 
there.  It explains why my 16MHz parts only ran well at 8MHz.

You learn something new every day - I'm going to have to twiddle that 
one and see if it settles my little robots down nicely.

Thanks, you've just saved me some more hair pulling.

DLC

Kathy Quinlan wrote:
> dlc wrote:
> 
>>Not uncommon with AVR's in my experience.  I have yet to get a board 
>>designed that didn't have problems with resets on an AVR or MEGAAVR 
>>part.  I've found that if I run the part at its maximum rated frequency, 
>>I get flaky boards, if I derate by 20% or so then the board gets more 
>>reliable, and if I derate by 50% the clock speed everything works fine. 
>>  This seems to indicate that I've got noise on the clock lines - but 
>>after my first experience with these things I've started designing with 
>>guard rings on my oscillator circuits, whole plane grounds, bypass caps 
>>up the nose, low pass filters on my VDD and everything else I've found 
>>in app notes on the Atmel site, still I can get flaky boards.  I never 
>>have these problems with PICs <did I say that?>.
>>
>>I love these chips, they have speed, capability and low cost.  But oh 
>>the problems with Atmel availability and quirkyness.
>>
>>IMO, YMMV,
>>DLC
> 
> 
> If you want to first check your CKOPT fuse (the default is UNCHECKED, 
> CHECK IT!!!!) that will fix a lot of problems.
> 
> OK if you want to send me the pcb and schematic I can check over, as I 
> have NEVER HAD flaky AVR boards since setting the CKOPT fuse :) I have 
> over 300 ATMega128's in the field right now, (the only problem ones are 
> the ones that have not had the fuse ticked (someone else programmed them 
> lol) (but they are coming back as we take them all to the current 
> revision (some hardware mods and firmware upgrades)
> 

-- 
-------------------------------------------------
Dennis Clark          TTT Enterprises
www.techtoystoday.com
-------------------------------------------------

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-05 by Kathy Quinlan

DLC wrote:
> Indeed, I'll have to check that one out.  Hmm, limited frequency, 
> increased noise susceptability when unchecked, additional amp, rail to 
> rail operation when checked.  D@M! that sure sounds like the pill!  I 
> never saw that one, that is some really hefty fine print hidden in 
> there.  It explains why my 16MHz parts only ran well at 8MHz.
> 
> You learn something new every day - I'm going to have to twiddle that 
> one and see if it settles my little robots down nicely.
> 
> Thanks, you've just saved me some more hair pulling.
> 
> DLC

No worries mate, you need to thank Dave VanHorn, he found it out 
originally ;)

-- 
Regards,

Kat.
---------------------------------------------------------------
  K.A.Q. Electronics     Website: www.kaqelectronics.dyndns.org
  IM: Yahoo: PinkyDwaggy MSN: katinka@kaqelectronics.dyndns.org
  For Everything Electronics 		   Phone: 0419 923 731
---------------------------------------------------------------


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.5/301 - Release Date: 4/04/2006

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-05 by John Samperi

At 02:22 PM 5/04/2006, you wrote:
>If you want to first check your CKOPT fuse (the default is UNCHECKED,
>CHECK IT!!!!) that will fix a lot of problems.

The data sheet is VERY clear that the CKOPT fuse must be set ( i.e. 0)
for clock speeds higher than 8 MHz.

I must say that I have never had any problems so far with it unchecked
HOWEVER my crystal frequency has been 8MHz for all my boards up to now,
no need for speed here :-) I think 8MHz is far too fast, in fact I have
had one application (IDE Interface) where I had to introduce lots of nops
to slow it down because the CDROM could not keep up with the AVR :-D

So all you "speedy gonzales" out there remember to check the CKOPT fuse
if you MUST run above 8MHz....that reminds me to check it in my new
Mega64 board which has a 16MHz crystal just for the heck of it
(not in production yet) :-D

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

Re: [AVR-Chat] Re: Connecting AVRs directly to inputs of 74HC and LS logic chips.

2006-04-05 by Kathy Quinlan

John Samperi wrote:
> At 02:22 PM 5/04/2006, you wrote:
>> If you want to first check your CKOPT fuse (the default is UNCHECKED,
>> CHECK IT!!!!) that will fix a lot of problems.
> 
> The data sheet is VERY clear that the CKOPT fuse must be set ( i.e. 0)
> for clock speeds higher than 8 MHz.
> 
> I must say that I have never had any problems so far with it unchecked
> HOWEVER my crystal frequency has been 8MHz for all my boards up to now,
> no need for speed here :-) I think 8MHz is far too fast, in fact I have
> had one application (IDE Interface) where I had to introduce lots of nops
> to slow it down because the CDROM could not keep up with the AVR :-D
> 
> So all you "speedy gonzales" out there remember to check the CKOPT fuse
> if you MUST run above 8MHz....that reminds me to check it in my new
> Mega64 board which has a 16MHz crystal just for the heck of it
> (not in production yet) :-D
> 
> Regards
> 
> John Samperi

Try running a TCP/IP stack with 8Mhz lol, VERY SLOW. Even at 14.7456Mhz 
it is a bit slow, would love a 20Mhz part that had the features of the 
Mega128 then I could run at the 18.xxxMhz that gives me precise baud 
rates :)

-- 
Regards,

Kat.
---------------------------------------------------------------
  K.A.Q. Electronics     Website: www.kaqelectronics.dyndns.org
  IM: Yahoo: PinkyDwaggy MSN: katinka@kaqelectronics.dyndns.org
  For Everything Electronics 		   Phone: 0419 923 731
---------------------------------------------------------------


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.5/301 - Release Date: 4/04/2006

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.