hi dears.
i want to use spi in my project .
anyone have spi library for atmel studio and its use help?
anyone have a simple project codes about using spi ?i wanna understand its work.
thank you
hi dears.
i want to use spi in my project .
anyone have spi library for atmel studio and its use help?
anyone have a simple project codes about using spi ?i wanna understand its work.
thank you
Well, you need to be more specific about which processor you're using. Most of us consider the hardware in the chip to be the "library" and the datasheet for the chip, the instructions on using the library.
I USE ATMEGA32 TO understand spi how works.
maybe becouse i am not expert in spi and i start today to khnow about spi ,i asked this question.
so i need some EXAMPLE for spi in atmel studio to khnow its operation.
can you introduce me some source or give me some simple example about spi in atmel?/
From the datasheet:
Note: SPI sends and receives at the same time, so one function does both!
Jim
Just noticed this DS listing does not RX data, here is an SPI function I have used:
/* general SPI transfer function */ uint8_t SPI_Transfer(uint8_t data) { SPDR = data; while (!(SPSR & (1<<SPIF))); return SPDR; }
Nothing to do with studio so I'll move it to general programming.
Jim
I think I will write that book about tying up shoelaces, I'm sure it will be a best seller somewhere.
js -
Be sure that you write your book at a 5-6 year old level! Then, you can write about SPI in the second half of the book.
Yes, I know that my own posting, asking about an SPI library ( https://www.avrfreaks.net/forum/... ) has close to 2500 hits. I plead No Contest; that was 2014 and I was still pretty wet behind the ears. Still not totally dry!
Jim
Does SPI really justify a "library" anyway? It's usually about 3 lines of configuration and one send/receive function.
The only "tricky bit" in the whole of SPI is understanding and setting CPOL and CPHA but even that you can find b experiment as there only are 4 combinations to choose from.
js -
Be sure that you write your book at a 5-6 year old level! Then, you can write about SPI in the second half of the book.
Yes, I know that my own posting, asking about an SPI library ( https://www.avrfreaks.net/forum/... ) has close to 2500 hits. I plead No Contest; that was 2014 and I was still pretty wet behind the ears. Still not totally dry!
Jim
well that explains why he started shouting in that thread too that we had to give him the library.....
I think I will write that book about tying up shoelaces, I'm sure it will be a best seller somewhere.
My wife just bought a book like that for our grandsons, LMAO watching her try out the 7 ways they display in the book.
She's very analytical, spacial concepts are difficult for her to grasp.
So if you can write one for those of us who are left brained that would be a winner!
js wrote: I think I will write that book about tying up shoelaces, I'm sure it will be a best seller somewhere.
Here's a site for some good material.
https://www.fieggen.com/shoelace/tying.htm
Darn, so the book idea is not good? My book title was Shoelaces, Perfect, Instantly.
However I must sconfess that about 40 years ago I was confusing the SPI with the SCI (Motorola speak) and could not figure out why I was getting garbage out of the RS232 port.
js wrote: I think I will write that book about tying up shoelaces, I'm sure it will be a best seller somewhere.
Here's a site for some good material.
https://www.fieggen.com/shoelace/tying.htm
I use his "Ian Knot." Was 8 when I learned to tie, and only because somebody showed me this.
I think I will write that book about tying up shoelaces
Please do, since I am planning on releasing the blockbuster sequel: How to untie your shoelaces without getting tired.
She's very analytical, spacial concepts are difficult for her to grasp.