-
-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
SPI clock issue on ATmega328 #9
Comments
It worked for me using a 328p (Arduino Uno). Also, the hardware SPI unit is used through the standard Arduino interface, so I would expect that to work. Got any images of the scope view? What board are you using exactly? |
Weird. What happens if you disconnect the SCK line? Is anything else connected to the board? What happens if you use a simple SPI example sketch? |
Funny, I just tried without anything connected to the Arduino and the example sketch, and I have the same result. I moved to an Arduino Nano, I only have one clock cycle. Thank you, and I let you know what happened |
I'm using some git version of Arduino, probably a bit newer than 1.6.8. Sounds like something weird is going on - I would doublecheck your test setup. Or perhaps you've miswired something previously that caused the SCK pin on all of these Arduinos to become damaged? |
I think my SPI port is OK at least on the Nano as I use it as an ISP programmer, also one of the Arduino Uno I tried was brand new and official... On the test setup I used both examples "barometricPressureSensor" and "digitalPotControl" but I will try to write a simple sketch to be able to test all SPI modes before reporting the issue |
Finally it works... but that was a weird issue ! First, the laptop I used is dying and the 5V was not stable => reset during RFM initialization. By the way, thanks for the library ! |
@Oliv4945, interesting, thanks for reporting back. Regarding the clock speed, 10E6 is just what the chip supports, IIRC the Atmega only goes up to F_CPU / 2. Apparently your hardware setup prevents you from reaching even that, so adjusting it seems reasonable. |
Oh, true, I forgot the prescaler :/ |
Hi,
Hi tried your library with an RFM95 chip and the "raw" exemple, and it works with an ATMega1280 but not 328... I hooked up an oscilloscope and spotted that there is only 3 clock cycles !
I saw on TheThinkNetwork that you tried it on ATMega328, did you already run into this issue ?
Thanks !
The text was updated successfully, but these errors were encountered: