SPI Debugger
Hi Friends, in this post, we will discuss how to use SPI Debugger available in proteus for serial peripheral interface (SPI) which is a built-in feature of PIC microcontroller to communicate and data exchange between PIC and other devices.
Introduction to SPI
Guys, SPI can be considered as a programmable shift register, The SPI module is a synchronous serial I/O port that shifts a serial bit stream of variable length and data rate between the PIC and other peripheral devices. Here “synchronous” means that the data transmission is synchronized to a clock signal.
To avoid further delay, let's see some important connections and different configurations to effectively use SPI Debugger.
How to use SPI Debugger in MASTER & SLAVE configuration
Select the virtual instrument and from the instrument, list selects "SPI Debugger".
SPI Debugger |
Insert two SPI Debugger on the working area, select any one of them, and right-click on it, navigate to edit properties.
Connect both SPI debugger as shown below.(tip: right click on left-hand side SPI debugger and use "x-mirror" option )
In the "part reference" entry box insert MASTER, do the same for the second SPI Debugger, and insert SLAVE.
SPI Debugger |
Connect both SPI debugger as shown below.(tip: right click on left-hand side SPI debugger and use "x-mirror" option )
Insert 1 in "Master clock frequency.
Type binary sequence in other properties entry box {SEQUENCE = 01010101B}equivalent to 55 in HEX.
Next, right-click on SLAVE SPI Debugger and select "SPI Mode" to "SLAVE".
Insert 1 in "Master clock frequency.
Type binary sequence in other properties entry box {SEQUENCE = 11111111B} equivalent to FF in decimal.
SPI Debugger |
Now, run the simulation, if everything goes fine both debugger terminals windows will be displayed and 8 bit will exchange between both terminals
Friends, if you want to learn more!
Check out
BOTH TERMINAL WINDOWS APEARS EMPTY
ReplyDeleteWHILE RUNNING THE SIMULATION BOTH TERMINAL WINDOWS APPEARS EMPTY
ReplyDeleteEmpty windows means user is not providing sequence in supported format.
Deleteto avoid this problem you can be used a prefix to denote binary values (e.g 1101b).
This comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDelete