The Serial Peripheral Interface Bus or SPI bus is a synchronous serial data link standard developed by Motorola.The wiki page here provides a good overview.Even though its a routine affair on most MCUs,each device implements it a little differently,so reading the datasheet is a must.
As for the PSoC 3,
It uses the a Tx Buffer(upto x bytes), Rx Buffer(upto x bytes), Control and Configuration registers of I2C/SPI PSoC block, a data register for data shifting, and one or more Pin Port registers,and an Interrupt system associated with the whole setup.
The ENC28J60(Datasheet) supports SPI Interface with Clock Speeds Up to 20 MHz.It has a bunch of commands for read/write access to the its register bank(a big one at that..refer to the "Memory Organisation" section of its datasheet),and its TX/RX buffers etc,apart from one to reset the chip.
So,the first step to interfacing with this would be to write a set of functions to handle the SPI comm.Though I did put together some code,it hasnt been very successful yet.(I keep getting only 0x00 back as data)..its been at that state since quite sometime now,since I am yet to receive my PC's harddisk from Seagate RMA Center.
No comments:
Post a Comment