Go Down

Topic: SPI troubles using the Arduino ATmega168 (Read 573 times) previous topic - next topic

MCU@work555

I need some help regarding the SPI interface with the Arduino.
I was trying to use the Arduino SPI EEPROM tutorial as a starting point.

I successfully uploaded the example code to a Arduino Diecimila (ATmega168), but nothing seems to be working on the Arduino SPI outputs.  Looking at the SPIClock (pin 13) with a oscope. I do not even see a clock signal.  Do I have to have a SPI Slave connected to the SCLK, MOSI, MISO, and SS(not) pins of the Arduino in order for the Arduino to even generate the SPIClock?  

Thanks ahead of time for any help provided.

eforman

i'm having the same problem with an atmega168-upgraded NG...

?

kg4wsv

No idea if one can expect to see a clock without a peripheral.

The original NG had a problem where the LED clamped the voltage on pin 13, preventing at least some SPI peripherals from working.  I think the factory solution was to stop putting an LED on.  Check out this old thread.

If your arduino NG has an LED on pin 13, that could be your problem.

-j

eforman

#3
Aug 12, 2009, 11:38 pm Last Edit: Aug 13, 2009, 01:18 am by eforman Reason: 1
jesus, i never would have figured that out.  thank you!  i did the mod described in that thread and it worked!

btw, is there a single list somewhere of all the mods one should make to NG or other prior boards to approximate later improvements?  e.g. the essentials might be adding pullup resistor from RX, changing 9V label to V-in, and the above resistor fix, and optionals might be adding a capacitor to avoid pressing reset when programming, improved bootloaders to avoid long waits for program to start, etc...

kg4wsv

I'm not aware of any list like that.  I'm pretty sure I did see instructions on adding an auto-reset cap, but I don't remember the details.

-j

eforman

#5
Aug 13, 2009, 06:03 am Last Edit: Aug 13, 2009, 06:04 am by eforman Reason: 1
yeah that's here - http://www.arduino.cc/en/Hacking/NGAutoReset - but it's wrong.  see my bug post here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1250123920/0

if i have time, i'll make the list myself and post it

Go Up