Skip to main content
Application NoteNxp

AN453: Serial Peripheral Interface Device Emulation Routine (SPIDER) for MC68340

Software-based SPI master emulation for NXP MC68340 processors. Supports 8/16-bit transfers, variable clock phases, and block data handling using minimal I/O pins.

View application note

Overview

This application note describes the Serial Peripheral Interface Device Emulation Routine (SPIDER), an assembly language program designed for the NXP MC68340 processor. SPIDER allows the MC68340 to emulate a master-mode SPI interface without additional hardware, utilizing only two to three PORTA pins for communication. The routine supports both 8-bit and 16-bit word sizes, configurable clock polarity (CPOL) and phase (CPHA), and up to two slave selects. It is optimized for low-throughput systems, offering block transfer support to minimize software overhead and the ability to be interrupt-driven to preserve bus bandwidth. The code is statically relocatable and requires less than 1KB of ROM.

Use Cases

  • Implementing SPI master functionality on MC68340 processors without native hardware SPI
  • Cost-sensitive embedded applications requiring low part counts
  • Low-throughput serial data transfers between microcontrollers
  • Memory-constrained systems needing a compact SPI software stack

Topics

MC68340
SPI Emulation
SPIDER
Serial Peripheral Interface
CPU32
MC68HC05C4
Assembly Language
Master Mode
Microcontroller Communication

Referenced Parts

MC68340

NXP

assembly language program that allows an MC68340 processor to emulate a master-mode Serial Peripheral Interface (SPI) without additional hardware.

MC68HC05C4

NXP

SPIDER software was developed on a Freescale MC68340 evaluation system and was tested using a Freescale MC68HC05C4 evaluation module.

AN453: Serial Peripheral Interface Device Emulation Routine (SPIDER) for MC68340 | Design Resources