i2c byte/word adress

pleiser

Senior Member
Hi, I am planning to make a laptop (similar to http://chrisfenton.com/diy-laptop-v2/ (or maybe version 1)) and want to have both 2 of these eeproms( http://www.techsupplies.co.uk/epages/Store.sf/en_GB/?ObjectPath=/Shops/Store.TechSupplies/Products/MIC051 ) and a RTC ( http://www.techsupplies.co.uk/epages/Store.sf/en_GB/?ObjectPath=/Shops/Store.TechSupplies/Products/MIC055 ) but saw that the eeproms use word addresing (i2cword) and the clock uses byte addresing so I was wondering if i could use them both on the same i2c bus.
thanks.
 

inglewoodpete

Senior Member
Yes, the DS1307 RTC and 24LC512 can be used together on the same i2c bus. I have a data logger that I built with that combination. I used a 20X2 as the processor but you could use any PICAXE that can be configured as an i2c master (any -M2, -X, -X1 or -X2 PICAXE).
 

matherp

Senior Member
The following code snippet shows how I use a24LC512 EEPROM in a circuit that also uses byte addressed i2c chips
Code:
symbol clock=%11010000
symbol ADC = %11011000
symbol SEEPROM=%10100000
symbol scratch1=b51
symbol scratch=b50
symbol scratchword0= w25
hi2csetup i2cmaster, clock, i2cslow_64, i2cbyte
scratchword0=0 'address in eeprom
hi2cout [SEEPROM],(scratch1,scratch) 'send out the word address
hi2cin [SEEPROM],(cjconverthigh,cjconvertlow)' read in the data
Writing is even easier, just used the word address as the first two bytes of the data
 
Last edited:

westaust55

Moderator
where there are different type of I2c device such as you as considering that need different address lengths to access locations you just need to use the HI2CSETUP command before the different device types.

where there are several EEPROMs they are all of the same type so if you have an X1 or X2 PICAXE part, you just need to change the slave address within the HI2COUT command.
Syntax: HI2COUT [newslave],location,(variable,...)

Note that the DS1307 is a slow device whereare EEPROM arecapable of fast i2c comms. The i2c bus should opnly operate at the speed of the slowest attached device to avoid possible problems.
An option is to use a DS1338 instead of the DS1307. it is an electrically identical part but capable of the faster i2c comms rate however only available in SMD SOIC package format.
 

pleiser

Senior Member
thanks, good to know i can use both addressing lenghts, I will look into that ds1338. edit: would it be any more difficult to use the ds1338 in SMD SOIC format on a stripboard?
 

nick12ab

Senior Member
would it be any more difficult to use the ds1338 in SMD SOIC format on a stripboard?
If you use the 8-pin package then you can solder resistor offcut legs to each pin and bend them to fit in the stripboard. Using a second piece of stripboard and working on the solder side helps.

[HR][/HR]
Here's an example of SMD EEPROM and FRAM chips soldered on to stripboard. The address pins are soldered together as they only needed to be accessed one at a time.

 
Last edited:

westaust55

Moderator
Try a search for DIP8 to SOIC8 adapters.

Ther are some compact DIP to SOIC adapter boards available out there and others that are twice the area.
I long ago bought a handful of the 8 pin boards which are almost no larger than an 8pin DIP package.

You solder the IC to the adapter and header pins into the holes along the board edges for the more usual 2.45 mm (0.1 inch) pin spacing for use in breadboards, on stripboard, etc.

For example, Sparkfun sell one: http://www.sparkfun.com/products/494

Post 6 here shows the more compact version I bought through Ebay ages ago: http://www.picaxeforum.co.uk/showthread.php?9611-Build-your-own-SOIC8-to-DIP8-ADapter
Here is a current Ebay source at 10 for US$4 + P&P: http://www.ebay.com/itm/10-pc-SOIC-8-to-DIP-8-Narrow-PCB-SMD-Adapter-to-DIP-/400221127543?pt=LH_DefaultDomain_0&hash=item5d2f09c377
 
Last edited:

westaust55

Moderator
Correct Beb101, and I have purchased 14 pin and larger from Futurlec in the past.
Don't believe they have an 8 pin version (or it was of the rather large variety).
 
Last edited:

beb101

Senior Member
westaust55,

See SOIC8 second from the top,

http://www.futurlec.com/SMD_Adapters.shtml

These are not very high quality (e.g.not FR-4), but they get the job done if you are not too heavy handed with the soldering iron. I ruined a SOT23 trying to fix a header. I ordered a varied assortment on april 9. My email query 2 days ago was answered with; "waiting on supplier".

But they are cheap ...

Baxter
 

papaof2

Senior Member
I've used Futurlec's SOIC-DIP adapters to mount FRAM to be plugged into the EEPROM socket on the 28/40 PICAXE board.
I use a large magnifier with a built-in light and an adjustable soldering iron with a very small tip - tapers to about the size of a sewing machine needle.
 
Top