Professional Documents
Culture Documents
http://www.jotschi.de/?p=784
Jotschi's Blog
NeXuS
1. 2. 3. 4.
1 of 4
01/07/2013 08:16 PM
http://www.jotschi.de/?p=784
The two resistors are very important because they are used to pullup the SCK and MOSI pin. The eeprom works with 5V or 3.3V. I used 3.3V because the GPIO pins only tolerate 3.3V input. Higher voltage might damage your board.
6. Compile the source file. You can use this make file:
1. 2. 3. 4. 5.
= = = = =
2 of 4
01/07/2013 08:16 PM
http://www.jotschi.de/?p=784
6. 7. LDFLAGS = -L/usr/local/lib 8. LIBS = -lwiringPi 9. 10. # Should not alter anything below this line 11. ########################################################################### #### 12. 13. SRC 14. 15. OBJ 16. 17. all: 18. 19. rpi_spi_eepromtest: 20. 21. 22. 23. .c.o: 24. 25. 26. 27. clean: 28. 29. 30. tags: 31. 32. 33. 34. depend: makedepend -Y $(SRC) 35. 36. 37. # DO NOT DELETE Sources: [gist id=3659646 file=rpi_spi_eepromtest.c] rm -f $(OBJ) *~ core tags rpi_spi_eepromtest $(SRC) @echo [ctags] @ctags $(SRC) rpi_spi_eepromtest.o @echo [link] $(CC) -o $@ rpi_spi_eepromtest.o $(LDFLAGS) $(LIBS) = = rpi_spi_eepromtest.c rpi_spi_eepromtest.o rpi_spi_eepromtest
3 of 4
01/07/2013 08:16 PM
http://www.jotschi.de/?p=784
This entry was posted in Technik by Jotschi. Bookmark the permalink [http://www.jotschi.de/?p=784] .
0
Add a comment
4 of 4
01/07/2013 08:16 PM