http://www.www.datasheet4u.com

900,000+ Datasheet PDF Search and Download

Datasheet4U offers most rated semiconductors datasheets pdf




  Microchip Technology Semiconductor Electronic Components Datasheet  

AN1096 Datasheet

Using the C30 Compiler to Interface SPI Serial EEPROMs

No Preview Available !

AN1096 pdf
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


  Microchip Technology Semiconductor Electronic Components Datasheet  

AN1096 Datasheet

Using the C30 Compiler to Interface SPI Serial EEPROMs

No Preview Available !

AN1096 pdf
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.


Part Number AN1096
Description Using the C30 Compiler to Interface SPI Serial EEPROMs
Maker Microchip
Total Page 12 Pages
PDF Download
AN1096 pdf
Download PDF File


Buy Electronic Components




Related Datasheet

1 AN10935 Using SDR/DDR SDRAM memories NXP
NXP
AN10935 pdf
2 AN1096 Using the C30 Compiler to Interface SPI Serial EEPROMs Microchip
Microchip
AN1096 pdf
3 AN10981 GreenChip TEA1738 series fixed frequency flyback controller NXP
NXP
AN10981 pdf






Part Number Start With

0    1    2    3    4    5    6    7    8    9    A    B    C    D    E    F    G    H    I    J    K    L    M    N    O    P    Q    R    S    T    U    V    W    X    Y    Z

site map

webmaste! click here

contact us

Buy Components