Coder Social home page Coder Social logo

gpiotest's Introduction

gpiotest

CHIP program to test gpio I/O lines.

License

Copyright 2016 Steven Ford http://geeky-boy.com and licensed "public domain" style under CC0: CC0

To the extent possible under law, the contributors to this project have waived all copyright and related or neighboring rights to this work. In other words, you can use this code for any purpose without any restrictions. This work is published from: United States. The project home is https://github.com/fordsfords/gpiotest/tree/gh-pages

To contact me, Steve Ford, project owner, you can find my email address at http://geeky-boy.com. Can't see it? Keep looking.

Introduction

The CHIP single-board computer has two sets of general-purpose I/O lines: 8 "XIO" lines and 8 "CSI" lines. The "CSI" lines are directly handled by the CPU chip; the "XIO" lines are handled by a separate chip which communicates with the CPU over an I2C serial bus. This project contains two C programs which measures the speed that the I/O lines can be manipulated in software.

XIO Measurements

  • input: 127 microseconds (lseek/read)
  • output: 122 microseconds (write)

CSI Measurements

  • input: 6.7 microseconds (lseek/read)
  • output: 2.8 microseconds (write)

You can find gpiotest at:

Note: the "gh-pages" branch is considered to be the current stable release. The "master" branch is the development cutting edge.

Quick Start

  1. If you haven't set up your CHIP to be able to compile C programs, perform these instructions up to and including installing gcc.

  2. Get the files onto CHIP:

     mkdir gpiotest
     cd gpiotest
     wget http://fordsfords.github.io/gpiotest/xiotest.c
     wget http://fordsfords.github.io/gpiotest/csitest.c
     wget http://fordsfords.github.io/gpiotest/bld.sh
    
  3. Build the package:

     ./bld.sh
    
  4. Test the package:

     sudo ./xiotest
     sudo ./csitest
    

Yes, I could/should have written a single program which accepts the GPIO number as a command-line argument, but I wrote it before I knew about CSI lines, and once I found out about them, I just did a quick-and-dirty clone of the source file. This kind of test program is usually used and discarded once the measurements are taken; I'm only saving them as a record of how the measurements were taken. And yes, I'm feeling guilty and rationalizing laziness. :-)

Release Notes

  • 0.1 (31-Jan-2016)

    Initial pre-release.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.