CircuitGizmos

Electronic Products for Creative Minds

  • Home
  • Gizmo Store/Products
  • Documentation/Datasheets
  • Projects/Libraries
  • GizmoBlog
  • Services/Contact
    • Design
    • Contact Gizmo!
  • Your Gizmo Cart
    • Your Account
You are here: Home / Projects / ColorMax MMStick Projects / CGMMSTICK SPI Interface

CGMMSTICK SPI Interface

As an example of the operation of the SPI function of the CGMMSTICK, this example interfaces to a SPI potentiometer.

SPI circuit using an MCP41100 serial potentiometer.

An MCP41100 SPI potentiometer was selected from Microchip Technology. This is a 100k potentiometer that can be adjusted in 256 steps from one end of the dial to another.

DPI pot block diagram.

PB0 and PA0 were connected to 5V and ground respectively. PW0 is the ‘wiper’ and will move in position between 0V and 5V under control of the CGMMSTICK via the commands sent through MMIDE.

The SPI serial lines are all set as OC (open collector) with a pull up resistor of 10k ohms.

The chip select line for the digital pot.

The CS (chip select) line of the digital pot is connected to I/O Pin 14, in open collector mode (with 10k ohm pull up). It is active low. The data transfer starts with this line high. The line is brought low, serial data is transmitted, and the line returned high.

The SPI applet settings appropriate for the MCP41100.

The SPI applet is used to transmit two bytes to the digital pot.

Pins 11, 12, and 13 are used to communicate with the digital pot. Note that this hardware uses the 8-pin MCP41100, so there actually is no data read from the digital pot.

The clock and data pins are set to OC. The rate is L – low. The polarity for clock/data 1s set to 3 – clock is active low, data is captured on the rising edge and output on the falling edge.

The chip is selected (CS low) and 11 is clocked to the chip. This is the command byte for this chip. Then a value from 0 (0v) to 255 (5V) is clocked to the chip before returning high. When the CS is high the pot switches to the commanded setting.

 

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

A Ton of Documentation

Open all | Close all

Projects made by Gizmo, Friends, and Members

open all | close all

Recent GizmoBlog Musings

  • Altair 8800 using a ColorMax!
  • Re-energizing the ColorMax, Pt. 3

Visit us!

  • Facebook

Electronic Products for Creative Minds

CircuitGizmos is your source for electronic products that help you create your embedded projects. Here at CircuitGizmos.com you will find a friendly store filled with creative products and all of the documentation that you need to use these gizmos.

We create devices that we believe make electronics fun, but we also know that our products are used for professional designs. For decades we have designed products for commercial, military, and medical industries. Our gizmos here are great for engineers and hobbyists alike.

Copyright © 2008+ CircuitGizmos, L.L.C. All rights reserved

Image already added

Recently Viewed Products

Copyright © 2023 · Generate Pro Theme on Genesis Framework · WordPress · Log in