Is it posible? 2 picaxe on same socket, and 2 picaxe on same i2c EEPROM

Flitch

New Member
Hello Picaxe forum,

I am wondering if this cases are posible?

1. conecting 2 or more picaxes on same socket with common tx and switch to chose if picaxe1 or picaxe2 will get programed (and would ser txd work with more chips on same wire if you make sure that they dont talk in same time)

2.Would 2 picaxe (20m2) and 1 memory (i2c eeprom) work on same bus? what are conditions to make it work?


Picaxe forum question comon tx.pngMemory 2pa.png

Regards,
Filip
 

Captain Haddock

Senior Member
With the switch arrangement I would imagine the programming side would be fine, I have had multiple picaxes on one breadboard just swapping the serin flylead as needed no problem, as with the i2c you'd probably need a link between picaxes to make sure they don't communicate at the same time.(ie pull it high while communicating and drop low when free or similar)
 

westaust55

Moderator
You will need a 2-pole switch and switch both the SerialIn and the Serial Out pins of the PICAXE chips.
When a program is downloaded, there is also "feedback form the PICAXE to the PC/Programing Editor so that a valid download can be checked etc.

PICAXE chips are intended to operate with only one Master for the I2C comms bus.
It may be possible IFF (IF and only iF) you incorporate some hand shaking to ensure only one PICAXE chip uses the i2c comms bus at a given time.
 

AllyCat

Senior Member
Hi,

The selection "Switch" must be (at least) on the Serial/Programming Output pins. Otherwise, programming cannot work and connecting two outputs together may cause damage.

To "share" the I2C bus you need a connection between the two Masters so that one can "claim" the bus and prevent the other trying to use it. The simplest method is to "wire or" a corresponding pin on the two Masters, then a Master wishing to use the bus checks that the pin is not already pulled low by the other, and pulls it low itself if the bus is free. Of course problems can still arise if both Masters try to claim the bus at exactly the same time, so some method of validation and recovery may still be needed. Therefore a separate "Request - Acknowledge" interface between the Masters may be preferable.

Cheers, Alan.
 

Flitch

New Member
All picaxes in project are conected on serial bidiretcional onewire bus (as in link bellow) so chosing i2c master is not problem. Also thanks for fast feedback.
Thanks everyone :D
P.S. Request for westaust55: Pls check your nokia 1100 glcd tread on finished projects, i have posted some questions there, it would be nice if you could answer. Thx

http://drvernacula.topcities.com/picaxe_bidrectional_bus.htm
Eddit: fixed broken link
 

Flitch

New Member
hmm, how about making 1 picaxe master of i2c, eeprom slave1 and other picaxe slave2, so when picaxe 2 needs something from eeprom, picaxe master drains it from eeprom, and returns on same buss but to picaxe slave adress, would that work also?
 

hippy

Ex-Staff (retired)
hmm, how about making 1 picaxe master of i2c, eeprom slave1 and other picaxe slave2, so when picaxe 2 needs something from eeprom, picaxe master drains it from eeprom, and returns on same buss but to picaxe slave adress, would that work also?
It would but you have to use a PICAXE which can act as an I2C Slave ( 20X2, not 20M or 20M2 ) and the slave cannot directly initiate a transfer from the master, the master would need to check if the slave wanted data. That could make the protocol somewhat complicated as well as possibly posing challenges in integrating that with other program code.

If you have a shared serial bus the data could be transferred over that alleviating the need for an I2C slave PICAXE.

It may be worth taking a step back and detailing what the project is intended to achieve. There may be simpler means to do that than needing multiple PICAXE and shared buses.
 
Top