-------------------------------------------- On Tue, 2/14/17, William Hermans <[email protected]> wrote:
Subject: Re: [beagleboard] Re: Analog input cape/wiring scheme To: [email protected] Date: Tuesday, February 14, 2017, 4:01 AM By the way, the whole software interface for the on chip ADC is already in place, and functional. You simply need to load the driver, or have a device tree overlay do that for you. Then you setup the IIO driver to tell it if you would rather operate in single-shot, or continuous mode. Then you simply read from the "buffer file". If you're still unconvinced. Google "beaglebone ADC" and learn how simple the software side really is. There are many blogposts out there on the subject. One of which is mine, but seems to be down at this moment. On Mon, Feb 13, 2017 at 6:37 PM, William Hermans <[email protected]> wrote: On Mon, Feb 13, 2017 at 11:44 AM, Rob van der Putten <[email protected]> wrote: Hi there Why is I2C a better choice then SPI? The BBB has both. Regards, Rob From a software developers perspective, I2C is far simpler. One call to ioctl() to set the mode of the file descriptor, then you simply start reading from whichever registers you need. Also, since the onboard PMIC, and EEPROM both use I2C interfaces. The buses already exist, are in use, the drivers, and software *have* to work. Otherwise the board does not function at all. Can we simply "plug in" to one of these two I2C buses to save pins ? I do believe so yes. It's been a while since I've looked into that. I think one can use i2c-2 for sure, but I'm not sure if one can also tie into the I2C bus which the PMIC is connected to or not. SPI conversely is not required for the board to function. So drivers are not necessarily already loaded, and functioning. SPI also uses at minimum 3 pins. 2 data lines, and a CS pin. I have heard of, and seen 1 "wire" SPI implementations, but I'm not sure that could be made to work easily in Linux. Since most software implementations use SPIDev. Which is master mode only SPI. Not that this matters for using an externally interface device, such as an ADC. I still think it's much easier to use the on chip ADC. We're using it here for a custom cape. Using one opamp, and a voltage divider. Input is 0-10v dc, and the resistor network limits the voltage to 1.5v max, Which does limit the resolution *some*, but you most definitely do not want to go over 1.8v on the ADC. As stated in the TRM. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CALHSORqpyFekypMA3xWFoWQ%3DLbydW%3DBSdz%2BAdCf9_cn3P1ns8A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. rasaturile generale aie regimului politic Sistemul vietii politice a avutia za un regim democratic instaurat prin legea fundamentala din 1866. smocratizarea societatii romanesti a avut loc insa lent caci limitele reformei rare din 1864 au dat nastere unor grave probleme sociale. Mentinerea votului nzitar a fost o piedica de seama pe drumul catre o evolutie democratica in litele inerente epocii acceptata ca masura de prevedere a unei posibile anipulari a votului omului neinstruit politic. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/371126363.3925430.1487046692833%40mail.yahoo.com. For more options, visit https://groups.google.com/d/optout.
