Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 01:04 04 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 : Micromite Master / Slave

Author Message
halldave

Senior Member

Joined: 04/05/2014
Location: Australia
Posts: 121
Posted: 12:13pm 18 May 2014
Copy link to clipboard 
Print this post

Can I use 3 Micromites, 1 of them the master, communicating to two slaves communicating through the COM1: and COM2: on the Master, as I want to use the i2c for Real Time Clock on the master

The idea is I will have 17 ports available on Slave 1
17 ports available on Slave 2
and 15 ports available on master

Each of the slaves will control 8 Zone alarm I/O (with Zone doubling to 16)

The master will interface with keypad, RTC, LCD, Ethernet, 2 x relays


Is anyone else working on Home Security, i'm happy to share my eagle schematics

regards

David
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5912
Posted: 05:08pm 18 May 2014
Copy link to clipboard 
Print this post

If you want to multidrop the serial lines, you will need to run the slaves with the 'OC' option and a pullup resistor to allow all 3 slaves share the 'reply' bus.
The master TX can be connected to the 3 slave Rx pins without any difficulty.

Even with the RTC on the master, you can easily run the 3 slaves off the I2C. Just give them different addresses. The RTC doesn't need to be interrogated very often.

I would use I2C if the modules are close together and look at RS232 if there is a long (more than a few metres) connection path to contend with.

Jim



VK7JH
MMedit   MMBasic Help
 
halldave

Senior Member

Joined: 04/05/2014
Location: Australia
Posts: 121
Posted: 07:48pm 18 May 2014
Copy link to clipboard 
Print this post

Jim,

Thanks for the suggestion

Looks like I need to do further reading and playing.

All three Micromite chips will be on the same board. Ill breadboard it with pullups to have a play.

One quick question if the RTC is now on the bus, I would now think that all three Micromites will be able to get the RTC? Ill play and see what happens, hopw to get my RTC chips next week

regards

David
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5912
Posted: 08:03pm 18 May 2014
Copy link to clipboard 
Print this post

The micromite's internal clock keeps reasonable time. When I want better, I update it from the RTC every 5 or 10 minutes.
The main thing to remember - you can only have one I2C master active at any time.
I would leave it with one master and get it to update the slave uMites with the correct time.
If you are polling the slaves looking for changes, you may not have much use for the actual time on the slaves anyway. There is nothing worse than different parts of your system running on different times.

Jim
VK7JH
MMedit   MMBasic Help
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 08:05pm 18 May 2014
Copy link to clipboard 
Print this post

Yes, I agree with Jim. I2C would be a preferable way to do what you are wanting, as this is more-or-less what I2C was designed for, so I understand.

Yes, all chips SHOULD be able to access the RTC, if the RTC is on the I2C bus - it's just a matter of addressing the RTC, and reading or writing to it.

The normal way with RTC's, is that it will talk back to the master, so not sure if it is possible for a slave I2C device, to read or write to the RTC, but someone else more in the know here would be able to clear that up.
Smoke makes things work. When the smoke gets out, it stops!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 08:06pm 18 May 2014
Copy link to clipboard 
Print this post

  TassyJim said  There is nothing worse than different parts of your system running on different times.

Jim


...a very good point...
Smoke makes things work. When the smoke gets out, it stops!
 
hitsware
Guru

Joined: 23/11/2012
Location: United States
Posts: 535
Posted: 11:08pm 18 May 2014
Copy link to clipboard 
Print this post

> There is nothing worse than different parts
> of your system running on different times.

Say I wanted 6 pwms and used 2 slaves as above ....
Can the clocks of the slaves be synced to the master
so that all pwms would be in precise tune ?
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 11:24pm 18 May 2014
Copy link to clipboard 
Print this post

No, you cannot sync them. The internal oscillator used by each Micromite would have a different phase and a slightly different frequency compared to the others.

Note that this is difference from the real time clock (time of day) for each chip which can be synchronised reasonably closely.

Geoff
Geoff Graham - http://geoffg.net
 
hitsware
Guru

Joined: 23/11/2012
Location: United States
Posts: 535
Posted: 04:31pm 19 May 2014
Copy link to clipboard 
Print this post

  Geoffg said   No, you cannot sync them. The internal oscillator used by each Micromite would have a different phase and a slightly different frequency compared to the others.

Note that this is difference from the real time clock (time of day) for each chip which can be synchronised reasonably closely.

Geoff

There's no pin connected in any way
to the oscillators ?

But some software adjustment ?

> Note that this is difference from
> the real time clock (time of day)
> for each chip which can be
> synchronised reasonably closely.

Gotcha ...
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 07:02pm 19 May 2014
Copy link to clipboard 
Print this post

  hitsware said  There's no pin connected in any way
to the oscillators ?


No, not in the configuration that the Micromite uses.

Geoff
Geoff Graham - http://geoffg.net
 
Print this page


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

© JAQ Software 2024