Yahoo Groups archive

AVR-Chat

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

Thread

multiprocessing with AVR

multiprocessing with AVR

2005-01-01 by Ridho Alpha

hello....
i intend to use ATMEGA16 as master and 2 pieces of ATMEGA8 as slaves trough SPI....i want to ask:
1. since the SPI port of ATMEGA8 has specific functions too as a OC1B (!SS/OC1B) in PB2.. can i still use SPI with PWM trough OC1A in PB1 and the OC1B is not connected to output..can i do that????
2. can i just use 1 RESET and 1 XTAL schematics connected to that 3 AVRs???
please give me a clue...thank you
ridho alpha

Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now

Re: [AVR-Chat] multiprocessing with AVR

2005-01-01 by Leon Heller

Ridho Alpha wrote:

> hello....
>  
> i intend to use ATMEGA16 as master and 2 pieces of ATMEGA8 as slaves 
> trough SPI....i want to ask:
> 1. since the SPI port of ATMEGA8 has specific functions too as a OC1B 
> (!SS/OC1B) in PB2.. can i still use SPI with PWM trough  OC1A in PB1 
> and the OC1B is not connected to output..can i do that????
> 2. can i just use 1 RESET and 1 XTAL schematics connected to that 3 
> AVRs???

It would be a good idea to buffer the XTAL2 output from the AVR with the 
crystal, or use an external oscillator module driving all three AVRs. 
I'd use  a separate RC for each reset.

Leon


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.298 / Virus Database: 265.6.7 - Release Date: 30/12/2004

Re: [AVR-Chat] multiprocessing with AVR

2005-01-04 by Paul Maddox

Ridho,

No idea about your first question.

> 2. can i just use 1 RESET and 1 XTAL schematics connected to that 3
AVRs???

I use one Crystal clock (not XTAL) for 5 AVRs on my latest project, but I do
use sperate reset lines (res+cap) so I can use the ISP on each without
dropping all5 into ISP mode.

Paul

Re: [AVR-Chat] multiprocessing with AVR (2)

2005-01-04 by Ridho Alpha

so i can connect pin XTAL1 and XTAL2 to other AVR??? is it true??? is it what you made??


Paul Maddox wrote:
Ridho,

No idea about your first question.

> 2. can i just use 1 RESET and 1 XTAL schematics connected to that 3
AVRs???

I use one Crystal clock (not XTAL) for 5 AVRs on my latest project, but I do
use sperate reset lines (res+cap) so I can use the ISP on each without
dropping all5 into ISP mode.

Paul

Do you Yahoo!?
The all-new My Yahoo! – Get yours free!

Re: [AVR-Chat] multiprocessing with AVR (2)

2005-01-04 by Leon Heller

----- Original Message ----- 
Show quoted textHide quoted text
From: Lasse Madsen
To: AVR-Chat@yahoogroups.com
Sent: Tuesday, January 04, 2005 1:14 PM
Subject: RE: [AVR-Chat] multiprocessing with AVR (2)


No . look at the oscillator schematics . it's a standard pierce .

XTAL1 = Input
XTAL2 = Output

MASTER CHIP:  Crystal between XTAL1 and XTAL2 with 2 decoupling caps.

SLAVE CHIP #1: Connect XTAL1 to MASTER XTAL2

SLAVE CHIP #2: Connect XTAL1 to SLAVE CHIP #1 XTAL2

SLAVE CHIP #3: Connect XTAL1 to SLAVE CHIP #2 XTAL2


I've done the same sort of thing with multiple '2313s, but I used a buffer 
for each slave chip. Probably not necessary, though.

Leon 



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.298 / Virus Database: 265.6.7 - Release Date: 30/12/2004

Re: [AVR-Chat] multiprocessing with AVR (2)

2005-01-04 by Paul Maddox

Ridho,

> so i can connect pin XTAL1 and XTAL2 to other AVR??? is it true??? is it
what you made??

nope,
The Crystal oscillator module I use (note this is NOT a crystal)  can drive
upto ten things direct,
So I just take the crystal output and feed it into XTAL1 of each AVR.

Paul

RE: [AVR-Chat] multiprocessing with AVR (2)

2005-01-04 by Lasse Madsen

No . look at the oscillator schematics . it's a standard pierce .
 
XTAL1 = Input
XTAL2 = Output 
 
MASTER CHIP:  Crystal between XTAL1 and XTAL2 with 2 decoupling caps.
 
SLAVE CHIP #1: Connect XTAL1 to MASTER XTAL2
 
SLAVE CHIP #2: Connect XTAL1 to SLAVE CHIP #1 XTAL2
 
