Yahoo Groups archive

AVR-Chat

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

Thread

AVR port pin verification help?

AVR port pin verification help?

2006-11-21 by luthjej

Hi all,
   I'm new to this group, predominantly because I've always used PIC's
for control applications - but I've decided that it's time to give the
AVR a whirl; the feature list on the mega series AVR's is just too
good to pass up! :)

For my first design, I'm using a mega8 MCU for a closed loop
automotive control circuit, nothing terribly fancy, but I'm just
wondering about port allocations in terms of digital I/O's - I know
that on the older MCU's (PIC12Fxx, HC11 etc) there were significant
restrictions on what ports can be used for what function (i.e. PWM was
restricted to only a few pins, some ports were input or output only etc).

So, just before I go and get the PCB printed up, I was just hoping
that the knowledgable could cast their eye on my pin allocations that
I'm not doing anything impossible (or anything that's a particularly
bad idea! :).

I've read the data sheet cover to cover, and haven't come across
anything yet, although I'm still a bit vague as to which pins can
actually support PWM and whether different pins on different ports can
be allocated to different functions at the same time (e.g ADC Port -
can I do digital logic in, logic level out AND ADC conversion - all at
the same time?

PB0   - Out Piezo Buzzer Out (Direct Drive 20mA Max)
PB1,2 - Out PWM Drive 1,2 (to FET driver IC)
PD0,1 - In/Out RS232 Out via MAX232
PD2-7 - LCD Display Out
PB6   - Out SPI Device Slave Select
PB7   - In Keyboard (switches via 1N914's across PD2-7)
PC0   - 0-5v analogue in (for ADC use)
PC1-3 - +12v logic in (direct connect via 1k resistor)
PC4   - 0-5v analogue in (for ADC use)
PC5   - FET Drive (on/off) via FET Driver IC

MISO, SCK, MOSI - SPI Bus & ICP Header (Also LED via 500R resistor to
indicate SPI activity)

AREF,AVCC,VCC - Regulated +5v (no decoupling - direct connect)



Thanks in advance for your help.


Jon

Re: [AVR-Chat] AVR port pin verification help?

2006-11-22 by David VanHorn

>
>
> I've read the data sheet cover to cover, and haven't come across
> anything yet, although I'm still a bit vague as to which pins can
> actually support PWM and whether different pins on different ports can
> be allocated to different functions at the same time (e.g ADC Port -
> can I do digital logic in, logic level out AND ADC conversion - all at
> the same time?


You can allocate the pins as you see fit, within a port.
A single port can have inputs, outputs, ADC, PWM.. It's all in how you set
it up.


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

Re: [AVR-Chat] AVR port pin verification help?

2006-11-22 by Jim Wagner

Hardware functions such as PWM are hard-coupled to specific
pins.  You can generate software PWM that uses any pin.

Likewise, UART, SPI, TWI, ISP, etc, are all hard-coupled to
specific pins. Again, you can implement any of  these
things in software on almost any pin. But, its REALLY hard
to use internal UART hardware with arbitrary Tx and Rx
pins.

Jim


On Tue, 21 Nov 2006 04:48:39 -0000
 "luthjej" <luthjej@yahoo.com.au> wrote:
> Hi all,
>    I'm new to this group, predominantly because I've
> always used PIC's
> for control applications - but I've decided that it's
> time to give the
> AVR a whirl; the feature list on the mega series AVR's is
> just too
> good to pass up! :)
> 
> For my first design, I'm using a mega8 MCU for a closed
> loop
> automotive control circuit, nothing terribly fancy, but
> I'm just
> wondering about port allocations in terms of digital
> I/O's - I know
> that on the older MCU's (PIC12Fxx, HC11 etc) there were
> significant
> restrictions on what ports can be used for what function
> (i.e. PWM was
> restricted to only a few pins, some ports were input or
> output only etc).
> 
> So, just before I go and get the PCB printed up, I was
> just hoping
> that the knowledgable could cast their eye on my pin
> allocations that
> I'm not doing anything impossible (or anything that's a
> particularly
> bad idea! :).
> 
> I've read the data sheet cover to cover, and haven't come
> across
> anything yet, although I'm still a bit vague as to which
> pins can
> actually support PWM and whether different pins on
> different ports can
> be allocated to different functions at the same time (e.g
> ADC Port -
> can I do digital logic in, logic level out AND ADC
> conversion - all at
> the same time?
> 
> PB0   - Out Piezo Buzzer Out (Direct Drive 20mA Max)
> PB1,2 - Out PWM Drive 1,2 (to FET driver IC)
> PD0,1 - In/Out RS232 Out via MAX232
> PD2-7 - LCD Display Out
> PB6   - Out SPI Device Slave Select
> PB7   - In Keyboard (switches via 1N914's across PD2-7)
> PC0   - 0-5v analogue in (for ADC use)
> PC1-3 - +12v logic in (direct connect via 1k resistor)
> PC4   - 0-5v analogue in (for ADC use)
> PC5   - FET Drive (on/off) via FET Driver IC
> 
> MISO, SCK, MOSI - SPI Bus & ICP Header (Also LED via 500R
> resistor to
> indicate SPI activity)
> 
> AREF,AVCC,VCC - Regulated +5v (no decoupling - direct
> connect)
> 
> 
> 
> Thanks in advance for your help.
> 
> 
> Jon
> 
> 
> 

---------------------------------------------------------------
The Think Different Store
http://www.thinkdifferentstore.com/
For All Your Mac Gear
---------------------------------------------------------------

Re: [AVR-Chat] AVR port pin verification help?

2006-11-22 by Jim Wagner

I should add that all of the special function pins (in most
chips) also have a general purpose function. That is, they
are multiple use. 

Jim


On Wed, 22 Nov 2006 00:15:14 -0500
 "Jim Wagner" <jim_d_wagner@applelinks.net> wrote:
> Hardware functions such as PWM are hard-coupled to
> specific
> pins.  You can generate software PWM that uses any pin.
> 
> Likewise, UART, SPI, TWI, ISP, etc, are all hard-coupled
> to
> specific pins. Again, you can implement any of  these
> things in software on almost any pin. But, its REALLY
> hard
> to use internal UART hardware with arbitrary Tx and Rx
> pins.
> 
> Jim
> 
> 
> On Tue, 21 Nov 2006 04:48:39 -0000
>  "luthjej" <luthjej@yahoo.com.au> wrote:
> > Hi all,
> >    I'm new to this group, predominantly because I've
> > always used PIC's
> > for control applications - but I've decided that it's
> > time to give the
> > AVR a whirl; the feature list on the mega series AVR's
> is
> > just too
> > good to pass up! :)
> > 
> > For my first design, I'm using a mega8 MCU for a closed
> > loop
> > automotive control circuit, nothing terribly fancy, but
> > I'm just
> > wondering about port allocations in terms of digital
> > I/O's - I know
> > that on the older MCU's (PIC12Fxx, HC11 etc) there were
> > significant
> > restrictions on what ports can be used for what
> function
> > (i.e. PWM was
> > restricted to only a few pins, some ports were input or
> > output only etc).
> > 
> > So, just before I go and get the PCB printed up, I was
> > just hoping
> > that the knowledgable could cast their eye on my pin
> > allocations that
> > I'm not doing anything impossible (or anything that's a
> > particularly
> > bad idea! :).
> > 
> > I've read the data sheet cover to cover, and haven't
> come
> > across
> > anything yet, although I'm still a bit vague as to
> which
> > pins can
> > actually support PWM and whether different pins on
> > different ports can
> > be allocated to different functions at the same time
> (e.g
> > ADC Port -
> > can I do digital logic in, logic level out AND ADC
> > conversion - all at
> > the same time?
> > 
> > PB0   - Out Piezo Buzzer Out (Direct Drive 20mA Max)
> > PB1,2 - Out PWM Drive 1,2 (to FET driver IC)
> > PD0,1 - In/Out RS232 Out via MAX232
> > PD2-7 - LCD Display Out
> > PB6   - Out SPI Device Slave Select
> > PB7   - In Keyboard (switches via 1N914's across PD2-7)
> > PC0   - 0-5v analogue in (for ADC use)
> > PC1-3 - +12v logic in (direct connect via 1k resistor)
> > PC4   - 0-5v analogue in (for ADC use)
> > PC5   - FET Drive (on/off) via FET Driver IC
> > 
> > MISO, SCK, MOSI - SPI Bus & ICP Header (Also LED via
> 500R
> > resistor to
> > indicate SPI activity)
> > 
> > AREF,AVCC,VCC - Regulated +5v (no decoupling - direct
> > connect)
> > 
> > 
> > 
> > Thanks in advance for your help.
> > 
> > 
> > Jon
> > 
> > 
> > 
> 
>
---------------------------------------------------------------
> The Think Different Store
> http://www.thinkdifferentstore.com/
> For All Your Mac Gear
>
---------------------------------------------------------------

---------------------------------------------------------------
The Think Different Store
http://www.thinkdifferentstore.com/
For All Your Mac Gear
---------------------------------------------------------------

Re: [AVR-Chat] AVR port pin verification help?

2006-11-22 by Ned Konz

luthjej wrote:
> Hi all,
>    I'm new to this group, predominantly because I've always used PIC's
> for control applications - but I've decided that it's time to give the
> AVR a whirl; the feature list on the mega series AVR's is just too
> good to pass up! :)
> 
> For my first design, I'm using a mega8 MCU for a closed loop
> automotive control circuit, nothing terribly fancy, but I'm just
> wondering about port allocations in terms of digital I/O's - I know
> that on the older MCU's (PIC12Fxx, HC11 etc) there were significant
> restrictions on what ports can be used for what function (i.e. PWM was
> restricted to only a few pins, some ports were input or output only etc).
> 
> So, just before I go and get the PCB printed up, I was just hoping
> that the knowledgable could cast their eye on my pin allocations that
> I'm not doing anything impossible (or anything that's a particularly
> bad idea! :).
> 
> I've read the data sheet cover to cover, and haven't come across
> anything yet, although I'm still a bit vague as to which pins can
> actually support PWM and whether different pins on different ports can
> be allocated to different functions at the same time (e.g ADC Port -
> can I do digital logic in, logic level out AND ADC conversion - all at
> the same time?
> 
Read the section starting at page 56 on I/O ports/Alternate Port 
Functions. For a given internal peripheral you typically have a limited 
set of choices; perhaps only one.

On the ADC ports, there is a discussion about combining ADC operation 
and digital operation (in the ADC section, I think). These (and maybe 
the analog comparator inputs?) are about the only case I can think of of 
being able to use a pin in multiple modes; typically with the digital 
functions the pins go through a multiplexer and you have to choose.

> PB0   - Out Piezo Buzzer Out (Direct Drive 20mA Max)

> PB1,2 - Out PWM Drive 1,2 (to FET driver IC)
If you want to use the hardware PWM outputs this is a sensible choice 
(PB1=OC1A, PB2=OC1B). But both will be running at the same frequency 
because they share the same timer counter.

> PD0,1 - In/Out RS232 Out via MAX232
Right.

> PD2-7 - LCD Display Out
OK, as long as you don't need the analog comparator or external 
interrupt pins.

> PB6   - Out SPI Device Slave Select
So the AVR is a SPI master here?

> PB7   - In Keyboard (switches via 1N914's across PD2-7)

> PC0   - 0-5v analogue in (for ADC use)
Assuming Vref is 5V, that's OK.

> PC1-3 - +12v logic in (direct connect via 1k resistor)
Nope. You'd be driving too much current through the input protection 
diodes. What's your VCC level? Why 1K? And if you mean "automotive 12V" 
you VERY MUCH NEED input protection circuitry! Remember that you can see 
voltages up to 60V here (if you have a loose battery cable, for 
instance) and even negative voltages! There is much information 
available on input signal conditioning for automotive voltages. Same 
thing goes for your 12V-to-5V power supply; you can't expect to safely 
connect just a 7805 and have everything survive!

> PC4   - 0-5v analogue in (for ADC use)
Assuming Vref is 5V, that's OK.

> PC5   - FET Drive (on/off) via FET Driver IC
OK

> MISO, SCK, MOSI - SPI Bus & ICP Header (Also LED via 500R resistor to
> indicate SPI activity)
Right:
PB4/MISO
PB3/MOSI
PB5/SCK
> 
> AREF,AVCC,VCC - Regulated +5v (no decoupling - direct connect)

If you want to use AVcc for AREF, you should do this internally and use 
AREF for a decoupling cap. And you might want to connect AVCC to VCC via 
an inductor/cap network.

> 
> Thanks in advance for your help.
> 
> 
> Jon
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
> 



-- 
Ned Konz
ned@bike-nomad.com
http://bike-nomad.com

RE: [AVR-Chat] AVR port pin verification help?

2006-11-22 by larry barello

One nice thing about the AVR is that all I/O pins have identical digital
characteristics (pull-up, down, hysterisis, thresholds).  So from a general
I/O point of view there is no issue.  Peripherals can be switched in/out and
are attached to specific pins.  The best way to learn about them is as Ned
noted, below: Read the manual.

Analog pins are slightly different in that they have their own power supply
(AVCC) which has to be the same as VCC so there is really no difference
except that the filtering on the supply is recommended to keep the readings
clean.  I never do anything special for my AVCC line, relying upon proper
board layout & bypassing and generally I get excellent results.

Although you can do digital I/O on an analog line while doing an analog
conversion, it basically messes up the results due to the digital logic
current draw affecting the signal levels.  Clever code could put the digital
logic into a high-impedance input state before conversions.  Newer chips
have a bit in a register to physically disconnect the digital section from
the analog so that too could be manipulated to get on-the-fly digital and
analog out of one pin.

| -----Original Message-----
| From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
| Of Ned Konz
| Sent: Wednesday, November 22, 2006 12:11 PM
| To: AVR-Chat@yahoogroups.com
| Subject: Re: [AVR-Chat] AVR port pin verification help?
| 
| luthjej wrote:
| > Hi all,
| >    I'm new to this group, predominantly because I've always used PIC's
| > for control applications - but I've decided that it's time to give the
| > AVR a whirl; the feature list on the mega series AVR's is just too
| > good to pass up! :)
| >
| > For my first design, I'm using a mega8 MCU for a closed loop
| > automotive control circuit, nothing terribly fancy, but I'm just
| > wondering about port allocations in terms of digital I/O's - I know
| > that on the older MCU's (PIC12Fxx, HC11 etc) there were significant
| > restrictions on what ports can be used for what function (i.e. PWM was
| > restricted to only a few pins, some ports were input or output only
| etc).
| >
| > So, just before I go and get the PCB printed up, I was just hoping
| > that the knowledgable could cast their eye on my pin allocations that
| > I'm not doing anything impossible (or anything that's a particularly
| > bad idea! :).
| >
| > I've read the data sheet cover to cover, and haven't come across
| > anything yet, although I'm still a bit vague as to which pins can
| > actually support PWM and whether different pins on different ports can
| > be allocated to different functions at the same time (e.g ADC Port -
| > can I do digital logic in, logic level out AND ADC conversion - all at
| > the same time?
| >
| Read the section starting at page 56 on I/O ports/Alternate Port
| Functions. For a given internal peripheral you typically have a limited
| set of choices; perhaps only one.
| 
| On the ADC ports, there is a discussion about combining ADC operation
| and digital operation (in the ADC section, I think). These (and maybe
| the analog comparator inputs?) are about the only case I can think of of
| being able to use a pin in multiple modes; typically with the digital
| functions the pins go through a multiplexer and you have to choose.
| 
| > PB0   - Out Piezo Buzzer Out (Direct Drive 20mA Max)
| 
| > PB1,2 - Out PWM Drive 1,2 (to FET driver IC)
| If you want to use the hardware PWM outputs this is a sensible choice
| (PB1=OC1A, PB2=OC1B). But both will be running at the same frequency
| because they share the same timer counter.
| 
| > PD0,1 - In/Out RS232 Out via MAX232
| Right.
| 
| > PD2-7 - LCD Display Out
| OK, as long as you don't need the analog comparator or external
| interrupt pins.
| 
| > PB6   - Out SPI Device Slave Select
| So the AVR is a SPI master here?
| 
| > PB7   - In Keyboard (switches via 1N914's across PD2-7)
| 
| > PC0   - 0-5v analogue in (for ADC use)
| Assuming Vref is 5V, that's OK.
| 
| > PC1-3 - +12v logic in (direct connect via 1k resistor)
| Nope. You'd be driving too much current through the input protection
| diodes. What's your VCC level? Why 1K? And if you mean "automotive 12V"
| you VERY MUCH NEED input protection circuitry! Remember that you can see
| voltages up to 60V here (if you have a loose battery cable, for
| instance) and even negative voltages! There is much information
| available on input signal conditioning for automotive voltages. Same
| thing goes for your 12V-to-5V power supply; you can't expect to safely
| connect just a 7805 and have everything survive!
| 
| > PC4   - 0-5v analogue in (for ADC use)
| Assuming Vref is 5V, that's OK.
| 
| > PC5   - FET Drive (on/off) via FET Driver IC
| OK
| 
| > MISO, SCK, MOSI - SPI Bus & ICP Header (Also LED via 500R resistor to
| > indicate SPI activity)
| Right:
| PB4/MISO
| PB3/MOSI
| PB5/SCK
| >
| > AREF,AVCC,VCC - Regulated +5v (no decoupling - direct connect)
| 
| If you want to use AVcc for AREF, you should do this internally and use
| AREF for a decoupling cap. And you might want to connect AVCC to VCC via
| an inductor/cap network.
| 
| >
| > Thanks in advance for your help.
| >
| >
| > Jon
| >
| >
| >
| >
| >
| >
| > Yahoo! Groups Links
| >
| >
| >
| >
| 
| 
| 
| --
| Ned Konz
| ned@bike-nomad.com
| http://bike-nomad.com
| 
| 
| 
| Yahoo! Groups Links
| 
| 
|

Re: [AVR-Chat] AVR port pin verification help?

2006-11-22 by Ralph Hilton

On Wed, 22 Nov 2006 12:11:00 -0800 you wrote:

An  LCD usually takes 4 pins for data, RS, RW and EN so PD2-7 is one pin short.

I also wouldn't be happy with using PC5 as an output right next to PC4 as an ADC
input.

I would not use ADC4 or ADC5 as an ADC input if others are available as they give less
resolution than other channels.

Doubling up the LCD output and keyboard input seems complicated.

I think an ATmega16 would give a smoother ride.

I'm not experienced with automotive applications but do know that there are horrible
spikes flying around. Direct connection to input pins seems dangerous. I'd be thinking
about opto-coupling with reverse voltage protection diodes and zeners just to be safe.

When you are looking at where to get PCBs made up - I just got a package a few days
ago from www.ezpcb.com - 50 each of 10 boards all panelized into one order - $490
including shipping, gold immersion, ROHS compliant.

>luthjej wrote:
>> Hi all,
>>    I'm new to this group, predominantly because I've always used PIC's
>> for control applications - but I've decided that it's time to give the
>> AVR a whirl; the feature list on the mega series AVR's is just too
>> good to pass up! :)
>> 
>> For my first design, I'm using a mega8 MCU for a closed loop
>> automotive control circuit, nothing terribly fancy, but I'm just
>> wondering about port allocations in terms of digital I/O's - I know
>> that on the older MCU's (PIC12Fxx, HC11 etc) there were significant
>> restrictions on what ports can be used for what function (i.e. PWM was
>> restricted to only a few pins, some ports were input or output only etc).
>> 
>> So, just before I go and get the PCB printed up, I was just hoping
>> that the knowledgable could cast their eye on my pin allocations that
>> I'm not doing anything impossible (or anything that's a particularly
>> bad idea! :).
>> 
>> I've read the data sheet cover to cover, and haven't come across
>> anything yet, although I'm still a bit vague as to which pins can
>> actually support PWM and whether different pins on different ports can
>> be allocated to different functions at the same time (e.g ADC Port -
>> can I do digital logic in, logic level out AND ADC conversion - all at
>> the same time?
>> 
>Read the section starting at page 56 on I/O ports/Alternate Port 
>Functions. For a given internal peripheral you typically have a limited 
>set of choices; perhaps only one.
>
>On the ADC ports, there is a discussion about combining ADC operation 
>and digital operation (in the ADC section, I think). These (and maybe 
>the analog comparator inputs?) are about the only case I can think of of 
>being able to use a pin in multiple modes; typically with the digital 
>functions the pins go through a multiplexer and you have to choose.
>
>> PB0   - Out Piezo Buzzer Out (Direct Drive 20mA Max)
>
>> PB1,2 - Out PWM Drive 1,2 (to FET driver IC)
>If you want to use the hardware PWM outputs this is a sensible choice 
>(PB1=OC1A, PB2=OC1B). But both will be running at the same frequency 
>because they share the same timer counter.
>
>> PD0,1 - In/Out RS232 Out via MAX232
>Right.
>
>> PD2-7 - LCD Display Out
>OK, as long as you don't need the analog comparator or external 
>interrupt pins.
>
>> PB6   - Out SPI Device Slave Select
>So the AVR is a SPI master here?
>
>> PB7   - In Keyboard (switches via 1N914's across PD2-7)
>
>> PC0   - 0-5v analogue in (for ADC use)
>Assuming Vref is 5V, that's OK.
>
>> PC1-3 - +12v logic in (direct connect via 1k resistor)
>Nope. You'd be driving too much current through the input protection 
>diodes. What's your VCC level? Why 1K? And if you mean "automotive 12V" 
>you VERY MUCH NEED input protection circuitry! Remember that you can see 
>voltages up to 60V here (if you have a loose battery cable, for 
>instance) and even negative voltages! There is much information 
>available on input signal conditioning for automotive voltages. Same 
>thing goes for your 12V-to-5V power supply; you can't expect to safely 
>connect just a 7805 and have everything survive!
>
>> PC4   - 0-5v analogue in (for ADC use)
>Assuming Vref is 5V, that's OK.
>
>> PC5   - FET Drive (on/off) via FET Driver IC
>OK
>
>> MISO, SCK, MOSI - SPI Bus & ICP Header (Also LED via 500R resistor to
>> indicate SPI activity)
>Right:
>PB4/MISO
>PB3/MOSI
>PB5/SCK
>> 
>> AREF,AVCC,VCC - Regulated +5v (no decoupling - direct connect)
>
>If you want to use AVcc for AREF, you should do this internally and use 
>AREF for a decoupling cap. And you might want to connect AVCC to VCC via 
>an inductor/cap network.
>
>> 
>> Thanks in advance for your help.
>> 
>> 
>> Jon
>> 
>> 
>> 
>> 
>> 
>>  
>> Yahoo! Groups Links
>> 
>> 
>> 
>> 
>
>
>
>-- 
>Ned Konz
>ned@bike-nomad.com
>http://bike-nomad.com
>
>
> 
>Yahoo! Groups Links
>
>
>

--
Ralph Hilton
http://www.ralphhilton.org
C-Meter: http://www.cmeter.org
FZAOINT http://www.fzaoint.net

Re: AVR port pin verification help?

2006-11-24 by luthjej

Thank you all kindly for your suggestions, I've made a few changes to
the overall circuit layout:

1W 5.1v Zeners added to 12v digital inputs - I had considered doing
this earlier, but made the assumption - without calculation - that a
1K resistor "should" provide all the input protection I need, but
better safe than sorry!

max v=60
I = 60/5000 = 12mA
W = 60x0.012 = 720 mW dissapated by the Zener in a worst case scenario

I think the original calculation for the 1k was for a 5.0v VREF, when
you factor a spike of 60v into the equation that is clearly not
adequate - thanks for the pickup!

This circuit is particularly for a diesel application, and although
there would be some feedback floating around from the likes of starter
solenoids and inductive fans - at least there is no ignition feedback
to worry about!

Supply rails are already well protected via MOV, Polyfuse and
Zener/Diode arrays (I wouldn't trust a 7805 to do this job by itself
any farther than I could throw it! :)

ADC4 --> Moved to ADC2 for better resolution

AREF has been modified to use decoupling cap & internally source AVCC
for AREF

Now I just have to wrap my head around good PCB design rules :)

AVR UART ' UBRRH'?

2006-11-24 by praveen kumar

hello frens,
   
   
  In Atmegax Datasheet, there mentioned about selection b/w  UBRRH  n UCSRC , which share common mem address.
   
  If i try to set baud rate first by selecting UBRRH with URSEL bit 0,
  n after that set frame format in UCSRC with URSEL bit 1, it is not working.
   
  but, if set frame format first in UCSRC without bothering about URSEL,
  n then baud rate settings in UBRRH, its working fine!
   
  how it is possible? 
   
  praveen


 				
---------------------------------
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW

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

Re: AVR port pin verification help?

2006-11-24 by Celso Monteiro

Dear Jon,

Regarding protection levels at the inputs, I noticed you provided 
protection in typical load dump levels, 60V for 12V systems. 
Probably you're working in aftermarket application because OEMs 
would not accept these levels.

Regarding input protection, maybe you could use the AVR internal 
clamping diodes, keeping current levels controlled by appropriate 
resistors. Remember that you need to have some sink for the currents 
flowing thru the diodes so a shunt regulator could do the job, the 
7805 regulator would allow voltage increase to - maybe - potential 
damage levels.

Good luck,

Celso





--- In AVR-Chat@yahoogroups.com, "luthjej" <luthjej@...> wrote:
>
> Thank you all kindly for your suggestions, I've made a few changes 
to
> the overall circuit layout:
> 
> 1W 5.1v Zeners added to 12v digital inputs - I had considered doing
> this earlier, but made the assumption - without calculation - that 
a
> 1K resistor "should" provide all the input protection I need, but
> better safe than sorry!
> 
> max v=60
> I = 60/5000 = 12mA
> W = 60x0.012 = 720 mW dissapated by the Zener in a worst case 
scenario
> 
> I think the original calculation for the 1k was for a 5.0v VREF, 
when
> you factor a spike of 60v into the equation that is clearly not
> adequate - thanks for the pickup!
> 
> This circuit is particularly for a diesel application, and although
> there would be some feedback floating around from the likes of 
starter
> solenoids and inductive fans - at least there is no ignition 
feedback
> to worry about!
> 
> Supply rails are already well protected via MOV, Polyfuse and
> Zener/Diode arrays (I wouldn't trust a 7805 to do this job by 
itself
> any farther than I could throw it! :)
> 
> ADC4 --> Moved to ADC2 for better resolution
> 
> AREF has been modified to use decoupling cap & internally source 
AVCC
Show quoted textHide quoted text
> for AREF
> 
> Now I just have to wrap my head around good PCB design rules :)
>

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.