Motherboard Forums


Reply
Thread Tools Display Modes

ATmega169 Puzzle

 
 
Joel
Guest
Posts: n/a
 
      03-21-2008, 12:38 PM
Well a few days ago I was having trouble setting up a simple spi interface
Whenever I would try to lower the chip select lines of my devices the 16
would try it and then give up and reset itself.

I finally figured out that the problem was the pin I was trying to use.
was using PINB0 and PINB4 as chip select lines. B4 was the one giving m
trouble so I switched it to B5 and the problem was solved. Now I'
noticing that PINB6 does the same thing.

What is going on here???
 
Reply With Quote
 
 
 
 
Arlet Ottens
Guest
Posts: n/a
 
      03-21-2008, 01:57 PM
Joel wrote:
> Well a few days ago I was having trouble setting up a simple spi interface.
> Whenever I would try to lower the chip select lines of my devices the 169
> would try it and then give up and reset itself.
>
> I finally figured out that the problem was the pin I was trying to use. I
> was using PINB0 and PINB4 as chip select lines. B4 was the one giving me
> trouble so I switched it to B5 and the problem was solved. Now I'm
> noticing that PINB6 does the same thing.
>
> What is going on here???


Maybe you have interrupts enabled (by accident) on those pins, and no
valid handler ?
 
Reply With Quote
 
 
 
 
larwe
Guest
Posts: n/a
 
      03-21-2008, 02:13 PM

> *Whenever I would try to lower the chip select lines of my devices the 169
> would try it and then give up and reset itself.


Single-step; there is no reason why you shouldn't be able to use any
GPIO as your SPI _SS. Also check that your circuit is not wired in
some funky way whereby asserting _SS was shorting out the power
supply.
 
Reply With Quote
 
Joerg
Guest
Posts: n/a
 
      03-21-2008, 05:19 PM
larwe wrote:
>> Whenever I would try to lower the chip select lines of my devices the 169
>> would try it and then give up and reset itself.

>
> Single-step; there is no reason why you shouldn't be able to use any
> GPIO as your SPI _SS. Also check that your circuit is not wired in
> some funky way whereby asserting _SS was shorting out the power
> supply.



This may be the perfect time to leave the embedded/digital world for a
minute, hang a scope on it and take a look.

--
Regards, Joerg

http://www.analogconsultants.com/
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A puzzle to puzzle you sk Hardware 3 07-18-2004 02:50 AM
ATmega169 rev number Phil Embedded 4 05-25-2004 12:24 PM
IC7-G Original ... Puzzle @ndrew Abit 15 01-16-2004 01:32 AM
AVR Atmega169 help Phil Embedded 10 01-06-2004 04:56 PM
Sample code for ATmega169 Phil Embedded 3 06-27-2003 10:25 PM


All times are GMT. The time now is 11:54 PM.


Welcome!
Welcome to Motherboard Point
 

Advertisment