-- -- file : max520.jal -- author : Alessandro Zummo <email@example.com> -- date : 04.07.2000 -- purpose : MAX520/MAX521 ( 8 bits, 8 channels D/A converter) control routines -- requires : i2c -- pins : see i2cp -- -- Copyright (C) 2000 Alessandro Zummo -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Library General Public -- License as published by the Free Software Foundation; either -- version 2 of the License, or (at your option) any later version. -- -- This library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- Library General Public License for more details. -- -- You should have received a copy of the GNU Library General Public -- License along with this library; if not, write to the -- Free Software Foundation, Inc., 59 Temple Place - Suite 330, -- Boston, MA 02111-1307, USA. -- -- This library has not (yet) been tested by the author. If it works -- for you, please drop me a note. -- include the required libraries include i2c -- Write <value> to <channel> of the MAX520/MAX521 located at <address> -- -- Please check the datasheet for further explanations. procedure max520_write( byte in address, byte in channel, byte in value ) is var byte control = value & 0b_0000_0111 i2c_write_2( address, control, value ) end procedure -- power down procedure max520_powerdown( byte in address ) is i2c_write_1( address, 0b_0000_1000 ) end procedure -- reset procedure max520_reset( byte in address ) is i2c_write_1( address, 0b_0001_0000 ) end procedure
|file: /Techref/piclist/jal/max520521-az.htm, 2KB, , updated: 2001/11/7 07:42, local time: 2018/10/19 18:14,
|©2018 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
<A HREF="http://techref.massmind.org/techref/piclist/jal/max520521-az.htm"> PIC JAL IO Routine MAX520/MAX521 ( 8 bits, 8 channels D/A converter) control routines</A>
|Did you find what you needed?|
Welcome to massmind.org!
Welcome to techref.massmind.org!