Yahoo Groups archive

AVR-Chat

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

Thread

A couple of 168p questions

A couple of 168p questions

2009-12-18 by Philippe Habib

I'm using a 168p on a project and I've run into a couple of things  
that I want to make sure I got right from the data sheet.

The first is using the ADC7 pin as an output.  Can that be done?  My  
compiler tells me the required defines are not there and all I see in  
the datasheet is about the pin being an ADC input pin.  Is that pin  
input only?

The other is when I use the PCINT pins.  Is there a way to tell which  
of the pins triggered the int or do I have to keep track of the pins  
state and compare it myself?  Again, I didn't see a register that I  
can just look at with that information..

I'd love to hear that I missed both of these things.

Thanks.

Re: [AVR-Chat] A couple of 168p questions

2009-12-18 by Jim Wagner

On Dec 17, 2009, at 7:27 PM, Philippe Habib wrote:

> I'm using a 168p on a project and I've run into a couple of things
> that I want to make sure I got right from the data sheet.
>
> The first is using the ADC7 pin as an output. Can that be done? My
> compiler tells me the required defines are not there and all I see in
> the datasheet is about the pin being an ADC input pin. Is that pin
> input only?
>
> The other is when I use the PCINT pins. Is there a way to tell which
> of the pins triggered the int or do I have to keep track of the pins
> state and compare it myself? Again, I didn't see a register that I
> can just look at with that information..
>
> I'd love to hear that I missed both of these things.
>
> Thanks.
>
> 
On the PCInts, yes, you have to track them back if you have more than  
one in any bank of interrupts.

ADC inputs are also general purpose I/O pins. Checkj the alternate  
function section of the data sheet for details. For minimum ADC noise,  
you don't want to change an output pin while the ADC  is running.

Jim Wagner
Oregon Research Electronics

[Non-text portions of this message have been removed]

Re: [AVR-Chat] A couple of 168p questions

2009-12-18 by John Samperi

At 02:58 PM 18/12/2009, you wrote:
>ADC inputs are also general purpose I/O pins.
...except for the M168 family... :-)
ADC6 and ADC7 are only available for the TQFP
or MLF packages and are inputs ONLY.

Regards

John Samperi

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

Re: [AVR-Chat] A couple of 168p questions

2009-12-18 by Philippe Habib

Thank you for the replies.  In both cases, that's what my reading of  
the datasheet led me think.  I was just hoping I was wrong and had  
overlooked something.
Show quoted textHide quoted text
On Dec 17, 2009, at 8:07 PM, John Samperi wrote:

> At 02:58 PM 18/12/2009, you wrote:
>> ADC inputs are also general purpose I/O pins.
> ...except for the M168 family... :-)
> ADC6 and ADC7 are only available for the TQFP
> or MLF packages and are inputs ONLY.
>
> Regards
>
> John Samperi
>
> ********************************************************
> Ampertronics Pty. Ltd.
> 11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
> Tel. (02) 9674-6495       Fax (02) 9674-8745
> Website  http://www.ampertronics.com.au
> *Electronic Design * Custom Products * Contract Assembly
> ********************************************************
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

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.