Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

PIC Basic I2C "network"

Status
Not open for further replies.

carrotts

Member level 1
Joined
Jan 31, 2002
Messages
40
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
298
picbasic i2c

I am developing a system that needs to be expandable. The system uses PIC micro (16F876), and simply counts input pulses and stores values to external I2C memory. The system can contain several of these counter devices. One main PIC then collects info from the Counter PICs and/or I2C memory and passes this data to a PC via a RS232 Link. The main PIC is used so that the counter PICs are not stopped counting whilst passing data. I am using PIC basic Plus, and can get a counter PIC to talk to I2C. The difficulty comes when trying to talk between two PIC's, as both want to be master devices. Does anyone have any suggestions?
Thanks in advance

Carrotts
 

meax98

Full Member level 3
Joined
Nov 25, 2001
Messages
180
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
1,793
pic i2c network

Try this one, you will get the picture.

regards
meax98
 

meax98

Full Member level 3
Joined
Nov 25, 2001
Messages
180
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
1,793
i2c picbasic

this is it:

meax98
 

carrotts

Member level 1
Joined
Jan 31, 2002
Messages
40
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
298
basic i2c

Looks good. I'll try it out later ans tell you how i get on.

thanks a lot

carrotts
 

carrotts

Member level 1
Joined
Jan 31, 2002
Messages
40
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
298
i2c basics

Thanks for the programs, but unfortunately I'm using a different PIC basic. I am using crownhill. I could though follow the listings, and even found a couple of progs for my PIC basic that did the same thing. The listings make sense, but I am struggling to communicate between two PICs still. I am simulating in proteus. The problem seems to be with addressing, but I am not sure. Which registers should I be interested in, I have a watch on all SSP registers, and very little seems to happen on them.
I've looked at a few app notes on microchips site, but they don't explain the addressing side very well.

All help appreciated.


Carrotts
 

huahua

Member level 2
Joined
Sep 21, 2002
Messages
42
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
263
16f876 i2c problem

Config one PIC as master I2C Device and the rest as slaves. The master polls the slaves one by one.

Hope it helps
 

carrotts

Member level 1
Joined
Jan 31, 2002
Messages
40
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
298
example config i2c pic

Thanks, but I'm not sure how i config them like that, do I use the registers?
 

Stark

Member level 2
Joined
Aug 10, 2001
Messages
51
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
342
ic2 picbasic

I think the better solution is to build a LIN network structured on particular message to permit communication with master and between to slave too.
Stark
 

Stark

Member level 2
Joined
Aug 10, 2001
Messages
51
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
342
picbasic+i2c

I think the better solution is to build a LIN network structured on particular message to permit communication with master and between slave too.
Stark
 

Aircraft Maniac

Member level 5
Joined
May 18, 2002
Messages
80
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
656
pic i2c bus network

Try

www.rentron.com

They have lots of stuff on PIC microcontrollers and their interfacing with PC aswell as with each other

Hop it helps

Aircraft Maniac
 

carrotts

Member level 1
Joined
Jan 31, 2002
Messages
40
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
298
picbasic i2c

thanks for all the help folks

Great links, best get my reading head on. Nice to people will lend a helping hand

Regards
And a Merry Christmas to one and all
Carrotts
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top