RTC for Miac(Part One)

For MIAC users to discuss projects, applications, and any other issues related to the MIAC unit.

Moderators: Benj, Mods

User avatar
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(Part One)

Post by acestu »

Thanks Enamul,

I am reprogramming them right now.

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.

User avatar
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(Part One)

Post by acestu »

Hi Enamul,

I have reprogrammed the chips and the Master says "Master RTC Unit" but the Slave still says nothing /

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.

User avatar
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(Part One)

Post by Enamul »

Hi Stuart,
Even if any issue in other stuff..you should at least see Time and date written in LCD. Please check your RTC module connection. I can't get anything wrong anywhere.
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
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(Part One)

Post by Enamul »

Hi,
Have you used pull-up 4.7K resistors in SCK and SDA for RTC module?
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
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(Part One)

Post by acestu »

Hi Enamul,

I can't see anything wrong with the rtc connection , I have just put the pull up resistors in but still the same.

I am uploading some pics

thanks
Acestu
rtc_connect.jpg
rtc_connect.jpg (81.15 KiB) Viewed 14049 times
lcds.jpg
lcds.jpg (64.28 KiB) Viewed 14049 times
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.

User avatar
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(Part One)

Post by Enamul »

Hi stuart,
Can you just test your slave module like the one you have posted before..
Attachments
RTC_working.jpg
(88.05 KiB) Downloaded 4166 times
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
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(Part One)

Post by acestu »

Ok,

I will put the rtc module back on that breadboard and try it

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.

User avatar
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(Part One)

Post by acestu »

Success at last RTC module 1 wire in wrong pin....

Thanks
Acestu
success.jpg
success.jpg (58.98 KiB) Viewed 14047 times
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.

User avatar
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(Part One)

Post by Enamul »

Ok. great!
Is your CAN bus now connected?We should be able to see Time and Date in Master as well.
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
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(Part One)

Post by acestu »

The Canbus is all connected up but the Master still says "Master RTC Unit"

Do the unused terminals on the MCP2551 need to be grounded ?

Also I have 100 ohm resisters on the Canbus thats what I used on the other unit

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.

User avatar
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(Part One)

Post by Enamul »

You have tested CAN transmission earlier between Master and slave using LM35Dz as far I can remember..connection of CAN bus should be same as that..only addition is RTC module in slave which is working fine now.
OK, I have checked all my connections and found both mcp chips pins 5 to 8 back to front, I changed them and now it is sending info and returning info
Last time you did so..can you please check now MCP 2551 wiring and way it positioned.
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
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(Part One)

Post by acestu »

As far as I can see Enamul, I have the Can bus set up the same as last time, I am enclosing a pic


thanks
Acestu

Can_bus.jpg
Can_bus.jpg (58.81 KiB) Viewed 14042 times
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.

User avatar
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(Part One)

Post by acestu »

Should the Tx and Rx of the mcp chip be connected to the 4580 via 220 ohm resisters ?


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.

User avatar
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(Part One)

Post by acestu »

OK Enamul, I grounded pin 8 on both mcp chips and now I have date / time on both units, however I still see the "it" where "Master RTC Unit" was


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.

User avatar
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(Part One)

Post by Enamul »

Sorry I was feeling so sleepy that went to bed..
Should the Tx and Rx of the mcp chip be connected to the 4580 via 220 ohm resisters ?
That doesn't make too much difference.
I grounded pin 8 on both mcp chips and now I have date / time on both units,
It should be in the diagram I have posted earlier. PIN 8 must be grounded. That's great that you can see time in both unit.
however I still see the "it" where "Master RTC Unit" was
I don't realize what you mean here.
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
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(Part One)

Post by acestu »

Hi Enamul,

Yes I think all it is, the words "Master RTC Unit" that are on the master unit are not cleared when the date and time start so that the last letters ie "it" are still visible on the screen, that's all I meant. I think if I shorten it to "Master RTC" in the code you should no longer see it.

thanks
Acestu
it.jpg
it.jpg (56.99 KiB) Viewed 14032 times
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.

User avatar
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(Part One)

Post by Enamul »

Don't worry..It's pretty easy problem. I will correct code when I will back home. Great work. Well done :)
Now we are ready for MIAC
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
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(Part One)

Post by acestu »

Ok thats great Enamul


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.

User avatar
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(Part One)

Post by Enamul »

Hi Stuart,

Here is the final without display issue..Please test that and let me know. I am going to make new thread for MIAC. Do you have your MIAC in hand already?
Attachments
RTC_PIC18f4580_MASTER.fcf
(23.79 KiB) Downloaded 261 times
RTC_PIC18f4580_SLAVE.fcf
(48.54 KiB) Downloaded 271 times
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
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(Part One)

Post by acestu »

Hi Enamul,

I will do that now, also I have the brand new shiny MIAC right next to me ready for action.

Thanks
Stuart
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.

User avatar
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(Part One)

Post by acestu »

Hi Enamul, that has done the job

Thanks
Acestu
final.jpg
final.jpg (45.45 KiB) Viewed 14011 times
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.

User avatar
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(Part One)

Post by Enamul »

Excellent Work! You have done it!
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
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(Part One)

Post by acestu »

WoW brilliant, Thank you Enamul, I will break out the champagne,

The Guinness book of records have been on the phone, we have broken the longest ever thread on a Forum World Record lol....

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.

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: RTC for Miac(Part One)

Post by JohnCrow »

Been an interesting thread to follow.
Got my own ideas based on this, once I have finished another project.
1 in 10 people understand binary, the other one doesn't !

User avatar
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(Part One)

Post by acestu »

Thanks John,

that sounds interesting, I will post the final drawings and pics on this thread when I have finished part 2.

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.

Post Reply