数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

AN975 数据表(PDF) 7 Page - STMicroelectronics

部件名 AN975
功能描述  As part of a process of continuous improvement
PDF  11 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

AN975 数据表(HTML) 7 Page - STMicroelectronics

Back Button AN975 Datasheet HTML 3Page - STMicroelectronics AN975 Datasheet HTML 4Page - STMicroelectronics AN975 Datasheet HTML 5Page - STMicroelectronics AN975 Datasheet HTML 6Page - STMicroelectronics AN975 Datasheet HTML 7Page - STMicroelectronics AN975 Datasheet HTML 8Page - STMicroelectronics AN975 Datasheet HTML 9Page - STMicroelectronics AN975 Datasheet HTML 10Page - STMicroelectronics AN975 Datasheet HTML 11Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 7 / 11 page
background image
7/11
UPGRADING FROM ST625X/6XB TO ST625X/6XC
1.2.4 SPI
When the SPI is used in master mode, the SCK pin (PC4) and Sout pin (PC3) work in output
mode and the Sin pin (PC2) in input mode. On ST625X/6XC, the Port C pins used for the SPI
have to be configured in input mode either with or without pull-up. Their reset configuration
doesn’t have to be changed.
To enable the SPI in master mode, the SPCLK bit in the SPI mode control register has to be
set. By setting this bit, the SCK pin (PC4) is automatically configured in output push-pull mode
and the clock is output at the frequency configured in the SPIDIV register. The output of the
SPI data register Sout pin (PC3) is also automatically configured in output push-pull by setting
bit 0 in the MISCR register.
The following is a software example of how to use the SPI in master mode:
.org 080h (or CSEG AT 080H depending on the toolchain)
reset: clr X
clr A
reti
; Exit NMI mode
ldi WDGR, watchtim
; Load the watchdog
ldi OSCR, 00h
; Set the oscillator ratio to 1
ldi DDRC, 00h
; Port C in reset state
ldi ORC, 00h
ldi DRC, 00h
ldi MISCR, 001h
; Enable Sout
; (PC3 is configured in output push-pull)
ldi SPIDIV, 048h
; Clock ratio = 1 / 9 bits frame
ldi SPIMOD, 03Eh
; CPOL = 0 / Filters enabled / SPCLK = 1 / CPHA = 1
; SPSTRT = 1 / SPIN = 1 / SPIE = 0
; (PC4 is configured as output push-pull)
ldi SPIDR, 0AAh
; Load the data to be send
set 7, SPIMOD
; Enable the transmission (SPIRUN = 1)
loop:
jrs 7, SPIMOD, loop
; Poll the bit SPIRUN for end of transmission
.....



Html Pages

1 2 3 4 5 6 7 8 9 10 11


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com