Started to test i2c but spent some time re-wiring my breadboard.
I've selected my digital temperature sensor DS1721 for the tests,
since I've already explained how it works in my i2c topic!
Still haven't moved any further, just to know if anyone else is testing it,
to get some feedback on how the tests are going on.
Here is what I've done:
- Compiled OnFlashSystem for kernel 2.6.30.5 and removed 1-wire and spi
support to gain some of space for extra apps. Used the kernel command line:
1st command is only necessary for BIFFBOOT<=V2 (really need to upgrade this
soon).
I've separated the commands with space, didn't thought that comma would
work!
It seems to work, during boot I got this:
*[ 0.948058] i2c-gpio i2c-gpio.0: using pins 12 (SDA) and 9 (SCL)*
I have started to read i2c documentation but couldn't get the necessary
concentration to make sense out of it, will need to review it another day.
Have compiled my old C code that I used on the OpenWrt to communicate
with the DS1721 and got it to compile under dietlibc to get some light apps.
Have sent this to bifferboard but it didn't work! OK, really need to get
back
to documentation to sort that out!
No tools available (i2cdetect) so will really need to rely on my digital
protocol
analyzer.
If someone has some useful tips, please feel free to share !!!
Regards,
Nelson.
On Sun, Sep 6, 2009 at 6:46 PM, biffe...@yahoo.co.uk
<biffe...@yahoo.co.uk>wrote:
> Started to test i2c but spent some time re-wiring my breadboard.
> I've selected my digital temperature sensor DS1721 for the tests,
> since I've already explained how it works in my i2c topic!
> Still haven't moved any further, just to know if anyone else is testing it,
> to get some feedback on how the tests are going on.
> Here is what I've done:
> - Compiled OnFlashSystem for kernel 2.6.30.5 and removed 1-wire and spi
> support to gain some of space for extra apps. Used the kernel command line:
> 1st command is only necessary for BIFFBOOT<=V2 (really need to upgrade this
> soon).
> I've separated the commands with space, didn't thought that comma would
> work!
> It seems to work, during boot I got this:
> *[ 0.948058] i2c-gpio i2c-gpio.0: using pins 12 (SDA) and 9 (SCL)*
> I have started to read i2c documentation but couldn't get the necessary
> concentration to make sense out of it, will need to review it another day.
> Have compiled my old C code that I used on the OpenWrt to communicate
> with the DS1721 and got it to compile under dietlibc to get some light apps.
> Have sent this to bifferboard but it didn't work! OK, really need to get
> back
> to documentation to sort that out!
> No tools available (i2cdetect) so will really need to rely on my digital
> protocol
> analyzer.
> If someone has some useful tips, please feel free to share !!!
> Regards,
> Nelson.
> On Sun, Sep 6, 2009 at 6:46 PM, biffe...@yahoo.co.uk
> <biffe...@yahoo.co.uk>wrote:
> > I have added these to the 2.6.30.5 kernel patch.
You could start with getting i2c-detect working, rather than your own
program.
By the way: I have just uploaded a new biffinitrd tarball, which uses
hush instead of ash, and job control now works, unfortunately ls -l
doesn't for some reason. This should allow you to use the standard
kernel config of mine, and fit more of your stuff on flash.
On Sep 9, 1:38 am, Nelson Neves <nelson.s.ne...@gmail.com> wrote:
> Started to test i2c but spent some time re-wiring my breadboard.
> I've selected my digital temperature sensor DS1721 for the tests,
> since I've already explained how it works in my i2c topic!
> Still haven't moved any further, just to know if anyone else is testing it,
> to get some feedback on how the tests are going on.
> Here is what I've done:
> - Compiled OnFlashSystem for kernel 2.6.30.5 and removed 1-wire and spi
> support to gain some of space for extra apps. Used the kernel command line:
> 1st command is only necessary for BIFFBOOT<=V2 (really need to upgrade this
> soon).
> I've separated the commands with space, didn't thought that comma would
> work!
> It seems to work, during boot I got this:
> *[ 0.948058] i2c-gpio i2c-gpio.0: using pins 12 (SDA) and 9 (SCL)*
> I have started to read i2c documentation but couldn't get the necessary
> concentration to make sense out of it, will need to review it another day.
> Have compiled my old C code that I used on the OpenWrt to communicate
> with the DS1721 and got it to compile under dietlibc to get some light apps.
> Have sent this to bifferboard but it didn't work! OK, really need to get
> back
> to documentation to sort that out!
> No tools available (i2cdetect) so will really need to rely on my digital
> protocol
> analyzer.
> If someone has some useful tips, please feel free to share !!!
> Regards,
> Nelson.
> On Sun, Sep 6, 2009 at 6:46 PM, biffe...@yahoo.co.uk
> <biffe...@yahoo.co.uk>wrote:
> > I have added these to the 2.6.30.5 kernel patch.
I'll have a look into it, will probablly need some help from the Linux
gurus,
don't really know if its possible to get this tools compiled and get it
passed
through dietlibc to get a very small exe!
I saw a new biffinitrd yesterday, version 5, I had just updated to version 4
and since I was trying i2c stuff dind't had time to try it out. Thanks for
the
tip, will get new version 5 into my stuff right away!
On Wed, Sep 9, 2009 at 10:06 AM, bifferos <biffe...@yahoo.co.uk> wrote:
> You could start with getting i2c-detect working, rather than your own
> program.
> By the way: I have just uploaded a new biffinitrd tarball, which uses
> hush instead of ash, and job control now works, unfortunately ls -l
> doesn't for some reason. This should allow you to use the standard
> kernel config of mine, and fit more of your stuff on flash.
> On Sep 9, 1:38 am, Nelson Neves <nelson.s.ne...@gmail.com> wrote:
> > Started to test i2c but spent some time re-wiring my breadboard.
> > I've selected my digital temperature sensor DS1721 for the tests,
> > since I've already explained how it works in my i2c topic!
> > Still haven't moved any further, just to know if anyone else is testing
> it,
> > to get some feedback on how the tests are going on.
> > Here is what I've done:
> > - Compiled OnFlashSystem for kernel 2.6.30.5 and removed 1-wire and spi
> > support to gain some of space for extra apps. Used the kernel command
> line:
> > 1st command is only necessary for BIFFBOOT<=V2 (really need to upgrade
> this
> > soon).
> > I've separated the commands with space, didn't thought that comma would
> > work!
> > It seems to work, during boot I got this:
> > *[ 0.948058] i2c-gpio i2c-gpio.0: using pins 12 (SDA) and 9 (SCL)*
> > I have started to read i2c documentation but couldn't get the necessary
> > concentration to make sense out of it, will need to review it another
> day.
> > Have compiled my old C code that I used on the OpenWrt to communicate
> > with the DS1721 and got it to compile under dietlibc to get some light
> apps.
> > Have sent this to bifferboard but it didn't work! OK, really need to get
> > back
> > to documentation to sort that out!
> > No tools available (i2cdetect) so will really need to rely on my digital
> > protocol
> > analyzer.
> > If someone has some useful tips, please feel free to share !!!
> > Regards,
> > Nelson.
> > On Sun, Sep 6, 2009 at 6:46 PM, biffe...@yahoo.co.uk
> > <biffe...@yahoo.co.uk>wrote:
> > > I have added these to the 2.6.30.5 kernel patch.
> I'll have a look into it, will probablly need some help from the Linux
> gurus,
> don't really know if its possible to get this tools compiled and get it
> passed
> through dietlibc to get a very small exe!
You could always just compile it static, and wget the file across to
your board, just to check it's working. You don't have to use
dietlibc yet. If you can't enum. the devices on the bus, then nothing
else will work, so it's certainly worth testing that first.
On Wed, Sep 9, 2009 at 2:13 PM, bifferos <biffe...@yahoo.co.uk> wrote:
> On Sep 9, 2:06 pm, Nelson Neves <nelson.s.ne...@gmail.com> wrote:
> > i2c-detect is part of the lm-sensors projecthttp://
> www.lm-sensors.org/wiki/I2CTools
> > I'll have a look into it, will probablly need some help from the Linux
> > gurus,
> > don't really know if its possible to get this tools compiled and get it
> > passed
> > through dietlibc to get a very small exe!
> You could always just compile it static, and wget the file across to
> your board, just to check it's working. You don't have to use
> dietlibc yet. If you can't enum. the devices on the bus, then nothing
> else will work, so it's certainly worth testing that first.
> OK, that's really a good point! Will stick to that! Thanks!
> ps: I'm having windowze software development training at the moment, so may
> brain
> is getting fried! The just hope that linux get it back again! Lol.
> On Wed, Sep 9, 2009 at 2:13 PM, bifferos <biffe...@yahoo.co.uk> wrote:
>> On Sep 9, 2:06 pm, Nelson Neves <nelson.s.ne...@gmail.com> wrote:
>> > i2c-detect is part of the lm-sensors projecthttp://
>> www.lm-sensors.org/wiki/I2CTools
>> > I'll have a look into it, will probablly need some help from the Linux
>> > gurus,
>> > don't really know if its possible to get this tools compiled and get it
>> > passed
>> > through dietlibc to get a very small exe!
>> You could always just compile it static, and wget the file across to
>> your board, just to check it's working. You don't have to use
>> dietlibc yet. If you can't enum. the devices on the bus, then nothing
>> else will work, so it's certainly worth testing that first.
But in any case, when dietlibc works it's not rocket science, when it
doesn't, it can be tricky to figure out what to do. Wait until you
see it fail before you start worrying! :-)
> OK, that's really a good point! Will stick to that! Thanks!
> ps: I'm having windowze software development training at the moment, so may
> brain
> is getting fried! The just hope that linux get it back again! Lol.
> On Wed, Sep 9, 2009 at 2:13 PM, bifferos <biffe...@yahoo.co.uk> wrote:
> > On Sep 9, 2:06 pm, Nelson Neves <nelson.s.ne...@gmail.com> wrote:
> > > i2c-detect is part of the lm-sensors projecthttp://
> >www.lm-sensors.org/wiki/I2CTools
> > > I'll have a look into it, will probablly need some help from the Linux
> > > gurus,
> > > don't really know if its possible to get this tools compiled and get it
> > > passed
> > > through dietlibc to get a very small exe!
> > You could always just compile it static, and wget the file across to
> > your board, just to check it's working. You don't have to use
> > dietlibc yet. If you can't enum. the devices on the bus, then nothing
> > else will work, so it's certainly worth testing that first.
> But in any case, when dietlibc works it's not rocket science, when it
> doesn't, it can be tricky to figure out what to do. Wait until you
> see it fail before you start worrying! :-)
> ... took me all of about 3 minutes. Longer to write this email :-).
> Good luck,
> Biff.
> On Sep 9, 2:22 pm, Nelson Neves <nelson.s.ne...@gmail.com> wrote:
> > OK, that's really a good point! Will stick to that! Thanks!
> > ps: I'm having windowze software development training at the moment, so may
> > brain
> > is getting fried! The just hope that linux get it back again! Lol.
> > On Wed, Sep 9, 2009 at 2:13 PM, bifferos <biffe...@yahoo.co.uk> wrote:
> > > On Sep 9, 2:06 pm, Nelson Neves <nelson.s.ne...@gmail.com> wrote:
> > > > i2c-detect is part of the lm-sensors projecthttp://
> > >www.lm-sensors.org/wiki/I2CTools
> > > > I'll have a look into it, will probablly need some help from the Linux
> > > > gurus,
> > > > don't really know if its possible to get this tools compiled and get it
> > > > passed
> > > > through dietlibc to get a very small exe!
> > > You could always just compile it static, and wget the file across to
> > > your board, just to check it's working. You don't have to use
> > > dietlibc yet. If you can't enum. the devices on the bus, then nothing
> > > else will work, so it's certainly worth testing that first.
> On Sep 9, 4:06 pm, bifferos <biffe...@yahoo.co.uk> wrote:
> > But in any case, when dietlibc works it's not rocket science, when it
> > doesn't, it can be tricky to figure out what to do. Wait until you
> > see it fail before you start worrying! :-)
> > ... took me all of about 3 minutes. Longer to write this email :-).
> > Good luck,
> > Biff.
> > On Sep 9, 2:22 pm, Nelson Neves <nelson.s.ne...@gmail.com> wrote:
> > > OK, that's really a good point! Will stick to that! Thanks!
> > > ps: I'm having windowze software development training at the moment, so
> may
> > > brain
> > > is getting fried! The just hope that linux get it back again! Lol.
> > > On Wed, Sep 9, 2009 at 2:13 PM, bifferos <biffe...@yahoo.co.uk> wrote:
> > > > On Sep 9, 2:06 pm, Nelson Neves <nelson.s.ne...@gmail.com> wrote:
> > > > > i2c-detect is part of the lm-sensors projecthttp://
> > > >www.lm-sensors.org/wiki/I2CTools
> > > > > I'll have a look into it, will probablly need some help from the
> Linux
> > > > > gurus,
> > > > > don't really know if its possible to get this tools compiled and
> get it
> > > > > passed
> > > > > through dietlibc to get a very small exe!
> > > > You could always just compile it static, and wget the file across to
> > > > your board, just to check it's working. You don't have to use
> > > > dietlibc yet. If you can't enum. the devices on the bus, then
> nothing
> > > > else will work, so it's certainly worth testing that first.
>> On Sep 9, 4:06 pm, bifferos <biffe...@yahoo.co.uk> wrote:
>> > But in any case, when dietlibc works it's not rocket science, when it
>> > doesn't, it can be tricky to figure out what to do. Wait until you
>> > see it fail before you start worrying! :-)
>> > ... took me all of about 3 minutes. Longer to write this email :-).
>> > Good luck,
>> > Biff.
>> > On Sep 9, 2:22 pm, Nelson Neves <nelson.s.ne...@gmail.com> wrote:
>> > > OK, that's really a good point! Will stick to that! Thanks!
>> > > ps: I'm having windowze software development training at the moment,
>> so may
>> > > brain
>> > > is getting fried! The just hope that linux get it back again! Lol.
>> > > On Wed, Sep 9, 2009 at 2:13 PM, bifferos <biffe...@yahoo.co.uk>
>> wrote:
>> > > > On Sep 9, 2:06 pm, Nelson Neves <nelson.s.ne...@gmail.com> wrote:
>> > > > > i2c-detect is part of the lm-sensors projecthttp://
>> > > >www.lm-sensors.org/wiki/I2CTools
>> > > > > I'll have a look into it, will probablly need some help from the
>> Linux
>> > > > > gurus,
>> > > > > don't really know if its possible to get this tools compiled and
>> get it
>> > > > > passed
>> > > > > through dietlibc to get a very small exe!
>> > > > You could always just compile it static, and wget the file across to
>> > > > your board, just to check it's working. You don't have to use
>> > > > dietlibc yet. If you can't enum. the devices on the bus, then
>> nothing
>> > > > else will work, so it's certainly worth testing that first.
> I had the idea the i2c-gpio-custom would create such device file ... hum,
> well it's something!
Yeah - I thought so too. But didn't you get this working with OpenWrt
once before? You can create these device files with mknod so long as
you know what minor/major device number to use.
> Yeah - I thought so too. But didn't you get this working with OpenWrt > once before? You can create these device files with mknod so long as > you know what minor/major device number to use.
This device files have to be created befor module i2c-gpio-custom is created right? If so, where should I do this?
In OpenWrt it was all working, just needed to load module!
Found some sites that used this:
mknod i2c-0 c 89 0 mknod i2c0 c 89 0 mknod i2c-1 c 89 1 mknod i2c1 c 89 1
not really sure if this should be the right configuration, should only require i2c-0 and/or i2c0 (I think). I tried to create it after booting, the files are created but when running i2cdetect -y 0: *Error: Could not open file `/dev/i2c-0': No such device or address* but it's there (probably no linked to module).
That is just my idea, I'm a bit of my knowledge, just speculating and trying to get it right!
ds1721 - will configure sensor - sets sensor in auto-update buffer mode (only required once for every boot ds1721_read - requests temperature from sensor buffer
To compile this you will also require to install dietlibc. Extract files with *tar zxvf* and then compile it with *make*.
Forgot to mention earlier, DS1721 chips is found by i2cdetect at 0x48 address, meaning that decimal value = 72. When using the compiled app. will use the decimal value!
This code is not optimized, the main purpose was for tests only. Use it at your own risc! To adapt it you will need to study your chip because they all differ from each other! Datasheets are your best friends :) !
> From: Nelson Neves <nelson.s.ne...@gmail.com>
> Subject: [bifferboard] Re: w1 and i2c support: Pin config via kernel command-line.
> To: bifferboard@googlegroups.com
> Date: Friday, September 11, 2009, 1:27 AM
> Source code attached here: http://sites.google.com/site/bifferboard/Home/howto/faster-route-to-k...
> Compiled applications are inside tar.gz file.
> Forgot to mention earlier, DS1721 chips is found by
> i2cdetect at 0x48 address, meaning that decimal value = 72.
> When using the compiled app. will use the decimal value!
> This code is not optimized, the main purpose was for tests
> only. Use it at your own risc! To adapt it you will need to
> study your chip because they all differ from each other!
> Datasheets are your best friends :) !
Haven't tested SPI, but it's a very simple protocol, just needs to shit-register data synchronized with clock, if there is some problem (that I don't think it would have) you can always emulate it from your code!
Nevertheless , whenever I have some free time I can test it with real hardware! Now I just want to make sure that i2c is running with no problems!
Again, if someone else can give it a run would be nice! If you don't have the hardware, you can always ask for free samples ;)
There are some nice notes here to adjust Voltage level from 3.3VDC to 5VDC (i2c lines from GPIO are 3.3VDC and normally the chip/sensors runt at 5VDC - I get the 5VDC from the Bifferboard power supply and the 3.3VCD from GPIO pin): http://www.sunspot.co.uk/Projects/SWEEX/i2c_notes.html
Regards, Nelson.
On Fri, Sep 11, 2009 at 1:15 PM, Jonathan Roozing <jrooz...@yahoo.com>wrote:
> It's good to see this progress.
> What about the spi driver?
> I'll need this in the near future.
> Regards,
> MRX
> --- On Fri, 9/11/09, Nelson Neves <nelson.s.ne...@gmail.com> wrote:
> > From: Nelson Neves <nelson.s.ne...@gmail.com>
> > Subject: [bifferboard] Re: w1 and i2c support: Pin config via kernel command-line.
> > To: bifferboard@googlegroups.com
> > Date: Friday, September 11, 2009, 1:27 AM
> > Source code attached here:http://sites.google.com/site/bifferboard/Home/howto/faster-route-to-k...
> > Compiled applications are inside tar.gz file.
> > Forgot to mention earlier, DS1721 chips is found by
> > i2cdetect at 0x48 address, meaning that decimal value = 72.
> > When using the compiled app. will use the decimal value!
> > This code is not optimized, the main purpose was for tests
> > only. Use it at your own risc! To adapt it you will need to
> > study your chip because they all differ from each other!
> > Datasheets are your best friends :) !
Somehow i had in mind that there were problems with spi too, so i didn't even try. Sorry about that. I want to use a VS1002. Now wireless is working
and i can play audio when it is decoded on my server (i use this all the time now) im quite convinced that i can turn the board into an mp3 player.
i first had the sta013 in mind, but i want the project to be available for everyboddy, this means no difficult soldering. So i found this: http://futurlec.com/Mini_MP3.shtml It looks very promising for a nice price. I dont have this board yet, but this will be my next project.
Greetz.
--- On Fri, 9/11/09, bifferos <biffe...@yahoo.co.uk> wrote:
> From: bifferos <biffe...@yahoo.co.uk>
> Subject: [bifferboard] Re: w1 and i2c support: Pin config via kernel command-line.
> To: "Bifferboard" <bifferboard@googlegroups.com>
> Date: Friday, September 11, 2009, 2:31 PM
> SPI-over-GPIO is working AFAIK. Which device are you
> talking about?
> On Sep 11, 1:15 pm, Jonathan Roozing <jrooz...@yahoo.com>
> wrote:
> > Hi,
> > It's good to see this progress.
> > What about the spi driver?
> > I'll need this in the near future.
> > Regards,
> > MRX
> > --- On Fri, 9/11/09, Nelson Neves <nelson.s.ne...@gmail.com>
> wrote:
> > > From: Nelson Neves <nelson.s.ne...@gmail.com>
> > > Subject: [bifferboard] Re: w1 and i2c support:
> Pin config via kernel command-line.
> > > To: bifferboard@googlegroups.com
> > > Date: Friday, September 11, 2009, 1:27 AM
> > > Source code attached here:http://sites.google.com/site/bifferboard/Home/howto/faster-route-to-k...
> > > Compiled applications are inside tar.gz file.
> > > Forgot to mention earlier, DS1721 chips is found
> by
> > > i2cdetect at 0x48 address, meaning that decimal
> value = 72.
> > > When using the compiled app. will use the decimal
> value!
> > > This code is not optimized, the main purpose was
> for tests
> > > only. Use it at your own risc! To adapt it you
> will need to
> > > study your chip because they all differ from each
> other!
> > > Datasheets are your best friends :) !
> Somehow i had in mind that there were problems with spi too, so i didn't
> even try. Sorry about that. I want to use a VS1002. Now wireless is working
> and i can play audio when it is decoded on my server (i use this all the
> time now) im quite convinced that i can turn the board into an mp3 player.
> i first had the sta013 in mind, but i want the project to be available for
> everyboddy, this means no difficult soldering. So i found this:
> http://futurlec.com/Mini_MP3.shtml It looks very promising for a nice
> price. I dont have this board yet, but this will be my next project.
> Greetz.
> --- On Fri, 9/11/09, bifferos <biffe...@yahoo.co.uk> wrote:
> > From: bifferos <biffe...@yahoo.co.uk>
> > Subject: [bifferboard] Re: w1 and i2c support: Pin config via kernel
> command-line.
> > To: "Bifferboard" <bifferboard@googlegroups.com>
> > Date: Friday, September 11, 2009, 2:31 PM
> > SPI-over-GPIO is working AFAIK. Which device are you
> > talking about?
> > On Sep 11, 1:15 pm, Jonathan Roozing <jrooz...@yahoo.com>
> > wrote:
> > > Hi,
> > > It's good to see this progress.
> > > What about the spi driver?
> > > I'll need this in the near future.
> > > Regards,
> > > MRX
> > > --- On Fri, 9/11/09, Nelson Neves <nelson.s.ne...@gmail.com>
> > wrote:
> > > > From: Nelson Neves <nelson.s.ne...@gmail.com>
> > > > Subject: [bifferboard] Re: w1 and i2c support:
> > Pin config via kernel command-line.
> > > > To: bifferboard@googlegroups.com
> > > > Date: Friday, September 11, 2009, 1:27 AM
> > > > Source code attached here:
> http://sites.google.com/site/bifferboard/Home/howto/faster-route-to-k...
> > > > Compiled applications are inside tar.gz file.
> > > > Forgot to mention earlier, DS1721 chips is found
> > by
> > > > i2cdetect at 0x48 address, meaning that decimal
> > value = 72.
> > > > When using the compiled app. will use the decimal
> > value!
> > > > This code is not optimized, the main purpose was
> > for tests
> > > > only. Use it at your own risc! To adapt it you
> > will need to
> > > > study your chip because they all differ from each
> > other!
> > > > Datasheets are your best friends :) !