ATmega169 Puzzle

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 to
Joel
Loading thread data ...

Maybe you have interrupts enabled (by accident) on those pins, and no valid handler ?

Reply to
Arlet Ottens

69

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 to
larwe

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 to
Joerg

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.