DataSheet26.com

AN1096 PDF даташит

Спецификация AN1096 изготовлена ​​​​«Microchip» и имеет функцию, называемую «Using the C30 Compiler to Interface SPI Serial EEPROMs».

Детали детали

Номер произв AN1096
Описание Using the C30 Compiler to Interface SPI Serial EEPROMs
Производители Microchip
логотип Microchip логотип 

12 Pages
scroll

No Preview Available !

AN1096 Даташит, Описание, Даташиты
AN1096
Using the C30 Compiler to Interface SPI Serial EEPROMs
with dsPIC33F and PIC24F
Author: Martin Kvasnicka
Microchip Technology Inc.
INTRODUCTION
The 25XXX series serial EEPROMs from Microchip
Technology are SPI compatible and have maximum
clock frequencies ranging from 3 MHz to 20 MHz. Many
times when designing an application which utilizes a
serial EEPROM device, it may be beneficial to use a
microcontroller which does not feature a dedicated
protocol-specific serial port. This can be due to several
possible reasons, including size restrictions or costs. In
these instances, it is required of the designer to write
software routines capable of generating the proper
signals for communicating with the EEPROM device.
This application note provides assistance and source
code to ease the design process of interfacing a
Microchip dsPIC33F Digital Signal Controller to a
Microchip SPI serial EEPROM, without the use of a
hardware serial port.
Figure 1 describes the hardware schematic for the
interface between Microchip’s 25XXX series devices
and the dsPIC33F DSC or PIC24F PIC® microcontrol-
ler. The schematic shows the connections necessary
between the DSC or PIC MCU and the serial EEPROM
as tested, and the software was written assuming
these connections. The WP and HOLD pins are tied to
VCC through resistors, because the write-protect and
hold features are not used in the examples provided.
FIGURE 1:
CIRCUIT FOR dsPIC33F256GP710, PIC24FJ128GA010 AND 25XXX SERIES
DEVICES
100 Pin TQFP
dsPIC33FJ256GP710
PIC24FJ128GA010
SDA1/RG3
SCK1/INT0/RF6
SDI1/RF7
SDO1/RF8
U1RX/RF2
U1TX/RF3
CS 1
SO 2
WP 3
Vss 4
Vcc
8 Vcc
7 HOLD
6 SCK
5 SI
Note: CS, WP and HOLD pins should all have pull-up resistors (~10k-ohms).
© 2007 Microchip Technology Inc.
DS01096B-page 1









No Preview Available !

AN1096 Даташит, Описание, Даташиты
AN1096
FIRMWARE DESCRIPTION
The purpose of the program is to show individual
features of the SPI protocol and give code samples of
the instructions and addressing schemes so that the
basic building blocks of a program can be shown. The
firmware performs the following operations:
• Low-Density Byte Write
• Low-Density Byte Read
• Low-Density Page Write
• Low-Density Sequential Read
• Write Enable
• WIP Polling
In addition, the following operations are available but
not explicitly illustrated:
• High-Density Byte Write
• High-Density Byte Read
• High-Density Page Write
• High-Density Sequential Read
• Write Disable
• Read Status Register
• Write Status Register
The low-density routines are intended for use with the
4K and smaller density devices that use only one byte
for addressing. The high-density routines are intended
for use with 8K and higher density devices that use two
bytes for addressing. This program also exhibits the
WIP polling feature for detecting the completion of write
cycles after the byte write and page write operations.
Read operations are located directly after each write
operation, thus allowing for verification that the data
was properly written. No method of displaying the input
data is provided, but a SEEVAL® 32 evaluation system,
an oscilloscope, or a Microchip MPLAB® ICD 2 could
be used.
The low-density code was tested using the
25LC040A serial EEPROM. This device features 512
x 8 (4 Kbit) of memory and 16-byte pages. The high-
density code was tested using the 25LC256 serial
EEPROM. This device features 32K x 8 (256 Kbit) of
memory and 64-byte pages. Only the low-density
operations are illustrated in this application note.
Oscilloscope screen shots are labeled for ease in read-
ing. The data sheet versions of the waveforms are
shown below the oscilloscope screen shots. All timings
are designed to meet the data sheet specs, and an 8
MHz crystal oscillator is used to clock the dsPIC33F
DSC or PIC24F microcontroller. If a different clock is
used, the code may need to be modified to avoid violat-
ing timing specs. All values represented in this applica-
tion note are decimal values unless otherwise noted.
DS01096B-page 2
© 2007 Microchip Technology Inc.









No Preview Available !

AN1096 Даташит, Описание, Даташиты
WRITE ENABLE
Figure 2 shows an example of the Write Enable
command. Chip Select is brought low (active) and the
opcode (0x06) is shifted out. The Write Enable com-
mand must be given in order to set the WEL bit before
FIGURE 2:
WRITE ENABLE (WREN)
AN1096
a write is attempted to either the array or the STATUS
register. The WEL bit can be cleared by issuing a Write
Disable command (WRDI) and is also automatically
reset if the device is powered down or if a write cycle is
completed.
CS
SCK
01234567
SI 0 0 0 0 0 1 1 0
High-Impedance
SO
© 2007 Microchip Technology Inc.
DS01096B-page 3










Скачать PDF:

[ AN1096.PDF Даташит ]

Номер в каталогеОписаниеПроизводители
AN10935Using SDR/DDR SDRAM memoriesNXP Semiconductors
NXP Semiconductors
AN1096Using the C30 Compiler to Interface SPI Serial EEPROMsMicrochip
Microchip
AN10981GreenChip TEA1738 series fixed frequency flyback controllerNXP Semiconductors
NXP Semiconductors

Номер в каталоге Описание Производители
TL431

100 мА, регулируемый прецизионный шунтирующий регулятор

Unisonic Technologies
Unisonic Technologies
IRF840

8 А, 500 В, N-канальный МОП-транзистор

Vishay
Vishay
LM317

Линейный стабилизатор напряжения, 1,5 А

STMicroelectronics
STMicroelectronics

DataSheet26.com    |    2020    |

  Контакты    |    Поиск