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 / GizmoBlog / MMBasic Language / Input and Output / SETPIN

SETPIN

SETPIN pin, cfg [,target]

Will configure the external I/O ‘pin’ according to ‘cfg’:

The original Maximite has 20 I/O pins numbered 1 to 20, the Color Maximite adds another 20 I/O pins on the Arduino connector. These are labeled D0 to D13 and A0 to A5.
0 Not configured or inactive
1 Analog input (pins 1 to 10, A0 to A5)
2 Digital input (all pins and 5V tolerant on pins 11 to 20)
3 Frequency input (pins 11 to 14)
4 Period input (pins 11 to 14)
5 Counting input (pins 11 to 14)
6 Interrupt on low to high input change (pins 1 to 20, D0 to D8) for target
7 Interrupt on high to low input change (pins 1 to 20, D0 to D8) for target
8 Digital output (all pins)
9 Open collector digital output to 5V (pins 11 to 20, D0 to D13) In this mode the function PIN() will also return the output value.

The starting line number of the interrupt routine is specified in the third parameter ‘target’. This mode also configures the pin as a digital input so the value of the pin can always be retrieved using the function PIN().

See also:
IRETURN
PIN
PORT
PULSE
PWM
PWM STOP

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