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

MCP23017 parallel output operation.


  • Please log in to reply
2 replies to this topic

#1 philvr

philvr

    Member

  • Members
  • PipPip
  • 23 posts
  • LocationMelksham, UK

Posted 27 August 2013 - 09:35 AM

I'm using the driver code for the mcp23017 from the NET Micro Framework Toolbox but the boolean "inverted" option appears to have no effect. This is set to false in the line data = mux.CreateParallelOut(0, 10,false) But there is no change even when set to "true"/ I am writing to a 10 led bar graph directly from the MCP23017 outputs (the anode of each led is pulled to +3.3v via a resistor). If the inverted boolean option is set to true I expect when I write "0" that the outputs will be inverted (hence at a logic "1") and the leds will remain off. I actually need the inverted option to work. Please, can anyone advice why it is not functioning as expected? namespace mcp23017 { public class Program { static Mcp23017 mux; private static IParallelOut data; public static void Main() { mux = new Mcp23017(32, 100); data = mux.CreateParallelOut(0, 10,false); while (true) { data.Write(0); Thread.Sleep(250); data.Write(1023); Thread.Sleep(250); } } } }

#2 cloris

cloris

    New Member

  • Members
  • Pip
  • 8 posts

Posted 03 October 2013 - 12:26 PM

I have been eyeing trying out the parallel out with the MCP23017 but have not gotten there yet.  In the mean time, I have two blog posts on the MCP23017 that might be helpful:

 

Basics

Advanced

 

Bets of Luck!



#3 philvr

philvr

    Member

  • Members
  • PipPip
  • 23 posts
  • LocationMelksham, UK

Posted 08 November 2013 - 10:10 AM

Just a belated "Thanks" to cloris! Your first post was very helpful in getting me started with the MCP23017. We have since modified the paralel i/o routines to use a "write short"  technique that is in line with the 16 pins available on the chip.   We are using the MCP23017 to drive a 10 led bargraph that displays an indication of DC current flow in a battery charge/discharge system...some of the spare lines will drive a piezo sounder and read from a push button switch (but that code has yet to be developed).




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.