Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 03:59 18 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : i2c bus and mmbasic

Author Message
plasma
Guru

Joined: 08/04/2012
Location: Germany
Posts: 437
Posted: 12:53pm 28 Dec 2013
Copy link to clipboard 
Print this post

Hi ,

is anyone using a i2c device on the maximite ?
i need to expand my i/o and think about a i2c expander.

http://www.ebay.com/itm/MCP23017-16bit-I2C-I-O-Expander-boar d-for-Arduino-and-RaspberryPi-/281218142347

thx
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 04:14pm 28 Dec 2013
Copy link to clipboard 
Print this post

Hi Plasma,

Using I2C is easy and there are many devices "out there". What sort of I/O are you thinking of using? Digital or ADC.

Some years ago I created my own I2C slave devices mostly based on the PIC16F88(819), so I have layout and HEX code for both digital and ADC if you are interested.

As a matter of interest, any device you have that produces a digital result can be turned into a I2C device. e.g. I designed a simple frequency counter and fed the frequency data to a pic which transferred the data to a picaxe using the I2C bus. The picaxe was the I2C master but MM will work just as well.

If you are prepared to go down that track, I'm willing to help. Otherwise, as I said, there are plenty of commercial devices available.


David M.
 
plasma
Guru

Joined: 08/04/2012
Location: Germany
Posts: 437
Posted: 04:57am 30 Dec 2013
Copy link to clipboard 
Print this post

wow what an offer.
i need to expand my maximite output pin to 64 bit over i2c.
i found some cheap devices on ebay but iam really interest in your offer.
if you have some layouts, codefiles or links for me ?
i find i2c is a cool way to expand the features of any board.
thanks .
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 12:10pm 30 Dec 2013
Copy link to clipboard 
Print this post

@Plasma,

Do you have facilities to make your own PCBs and are you able to programme PIC16F88 chips?

If not, then it is probably easier to stay with commercial data expanders like the Philips PCF8574 or 574A. The 8574 will allow up to 8 digital data expanders at the same base address (it has 3 user configurable address pins) that will give you 8 lots of 8 bit I/o ports - 64 bits.

Have you used the I2C function on the MaxiMite before?

Meanwhile. I'll dig out my designs from my archives. I think I did a PIC88 based 7 port I2C ADC on this web site some time ago as well.
David M.
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 05:28pm 31 Dec 2013
Copy link to clipboard 
Print this post

@Plasma

I downloaded the data sheet for the MCP23017. It looks like a very useful and versatile chip for digital I/O. It runs on the 7bit address so is easy to interface to MM Basic. I will put in an order for a couple when Chinese new year is over as they tend to go into "go slow" mode over that period.

Being a 16 bit chip means that you can get 64 bit I/O with only 4 chips.

There is quite a bit to digest when it comes to the manipulation of the control registers but not insurmountable.


David M.
 
plasma
Guru

Joined: 08/04/2012
Location: Germany
Posts: 437
Posted: 12:26am 02 Jan 2014
Copy link to clipboard 
Print this post

Hi ,

ive ordered one on ebay and hope i can play with next week.
reading the datasheet from the mcp23017 is a good idea because i need to build my own modules
with.
16 bit extra i/o with one chip is great . So much possibilities with Geoffs new Baby if it available.
and yes 64 bit with only 4 chips is great but iam thinking also about using a second prozessor
( our maximite chip ) for a maximum io on i2c or spi .
the source code from mmbasic is open so i need to learn this also.
great times for hobby programmer as me .....
cant wait...
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 12:48am 02 Jan 2014
Copy link to clipboard 
Print this post

@Mobi,

I have two extra MCP23018-E/SO (28 pins soic) lying around.
The MCP23018 has 5.5v tolernt inputs making interfacing with other electronics a little easier.
If you want them, they're yours. Just send me a PM and i put them in the mail.

I am also interested in using them, sharing experiences and code would be great.
Edited by TZAdvantage 2014-01-03
Microblocks. Build with logic.
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024