| |
 |
|
 |
| |
|
dl4huf
|
Joined: 02 Oct 2006 Posts: 28
|
|
|
 |
|
 |
| |
Posted: Fri Jan 19, 2007 1:35 pm Post subject: I2C info |
|
|
In the latest svn toolchain the newest i2c driver are available.
With this driver you can use ANY gpio or switch led line for scl/sda !
Default is scl = gpio1 and sda = gpio3. This can changed in the kernelkonfig
or you load the driver with parameter "scl=x sda=y" for gpio x and y.
0..7 are the real gpios (depend on PLCC or BGA chip not all gpios are wired)
8..22 are the switch leds (3 leds per port, on BR6104K only 2 leds per port are connected !)
You must change with 4M-flash mod!
With use of the switch led lines its not needed to solder the very small ADM5120-pins.
You can load the driver several time, so you can drive several i2c-busses (-o paramter from insmod).
The i2c system is also updated to version 2.10.1.
To compile the lm_sensors tools please see on my site.
I have tested the tools i2cget, i2cset, eeprog, eeprom, eepromer, sensors and the driver for PCF8591 (4xADC/1xDAC) and LM75.
Libsensors is also available.
The lcd4linux can use the i2c to drive a lcd via a PCF8574(A).
My router now has a PCF8583 RTC and set the date/time on boot time
without internet connection.
Please do not forget the pullup-resistors ! The leds are NOT enough ! Solder a resistor in parallel. _________________ 2x Edimax BP6104K + USB-Mod
I2C-Bus with 40x2 LCD, RTC, ADC, DAC |
|
|
| Back to top |
|
|
 |
|
 |
 |
|
 |
| |
|
vlad Site Admin
|
Joined: 07 Aug 2005 Posts: 858
|
|
|
 |
|
 |
| |
Posted: Fri Jan 19, 2007 2:54 pm Post subject: |
|
|
| What you think, is possible to write kernel driver to implement serial interface via GPIO ? |
|
|
| Back to top |
|
|
 |
|
 |
 |
|
 |
| |
|
MRX Site Admin
|
Joined: 22 Nov 2006 Posts: 181 Location: The Netherlands |
|
|
 |
|
 |
| |
Posted: Fri Jan 19, 2007 3:06 pm Post subject: |
|
|
| dl4huf wrote: | | 4M-flash mod! |
what is this mod? using lager flash chips?
Is this possible for the br6104K? |
|
|
| Back to top |
|
|
 |
|
 |
 |
|
 |
| |
|
dl4huf
|
Joined: 02 Oct 2006 Posts: 28
|
|
|
 |
|
 |
| |
Posted: Fri Jan 19, 2007 6:22 pm Post subject: |
|
|
@vlad
Sorry Im a beginner for C programms and also a beginner for linux programming.
I dont know how to write a serial driver for linux.
My work with the i2c and the coming led driver is only to modify a existing (simple) source.
But I think its not possible without additional UART-chips or similar because
a bit-bang driver do not work without a clock line.
Linux do not give a guarantee for time slice.
With a clock line like in I2C or SPI bus its no problem.
For what do you need additional serial interfaces ?
The next I will try to modify the mmc driver from WRT54. I hope its a
workaround for the "two usb devices problem". Then a usbserial converter can use better.
Other question, do you know the needed value for gpio 3 and 5 initializing with the 4M-flash mod ? I have no answer from dac922.
@MRX
Yes,
please see http://midge.vlad.org.ua/forum/viewtopic.php?t=350 and
http://translate.google.com/translate?u=http%3A%2F%2Fmidge.vlad.org.ua%2Fforum%2Fviewtopic.php%3Ft%3D450%26postdays%3D0%26postorder%3Dasc%26start%3D0&langpair=ru%7Cen&hl=en&ie=UTF8
The patch I have seen in the svn trunk, but I have no device or flash chip to test. _________________ 2x Edimax BP6104K + USB-Mod
I2C-Bus with 40x2 LCD, RTC, ADC, DAC |
|
|
| Back to top |
|
|
 |
|
 |
 |
|
 |
| |
|
dac922
|
Joined: 29 Sep 2006 Posts: 17
|
|
|
 |
|
 |
| |
Posted: Sat Jan 20, 2007 9:09 am Post subject: |
|
|
| dl4huf wrote: | Other question, do you know the needed value for gpio 3 and 5 initializing with the 4M-flash mod ? I have no answer from dac922.
|
If you want an answer you should ask me first Just write a PM or use ICQ 159385600 (prefered). |
|
|
| Back to top |
|
|
 |
|
 |
 |
|
 |
| |
|
Sunspot Site Admin
|
Joined: 17 Mar 2006 Posts: 148 Location: New Forest, UK |
|
|
 |
|
 |
| |
Posted: Sat Jan 27, 2007 7:23 pm Post subject: |
|
|
I have made some simple test programs for driving these i2c chips -
1) LM75 thermometer
2) PCF8574 8 line port - set output lines
3) PCF8574 8 line port - read output lines
4) PCF8591 A/D and D/A - read one of 4 A/D lines and write to the D/A pin
All for any i2c bus address
You need the basic dl4huf i2c set-up on the Sweex/Edimax router
See pull down menu item 6 of my site below _________________ http://www.sunspot.co.uk/Projects/sweexproject.htm |
|
|
| Back to top |
|
|
 |
|
 |
| Page 1 of 1 |
All times are GMT
|
 |
|
 |
| |
|
|
 |
|
 |
| |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
 |
|
 |
|
|
Adv:
|
|
|
|