SLAVE CHIP #3: Connect XTAL1 to SLAVE CHIP #2 XTAL2
 
Etc.
 
 
Regards
Lasse
 
 
  _____  
Show quoted textHide quoted text
From: Ridho Alpha [mailto:pendekar_ridho@yahoo.com] 
Sent: 4. januar 2005 11:11
To: AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] multiprocessing with AVR (2)
 
so i can connect pin XTAL1 and XTAL2 to other AVR??? is it true??? is it
what you made??
 


Paul Maddox <P.Maddox@signal.qinetiq.com> wrote: 
Ridho,

No idea about your first question.

> 2. can i just use 1 RESET and 1 XTAL schematics connected to that 3
AVRs???

I use one Crystal clock (not XTAL) for 5 AVRs on my latest project, but I do
use sperate reset lines (res+cap) so I can use the ISP on each without
dropping all5 into ISP mode.

Paul
  _____  

Do you Yahoo!?
The all-new My Yahoo! <http://my.yahoo.com>  - Get yours free! 
  _____  

Yahoo! Groups Links
*	To visit your group on the web, go to:
http://groups.yahoo.com/group/AVR-Chat/
  
*	To unsubscribe from this group, send an email to:
AVR-Chat-unsubscribe@yahoogroups.com
<mailto:AVR-Chat-unsubscribe@yahoogroups.com?subject=Unsubscribe> 
  
*	Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .

RE: [AVR-Chat] multiprocessing with AVR (2)

2005-01-04 by Dave VanHorn

At 08:14 AM 1/4/2005, you wrote:

>No … look at the oscillator schematics … it’s a standard pierce …
>
>XTAL1 = Input
>XTAL2 = Output
>
>MASTER CHIP:  Crystal between XTAL1 and XTAL2 with 2 decoupling caps.
>
>SLAVE CHIP #1: Connect XTAL1 to MASTER XTAL2
>
>SLAVE CHIP #2: Connect XTAL1 to SLAVE CHIP #1 XTAL2
>
>SLAVE CHIP #3: Connect XTAL1 to SLAVE CHIP #2 XTAL2
>

You're well advised to add a series resistor, up close to the package, on 
XTAL2, to reduce EMI,
That. and a solid ground return path.

RE: [AVR-Chat] multiprocessing with AVR (2)

2005-01-04 by Lasse Madsen

While we are at it (EMI) one should probertly also connect a 10nF capacitor
to the last unused XTAL2 output to balance the pierce.
 
On the MASTER a 1Mohm between XTAL1/2 and a series resistor from XTAL2 to
crystal of a hundred ohms is a good idea. take output from XTAL2 pin
directly through a second resistor (100R) to the XTAL1 pin of a slave. 
 
Regards
Lasse
 
  _____  
Show quoted textHide quoted text
From: Dave VanHorn [mailto:dvanhorn@dvanhorn.org] 
Sent: 4. januar 2005 14:43
To: AVR-Chat@yahoogroups.com
Subject: RE: [AVR-Chat] multiprocessing with AVR (2)
 
At 08:14 AM 1/4/2005, you wrote:

>No . look at the oscillator schematics . it's a standard pierce .
>
>XTAL1 = Input
>XTAL2 = Output
>
>MASTER CHIP:  Crystal between XTAL1 and XTAL2 with 2 decoupling caps.
>
>SLAVE CHIP #1: Connect XTAL1 to MASTER XTAL2
>
>SLAVE CHIP #2: Connect XTAL1 to SLAVE CHIP #1 XTAL2
>
>SLAVE CHIP #3: Connect XTAL1 to SLAVE CHIP #2 XTAL2
>

You're well advised to add a series resistor, up close to the package, on 
XTAL2, to reduce EMI,
That. and a solid ground return path.



  _____  

Yahoo! Groups Links
*	To visit your group on the web, go to:
http://groups.yahoo.com/group/AVR-Chat/
  
*	To unsubscribe from this group, send an email to:
AVR-Chat-unsubscribe@yahoogroups.com
<mailto:AVR-Chat-unsubscribe@yahoogroups.com?subject=Unsubscribe> 
  
*	Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .

RE: [AVR-Chat] multiprocessing with AVR (2)

2005-01-04 by Dave VanHorn

At 08:46 AM 1/4/2005, Lasse Madsen wrote:

>While we are at it (EMI) one should probertly also connect a 10nF 
>capacitor to the last unused XTAL2 output to balance the pierce.

