Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Revisiting a program for the Mini

Mini program reuse

  • Please log in to reply
No replies to this topic

#1 Dr Who

Dr Who

    Advanced Member

  • Members
  • PipPipPip
  • 261 posts
  • LocationNYC

Posted 13 July 2013 - 11:03 PM

[font="'times new roman', times, serif;"]Hello![/font]

[font="'times new roman', times, serif;"]Having discovered that at least one of my original programs for the Mini works as advertised, I then decided to start adding features. And then making use of these features:[/font]

using System;using System.Threading;using Microsoft.SPOT;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.Hardware.NetduinoMini;namespace B1{    public class Program    {        public static void Main()        {            // write your code here            OutputPort led0 = new OutputPort(Pins.GPIO_PIN_20, false);            OutputPort led1 = new OutputPort(Pins.GPIO_PIN_19, false);            OutputPort led2 = new OutputPort(Pins.GPIO_PIN_18, false);            OutputPort led3 = new OutputPort(Pins.GPIO_PIN_17, false);            OutputPort led4 = new OutputPort(Pins.GPIO_PIN_16, false);         //   OutputPort led5 = new OutputPort(Pins.GPIO_PIN_15, false);            OutputPort led6 = new OutputPort(Pins.GPIO_PIN_14, false);            OutputPort led7 = new OutputPort(Pins.GPIO_PIN_13, false);            while (true)            {                led4.Write(false);                Thread.Sleep(100);                led0.Write(true);                Thread.Sleep(575);                led1.Write(false);                Thread.Sleep(575);                led2.Write(false);                Thread.Sleep(575);                led3.Write(false);                Thread.Sleep(575);                led7.Write(true);                Thread.Sleep(400);                led7.Write(false);                Thread.Sleep(575);                led0.Write(false);                Thread.Sleep(575);                led1.Write(true);                Thread.Sleep(575);                led2.Write(false);                Thread.Sleep(575);                led3.Write(false);                Thread.Sleep(575);                led0.Write(false);                Thread.Sleep(575);                led1.Write(false);                Thread.Sleep(575);                led2.Write(true);                Thread.Sleep(575);                led3.Write(false);                Thread.Sleep(575);                led0.Write(false);                Thread.Sleep(575);                led1.Write(false);                Thread.Sleep(575);                led2.Write(false);                Thread.Sleep(575);                led3.Write(true);                Thread.Sleep(575);                led4.Write(true);                Thread.Sleep(575);                led7.Write(true);                Thread.Sleep(400);                led7.Write(false);         //      Thread.Sleep(575);                Thread.Sleep(575);                led6.Write(true);                Thread.Sleep(400);                led6.Write(false);                Thread.Sleep(575);         //      Thread.Sleep(575);                led7.Write(true);                Thread.Sleep(400);                led7.Write(false);                Thread.Sleep(575);            }        }    }}

The later numbers are attached to a buffer supplied by a SN74ABT2244A, Attached File  sn74abt2244a.pdf   732.77KB   0 downloads and then communicate with a PAL16L8, which is at the moment a "pull", they in turn cause second phase functions.

 

The ones marked led0 and led1 are also connected via those buffers, and then are also communicating with that same PAL, and in turn are causing first phase functions.

 

Attached File  Output-Debug.txt   3.06KB   0 downloads Attached File  Output-Debug1.txt   2.98KB   0 downloads

Attached File  Output-Debug2.txt   2.98KB   0 downloads

 

And I've included the debug output for three runs.

 

I know they represent a perfectly normal debug run, but I feel to those who do read this posting, they will serve to better understand why things happen the way they do.


Edited by Dr Who, 13 July 2013 - 11:03 PM.


Doctor Who
"This signature does not exist!"





Also tagged with one or more of these keywords: Mini, program reuse

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.