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.

gnomathibus

Member Since 08 Feb 2012
Offline Last Active Nov 14 2014 07:07 PM
-----

Topics I've Started

Use MAX521 DAC with i2c

16 April 2012 - 02:02 PM

Hello,

I want to use a MAX521 in I2C with my Netduino, I use the class I2CBus found on the forum, but I am having dificulties with the function to write a value to a regitre

here is my code:
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.NetduinoPlus;
using NetduinoPlusTesting;


namespace Maxdac
{
    public class Maxdacdevice 
    {

        
        private I2CDevice.Configuration _slaveConfig;
        private const int TransactionTimeout = 3000; // ms
        private const byte ClockRateKHz = 100;
        public byte Address { get; private set; }
        
        
         

        public Maxdacdevice(byte address)
        {
            Address = address;
            _slaveConfig = new I2CDevice.Configuration(address, ClockRateKHz);
         
        }
        
       
        public void write()
        {

         //Send command write Full Power DAC0

            I2CBus.GetInstance().Write(_slaveConfig, new byte[] { 0x07 , 0x00 }, TransactionTimeout);
            I2CBus.GetInstance().Write(_slaveConfig, new byte[] { 0xFF }, TransactionTimeout);

        }

       


    }
}


in fact I try to do a translation of an existing library for Arduino, but since I'm a beginner it was not easy for me
The link from the site of the library MAX520 / 1 for Arduino
and the to linkthe documentation of the IC

Sorry for my poor English I use Google to translate if someone could help me it would be super cool!

Extend PWM output

08 February 2012 - 02:03 PM

hello, I seek to extend the number PWM output, is this possible?

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.