RTC for Miac(Part One)
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
RTC for Miac(Part One)
Hi,
Does anybody have a schematic for RTC for Miac please...
thanks in advance
Acestu
Does anybody have a schematic for RTC for Miac please...
thanks in advance
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: RTC for Miac
Hi Stuart,
MIAC has it's CAN transceiver on board..so you will see MIAC has two connection point labeled L and H which are for CAN bus. You can follow this datasheet..
http://www.matrixmultimedia.com/resourc ... C-60-2.pdf
But you have to follow the following link for more about MIAC hardware...
http://www.matrixmultimedia.com/resourc ... -guide.pdf
In page 11 of above document, you will see MIAC already has MCP2551 in it which produces CAN bus and this is needed to be connected with your RTC custom module.
You need to know a bit about CAN bus before proceeding to use that. One important issue is terminating impedance..If you have only MIAC and RTC module in the CAN bus in that case it's pretty straight forward..You can simply connect TA and TB of MIAC to have that terminating resistor in act(which actually connect 120 ohm resistor between L & H line of CAN bus)..but in RTC module end you will need to put.
I am suggesting you to read carefully the operation and programming guide..At the same time if you have RTC module in hand and PIC18f4580 or 458, you can try to interface RTC with the PIC. If you need help for that please let me know.. John's post on RTC is a good point to start
MIAC has it's CAN transceiver on board..so you will see MIAC has two connection point labeled L and H which are for CAN bus. You can follow this datasheet..
http://www.matrixmultimedia.com/resourc ... C-60-2.pdf
But you have to follow the following link for more about MIAC hardware...
http://www.matrixmultimedia.com/resourc ... -guide.pdf
In page 11 of above document, you will see MIAC already has MCP2551 in it which produces CAN bus and this is needed to be connected with your RTC custom module.
You need to know a bit about CAN bus before proceeding to use that. One important issue is terminating impedance..If you have only MIAC and RTC module in the CAN bus in that case it's pretty straight forward..You can simply connect TA and TB of MIAC to have that terminating resistor in act(which actually connect 120 ohm resistor between L & H line of CAN bus)..but in RTC module end you will need to put.
I am suggesting you to read carefully the operation and programming guide..At the same time if you have RTC module in hand and PIC18f4580 or 458, you can try to interface RTC with the PIC. If you need help for that please let me know.. John's post on RTC is a good point to start
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: RTC for Miac
Hi Stuart,
I would like to add that if you want to connect a RTC up directly to a MIAC, with no can skills at all (you don't even have to drag a CAN component macro on to your flowchart, as the can part is already built in and woks behind the scenes) then there is the MIAC Advance expansion Module:
http://www.matrixmultimedia.com/product ... PHPSESSID=
I have created a flowchart that works with MIAC Advance expansion Module to enable you to set time and date which I can post if your interested.
I would like to add that if you want to connect a RTC up directly to a MIAC, with no can skills at all (you don't even have to drag a CAN component macro on to your flowchart, as the can part is already built in and woks behind the scenes) then there is the MIAC Advance expansion Module:
http://www.matrixmultimedia.com/product ... PHPSESSID=
I have created a flowchart that works with MIAC Advance expansion Module to enable you to set time and date which I can post if your interested.
Martin
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: RTC for Miac
But Martin I guess you missed Stuart's earlier post regarding RTC in MIAC..he wants have a cheap solution.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: RTC for Miac
Hello,
For my two pence you could always use a timer interrupt on the MIAC to monitor the passing of time. Obviously if the power goes off then the time and date will have to be reconfigured but this is the cheapest solution. The next best option would probably be to get a low cost CAN based RTC module (if they exist) though there might be other options.
For my two pence you could always use a timer interrupt on the MIAC to monitor the passing of time. Obviously if the power goes off then the time and date will have to be reconfigured but this is the cheapest solution. The next best option would probably be to get a low cost CAN based RTC module (if they exist) though there might be other options.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: RTC for Miac
Thanks for the ideas guys, I created this post knowing that Enamul was going to show me how to build a canbus rtc module for the MIAC, we agreed to do a post in this section so that it would be helpful to others. Enamul has already given me a shopping list of components which I have now received in the post. It should be a handy post for a lot of people and I can't wait to get started....
Thanks to all
Acestu
Thanks to all
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: RTC for Miac
Hi Enamul, you mention John's thread on RTC, do you have a link for that please.
thanks
Acestu
thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: RTC for Miac
Hi Stuart,
The following link is for John's thread...
http://www.matrixmultimedia.com/mmforum ... hilit=+rtc
I have attached here a schematic for RTC module interfacing with PIC...
LCD is connected to PORTD so that PORTB remains free as CAN bus is in PORTB.
In the code there is macro called FIRST_TIME in which you can set initial time which will be tracked by EEPROM..so if power cut happened and RTC module has it's coin battery..Time will be maintained and next time when powers up you will see real time.
The following link is for John's thread...
http://www.matrixmultimedia.com/mmforum ... hilit=+rtc
I have attached here a schematic for RTC module interfacing with PIC...
LCD is connected to PORTD so that PORTB remains free as CAN bus is in PORTB.
In the code there is macro called FIRST_TIME in which you can set initial time which will be tracked by EEPROM..so if power cut happened and RTC module has it's coin battery..Time will be maintained and next time when powers up you will see real time.
- Attachments
-
- RTC.png
- (25.38 KiB) Downloaded 13083 times
-
- RTC_PIC18f4580.fcf
- (42.82 KiB) Downloaded 451 times
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: RTC for Miac
Hi Enamul,
On your schematic the ds1307 connections are different than my connections on the RTC module that i bought, I will post a pic of it so you can see what i mean..
I have SDA but not the SCK
thanks
acestu
On your schematic the ds1307 connections are different than my connections on the RTC module that i bought, I will post a pic of it so you can see what i mean..
I have SDA but not the SCK
thanks
acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: RTC for Miac
Hi Stuart,
SCK and SCL are same; so SCL will be connected to RC3 and SDA will be connected to RC4 and make sure that both are pull up to Vcc (+5v) by 4.7 K (which should be already in your RTC module that's why I haven't shown in diagram)
SCK and SCL are same; so SCL will be connected to RC3 and SDA will be connected to RC4 and make sure that both are pull up to Vcc (+5v) by 4.7 K (which should be already in your RTC module that's why I haven't shown in diagram)
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: RTC for Miac
Sorry, I did not read that post prior to reading first post within this thread.Enamul wrote:But Martin I guess you missed Stuart's earlier post regarding RTC in MIAC..he wants have a cheap solution.
Martin
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: RTC for Miac
Thanks Enamul
I will have a go at building this on a breadboard tomorrow
Acestu
I will have a go at building this on a breadboard tomorrow
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: RTC for Miac
That's ok Martin, the more suggestions the better for me, I was going to ask you about your expansion module method anyway ie:
"I have created a flowchart that works with MIAC Advance expansion Module to enable you to set time and date which I can post if your interested."
cheers
Acestu
"I have created a flowchart that works with MIAC Advance expansion Module to enable you to set time and date which I can post if your interested."
cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: RTC for Miac
@Martin,
No problem No doubt that the expansion modules will make life much easier. I have a look in the operation guide and seems me superb modules.
This thread is actually Stuart has made to have idea about RTC without expansion modules. I could reply him in PM but I want to have expert opinions like MM and you guys.
@Stuart,
I guess you will be using your new HP-488 Board for programming the PIC IC. There is a 18f4580.FCD fix for PORTD LCD in minor fix list if you didn't download that yet..
No problem No doubt that the expansion modules will make life much easier. I have a look in the operation guide and seems me superb modules.
This thread is actually Stuart has made to have idea about RTC without expansion modules. I could reply him in PM but I want to have expert opinions like MM and you guys.
@Stuart,
I guess you will be using your new HP-488 Board for programming the PIC IC. There is a 18f4580.FCD fix for PORTD LCD in minor fix list if you didn't download that yet..
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: RTC for Miac
Thanks Enamul, I will have a look for that fix now
cheers
Acestu
cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: RTC for Miac
Where would I find that fix Enamul, I have tried a search and looked in the forum but I can't find it...
thanks
Acestu
thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: RTC for Miac
Hi Stuart,
Here is the link for FCD fix...
http://www.matrixmultimedia.com/mmforum ... 46&t=11000
and this is for all minor fix..
http://www.matrixmultimedia.com/mmforum ... 46&t=11214
Here is the link for FCD fix...
http://www.matrixmultimedia.com/mmforum ... 46&t=11000
and this is for all minor fix..
http://www.matrixmultimedia.com/mmforum ... 46&t=11214
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: RTC for Miac
Hi Enamul, thinking about it will I need these fixes because I have only just bought Flowcode 5 and it is version 5.4.
thanks
Acestu
thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: RTC for Miac
Actually your version I think is 5.4 what you bought. Although you bought recently, still you need those fix as in next release may be 5.5 or later those fixes are going to be effective..so your version is same as us..And need those fix.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: RTC for Miac
Ok I will update it tomorrow...
thanks
Acestu
thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: RTC for Miac
Hi Enamul, I downloaded the fixes but how do I install them, do I just overwrite the originals in the Flowcode folder ?
thanks
Acestu
thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: RTC for Miac
Hi,
In the Flowcode folder you will get an FCD folder..just overwrite the existing one with the new one..I guess you did that right..
In the Flowcode folder you will get an FCD folder..just overwrite the existing one with the new one..I guess you did that right..
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: RTC for Miac
HI Enamul, No I haven't done it yet I thought I would ask you first, I will do it now.
Thanks
Acestu
Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: RTC for Miac
Hi Enamul, I think I may have the wrong chip, it says pic18f458-I/P on it and not pic18f4580 when I try to programme it with my pickit 3 it says invalid device, have you any ideas ?
thanks
Acestu
thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: RTC for Miac
Hi,
That's why I asked you earlier which one you bought. I will change the code and check fcd and config..Just wait for a while..
That's why I asked you earlier which one you bought. I will change the code and check fcd and config..Just wait for a while..