Skip to main content

How to use SPI Debugger


 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.
SPI Debugger


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.

SPI Debugger


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 )
SPI Debugger


Next, right-click on MASTER SPI Debugger and select "SPI Mode" to "MASTER".
Insert 1 in "Master clock frequency.
Type binary sequence in other properties entry box {SEQUENCE = 01010101B}equivalent to 55 in HEX.


SPI Debugger



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 

SPI Debugger

tip: You can also open Terminal window from Debug 
SPI Debugger



Friends, if you want to learn more!
Check out




Comments

  1. BOTH TERMINAL WINDOWS APEARS EMPTY

    ReplyDelete
  2. WHILE RUNNING THE SIMULATION BOTH TERMINAL WINDOWS APPEARS EMPTY

    ReplyDelete
    Replies
    1. Empty windows means user is not providing sequence in supported format.
      to avoid this problem you can be used a prefix to denote binary values (e.g 1101b).

      Delete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. This comment has been removed by a blog administrator.

    ReplyDelete
  5. A distinctive space where deep expertise fuels industry defining ideas.
    Enrgtech Electrical Components Distributor

    ReplyDelete
  6. For professionals who lead progress with knowledge, precision, and purpose.
    Enrgtech Electronic Parts Supplier UK

    ReplyDelete

Post a Comment

Popular posts from this blog

PIC18F PINOUT

Vdd(Vcc) Two pins are used to provide supply voltage to the chip.The typical voltage source is +5V DC. Vss(GND) Two pins are also used to for ground. OSC1 & OSC2 The PIC18F has many options for the Clock source.Most often a quartz crystal controller is connected to input OSC1 & OSC2.The quartz crystal oscillator connected to the OSC1 & OSC2 pins also needs two capacitors.One side of each capacitor is connected to the the ground as shown in figure below: PIC18F microcontroller can have speeds of up to 40 MHz. Easy Programming  PICKIT3.5 PIC KIT3.5 PICKIT MCLR Pin1 (in the PIC18F4548 40-pin DIP) is the MCLR (master clear reset) pin. It is an input and is active-Low (normally High),When a low pulse is applied to this pin,the microcontroller will reset and terminate all activities.This is often referred to as a power-on reset (POR). Port A, B, C, D & E The Ports PORTA, PORTB, PORTC, PORTD, and PORTE use a total ...

Frequency Counter using Interrupts PIC18f4580 Project

Frequency Counter  using PIC18f458 0 Proje ct This POST describes the construction of small frequency counter with a cheap PIC18f4580 microcontroller with 16 x 2 LCD.   Prerequisites: PIC18F4580 TIMER Programming. PIC18F4580 COUNTER Programming. PIC18F4580 Interfacing with 16x2 LCD. PIC18F4580 Interrupts Programming  ( we will cover in this POST) Concept: Frequency  is the number of occurrences of a repeating event per unit time. in our case we will measure a number of clocks generated by clock source per unit time. In this project, LCD is used to display the frequency and PIC timer 1 to measure the input signal and Timer0 to generate an indication that one second has gone. System software utilizes Timer-1 in the 16-bit counter mode to count the input signal and overflows of the counter are added to provide the aggregate count in multiples of 65536. Totaling the existing value of the counter at the conclusion provides...