Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN3254 Datasheet(PDF) 8 Page - STMicroelectronics

Part # AN3254
Description  SPI protocol for the STPMC1 metering device
PDF  24 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN3254 Datasheet(HTML) 8 Page - STMicroelectronics

Back Button AN3254 Datasheet HTML 4Page - STMicroelectronics AN3254 Datasheet HTML 5Page - STMicroelectronics AN3254 Datasheet HTML 6Page - STMicroelectronics AN3254 Datasheet HTML 7Page - STMicroelectronics AN3254 Datasheet HTML 8Page - STMicroelectronics AN3254 Datasheet HTML 9Page - STMicroelectronics AN3254 Datasheet HTML 10Page - STMicroelectronics AN3254 Datasheet HTML 11Page - STMicroelectronics AN3254 Datasheet HTML 12Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 8 / 24 page
background image
SPI operations
AN3254
8/24
Doc ID 17783 Rev 1
Commands for changing configuration bits and system signals should be sent during active
signals SCS and SYN, as it is shown in Figure 3.
The SYN must be put low in order to disable the SDA output driver of the device and to
make the SDA an input pin. A string of commands can be sent within one period of active
signals SCS and SYN or a command can be followed by reading the data record but, in this
case, the SYN should be deactivated in order to enable the SDA output driver and a SYN
pulse should be applied before activation of the SCS in order to latch the data.
Given the connection between the STPMC1 and a microcontroller, as shown in the previous
paragraph, it is possible to implement the writing procedure in the firmware through the
following steps:
1.
disable the SPI peripheral
2.
set MISO, SCLK, and SS to be output
3.
set the pin which is connected to SYN to be output high
4.
activate SCS first and then SYN
5.
activate SCL
6.
apply a bit value to SDA and deactivate SCL
7.
repeat the last two steps seven times to complete one byte transfer
8.
repeat the last three steps for any remaining byte transfer
9.
deactivate SYN and the SCS
10. enable again the SPI module.
To temporarily set any bit, it is necessary to set the RD system signal before any other bit.
This bit determines the device functioning from OTP shadow latches and not from OTP
memory. The procedure to set this signal is that shown above.
In the case of a precharge command (0xFF), emulation of the above is not necessary, it can
be sent before any reading command. In fact, due to the pull up device on the SDA pin the
processor needs to perform the following steps:
1.
activate SYN first in order to latch the results
2.
after at least 1 µs activate SCS
3.
write one byte to the transmitter of SPI this produces 8 pulses on the SCL with SDA=1
4.
deactivate SYN
5.
read the data records as shown in Section 3.4 (the sequence of reading is altered)
6.
deactivate SCS.
3.3
Data registers permanent writing
In order to make a permanent set in OTP memory of some configuration bits, the following
procedure should be conducted:



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
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