|Date Added:||15 November 2011|
|File Size:||52.4 Mb|
|Operating Systems:||Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X|
|Price:||Free* [*Free Regsitration Required]|
Many MCUs of this class will have several SPI units, and the datasheet will specify which pins can be used by which unit.
How do I know what pins to use in the initialization code? Sign up using Email and Password. Unfortunately the datasheet also does a poor job of explaining how peripherals are meant to be used, so some reading between the lines will be required. I am running Atmel Studio 6. There are examples in the ASF documentation linked in previous comments that should help you out, and if you examine them closely you should see that the example applications do all of the things I’ve outlined above.
Though, experienced developers say that beginners should go with ASF which is actually trueit doesn’t mean that you can achieve with less effort the same thing. Post as a guest Name. Can anyone help me to understand how you initialize the SPI?
Email Required, but never shown.
You have two options here. It’s so difficult to work out what is being driven, what you have to provide to configure the drivers, and what they actually do that it’s actually quicker just to read the datasheet and write your own drivers particularly when you don’t need all the configuration complexity and can just hardwire in the settings you need.
Microchip® Advanced Software Framework
That may help a lot. Sign up or log in Sign up using Google. You just need different type of effort. Thank you for the sli I don’t intend to bash Atmel, but I have to agree, their documentation has so many lines of invisible ink Finally, you’ll need to configure the SPI peripheral itself.
John August 2 Sign up using Facebook. You can manually set the configuration registers directly for the SPI peripheral, or you can use the “Atmel Software Framework” which abstracts a lot of the details into a higher-level API. It’s tough for an absolute beginner.
ASF Source Code Documentation
Anyway, to answer the question: However, the ASF documentation does an exceptionally poor job of actually explaining what’s going on and why, so you’ll need to carefully study the MCU datasheet sections on clock, power management, GPIO, and SPI to really figure out what you’re doing.
Most pins will have many peripherals atme can be selected, so you’ll need to set the pin multiplexer to select axf proper SPI unit. I can successfully program the chip in Atmel Studio, by using a batch file which loads bosssa. Above all, remember that the datasheet is your friend! Check out this post for details: