Ok Robert, i will try to explain how i solved my problem, apologise me if something is not clear but i am not an expert and i beg anyone to correct me if i say something wrong. I2C is a serial protocol and is fully supported by BBB so you can set output pins (8 pins) of MCP23008 setting a chip's register once the chip is connected and initialized. When you set your output serial data all chip's output pins are set at the same time (because there is an internal synchronized register).
So, if you need to set 4 pins with 1101 you can set chip's register with 00001101 value e then you find the value 1101 at the chip's output pins. You don't need to set your GPIO to use the MCP23008 because P9_19 (CLK) and P9_20 (SDA) are already set to work with I2C protocol (at least in debian Wheezy) and all you need is assign an unique address (connecting address pins to GND or VCC) to every MCP23008 chip you connect to these pins (is a bus). Take a look at these links, i think i started from there : http://embedded-lab.com/blog/?p=2834 http://www.gigamegablog.com/2012/11/04/beaglebone-coding-101-i2c/ 2014-07-14 18:43 GMT+02:00 robert.berger <[email protected]>: > Hi, > > > On Monday, July 14, 2014 4:13:13 PM UTC+3, Mirko Fucci wrote: >> >> Yes, but for me the simplest way was using a port expander (i used >> MCP23008) through I2C Interface, very simple to handle with BBB. >> > > Can you please elaborate a bit more on what you tried? > > With the standard GPIO framework [1] I am not sure you can do what you > want. There was an attempt to add block gpio [2] but I don't think this > made it into mainline. > > Regards, > > Robert > > [1] http://lwn.net/Articles/532714/ > [2] http://lwn.net/Articles/533632/ > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to a topic in the > Google Groups "BeagleBoard" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/beagleboard/6sWV16b0a5Y/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- 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]. For more options, visit https://groups.google.com/d/optout.
