P. 1
SPI_casestudy

SPI_casestudy

|Views: 10|Likes:
Published by Ashish Rawat

More info:

Published by: Ashish Rawat on Mar 13, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPTX, PDF, TXT or read online from Scribd
See more
See less

07/28/2014

pdf

text

original

Case Study

Serial Peripheral Interface on ARM Microcontrollers

3. 5. 7. 2.Contents 1. 6. 4. RFID reader design Why SPI? Why not I2C? SPI in Linux OS Understanding device Parameters Implementation Conclusion .

RFID reader design Master – mini2440 (S3C2440 ARM9 Microcontroller) Slave – AS3991 UHF RFID reader IC .

mini2440 AS3991 MOSI MISO SS CLK Vext GND EN Irq .

Why SPI? Why not I2C? AS3991 provides a SPI or parallel communication with microcontroller •Higher data transfer rate •Single slave •Full duplex .

0 or spidev1.SPI in Linux OS •No need to learn configuration registers or buffer register(Hardware Independent) •Kernel will give you access to SPI device as spidev0.1 •No change in programs for different hardware .

Understanding device • What are transfer rate device support • CPOL and CPHA • CS select • Signal level for communication • Commands – most important and varies with device .

.

Parameters •Device(spidev0.0) •Clock speed •modes • CPOL • CPHA •3-wire mode •Chip Select(Active high or low) .

A Code Walkthrough start Include headers Define variables Void main(--) Call transfer Is transfer Complete? Display response END transfer .

0x53.0x53 } [root@FriendlyARM /udisk]# .0x4B.0x46.0x4A.0x47.0x45.Implementation Transmit buffer contains tx_buf[]= { 0x40./readallreg -H spi mode: 1 bits per word: 8 max speed: 500000 Hz (500 KHz) 00 03 03 02 02 F0 F0 62 62 35 35 05 05 00 00 07 07 07 07 41 41 01 01 02 02 81 00 37 37 07 07 00 00 00 00 00 00 38 38 00 00 00 00 00 00 00 00 00 00 00 00 . 0x43.0x44.0x42.0x4F.0x49.0x4A. 0x52. 0x4C.0x48.0x51.0x4D.0x45.0x50.0x44.0x41. 0x4F. 0x49.0x4B.0x4E.0x4D.0x48.0x50.0x51.0x4E.0x42.0x43.0x4C. 0x46.0x41.0x40.0x47.

Conclusion • RF device is studied in detail • operating parameters are decided • SPI communication is established and verified .

Thank You! .

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->