That would be bad. There's nothing to balance in this case, you're just 
using the xtal sections as amplifiers.  I would fuse the slaves for 
external osc though, it will take less power. (not sure if the output 
remains active then though. I've never tried that config)


>On the MASTER a 1Mohm between XTAL1/2 and a series resistor from XTAL2 to 
>crystal of a hundred ohms is a good idea…

Why?

>take output from XTAL2 pin directly through a second resistor (100R) to 
>the XTAL1 pin of a slave…
>

This part I agree with, you'll find that your trace impedance is roughly 
100 ohms-ish.

Re: [AVR-Chat] multiprocessing with AVR (3)

2005-01-04 by Ridho Alpha

wow..thank you for your replies....thank you....

now if i connect crystal and 2 capasitors for each AVR..is it the best idea??so,i make 1 external crystal oscillator for each AVR...what do you think???i want to do multiprocessing with SPI...

thank you

Do you Yahoo!?
Send a seasonal email greeting and help others. Do good.

Re: [AVR-Chat] multiprocessing with AVR (3)

2005-01-04 by Dave VanHorn

At 09:56 AM 1/4/2005, Ridho Alpha wrote:

>wow..thank you for your replies....thank you....
>
>now if i connect crystal and 2 capasitors for each AVR..is it the best idea??

It's probably the easiest to get working right, and less EMI problems if 
done right.


>so,i make 1 external crystal oscillator for each AVR...what do you 
>think???i want to do multiprocessing with SPI...

Multiprocessing isn't really a crystal issue at all.
The systems don't even need to talk at the same speed, SPI is clocked 
serial, so the unit sending the data determines how fast you go.  The only 
restriction would be that device A can't talk faster than device B can receive.

Tip:  Set the slower device to be the "master".

Re: [AVR-Chat] multiprocessing with AVR (4)

2005-01-04 by Ridho Alpha

so....you suggest that....for SPI and for clock for "master" AVR should be slower than the slave???is it what you mean???


Dave VanHorn wrote:
At 09:56 AM 1/4/2005, Ridho Alpha wrote:

>wow..thank you for your replies....thank you....
>
>now if i connect crystal and 2 capasitors for each AVR..is it the best idea??

It's probably the easiest to get working right, and less EMI problems if
done right.


>so,i make 1 external crystal oscillator for each AVR...what do you
>think???i want to do multiprocessing with SPI...

Multiprocessing isn't really a crystal issue at all.
The systems don't even need to talk at the same speed, SPI is clocked
serial, so the unit sending the data determines how fast you go. The only
restriction would be that device A can't talk faster than device B can receive.

Tip: Set the slower device to be the "master".

Do you Yahoo!?
Send holiday email and support a worthy cause. Do good.

RE: [AVR-Chat] multiprocessing with AVR (2)

2005-01-04 by Lasse Madsen

Hi Dave,
 
>That would be bad. There's nothing to balance in this case, you're just 
>using the xtal sections as amplifiers. 
 
I disagree, depending on the internal design of the oscillator not using a
capacitor could cause it to stop oscillate (I have tried it without just now
and it works but I would still recommend it)
 
>>On the MASTER a 1Mohm between XTAL1/2 and a series resistor from XTAL2 to
crystal of a hundred ohms is a good idea.


>Why?


The 1Mohm parallel resistor gives a nicer oscillation (check your scope) and
the 100R resistor reduces harmonics.
 
If you have a spectrum analyzer available try first without the 1Mohm then
try adding it would maybe see that this also reduces harmonics from the
crystal a little but the 100R resistor does the job much better. I got this
information attending an EMC coarse because one of our PCB's failed to
comply with EMC standards adding the 1M and 100R resistor did the job.
 
Best regards
Lasse M.
 
 
 




 
  _____  
Show quoted textHide quoted text
From: Dave VanHorn [mailto:dvanhorn@dvanhorn.org] 
Sent: 4. januar 2005 15:21
To: AVR-Chat@yahoogroups.com; AVR-Chat@yahoogroups.com
Subject: RE: [AVR-Chat] multiprocessing with AVR (2)
 
At 08:46 AM 1/4/2005, Lasse Madsen wrote:

>While we are at it (EMI) one should probertly also connect a 10nF 
>capacitor to the last unused XTAL2 output to balance the pierce.

That would be bad. There's nothing to balance in this case, you're just 
using the xtal sections as amplifiers.  I would fuse the slaves for 
external osc though, it will take less power. (not sure if the output 
remains active then though. I've never tried that config)


>On the MASTER a 1Mohm between XTAL1/2 and a series resistor from XTAL2 to 
>crystal of a hundred ohms is a good idea.

Why?

>take output from XTAL2 pin directly through a second resistor (100R) to 
>the XTAL1 pin of a slave.
>

This part I agree with, you'll find that your trace impedance is roughly 
100 ohms-ish.



  _____  

Yahoo! Groups Links
*	To visit your group on the web, go to:
http://groups.yahoo.com/group/AVR-Chat/
  
*	To unsubscribe from this group, send an email to:
AVR-Chat-unsubscribe@yahoogroups.com
<mailto:AVR-Chat-unsubscribe@yahoogroups.com?subject=Unsubscribe> 
  
*	Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .

RE: [AVR-Chat] multiprocessing with AVR (2)

2005-01-04 by Dave VanHorn

At 12:01 PM 1/4/2005, Lasse Madsen wrote:

>Hi Dave,
>
> >That would be bad. There's nothing to balance in this case, you're just
> >using the xtal sections as amplifiers.
>
>I disagree, depending on the internal design of the oscillator not using a 
>capacitor could cause it to stop oscillate (I have tried it without just 
>now and it works but I would still recommend it)

It's just an amplifier.  If you feel you must load it, then load it with a 
resistor, something that won't make it draw huge current spikes on the 
transitions.

>
> >>On the MASTER a 1Mohm between XTAL1/2 and a series resistor from XTAL2 
> to crystal of a hundred ohms is a good idea…
>
> >Why?
>
>The 1Mohm parallel resistor gives a nicer oscillation (check your scope) 
>and the 100R resistor reduces harmonics.

Hmm. I would be very reluctant to alter the osc circuit without knowing 
exactly what I was affecting in the chip.



>
>If you have a spectrum analyzer available try first without the 1Mohm then 
>try adding it would maybe see that this also reduces harmonics from the 
>crystal a little but the 100R resistor does the job much better. I got 
>this information attending an EMC coarse because one of our PCB’s failed 
>to comply with EMC standards adding the 1M and 100R resistor did the job.

Was this an AVR?

RE: [AVR-Chat] multiprocessing with AVR (2)

2005-01-04 by Lasse Madsen

Hi Dave,
 
All crystal oscillators are "amplifiers" to some extent I don't think you
would see any huge current draws from adding the capacitor although I
understand your point.
 
And yes the chip was an ATm323 running at 8MHz as far as I remember.
 
Best regards
Lasse
 
  _____  
Show quoted textHide quoted text
From: Dave VanHorn [mailto:dvanhorn@dvanhorn.org] 
Sent: 4. januar 2005 18:08
To: AVR-Chat@yahoogroups.com; AVR-Chat@yahoogroups.com
Subject: RE: [AVR-Chat] multiprocessing with AVR (2)
 
At 12:01 PM 1/4/2005, Lasse Madsen wrote:

>Hi Dave,
>
> >That would be bad. There's nothing to balance in this case, you're just
> >using the xtal sections as amplifiers.
>
>I disagree, depending on the internal design of the oscillator not using a 
>capacitor could cause it to stop oscillate (I have tried it without just 
>now and it works but I would still recommend it)

It's just an amplifier.  If you feel you must load it, then load it with a 
resistor, something that won't make it draw huge current spikes on the 
transitions.

>
> >>On the MASTER a 1Mohm between XTAL1/2 and a series resistor from XTAL2 
> to crystal of a hundred ohms is a good idea.
>
> >Why?
>
>The 1Mohm parallel resistor gives a nicer oscillation (check your scope) 
>and the 100R resistor reduces harmonics.

Hmm. I would be very reluctant to alter the osc circuit without knowing 
exactly what I was affecting in the chip.



>
>If you have a spectrum analyzer available try first without the 1Mohm then 
>try adding it would maybe see that this also reduces harmonics from the 
>crystal a little but the 100R resistor does the job much better. I got 
>this information attending an EMC coarse because one of our PCB's failed 
>to comply with EMC standards adding the 1M and 100R resistor did the job.

Was this an AVR? 



  _____  

Yahoo! Groups Links
*	To visit your group on the web, go to:
http://groups.yahoo.com/group/AVR-Chat/
  
*	To unsubscribe from this group, send an email to:
AVR-Chat-unsubscribe@yahoogroups.com
<mailto:AVR-Chat-unsubscribe@yahoogroups.com?subject=Unsubscribe> 
  
*	Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .

Re: [AVR-Chat] multiprocessing with AVR (4)

2005-01-04 by Dave VanHorn

At 10:41 AM 1/4/2005, Ridho Alpha wrote:

>so....you suggest that....for SPI and for clock for "master" AVR should be 
>slower than the slave???is it what you mean???
>

I'm not making reccomendations in that direction.
I'm saying that IF they are different speeds, then you'll have to design to 
the slow one.

If the A system is 16 MHz, then it can talk at 4 Mbits on SPI.
If the B system is 8 MHz, then it can only get to 2 Mbits.
So, you'll have to set the A system to 2mbits or less on the SPI port.

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.