RTC for MIAC(Part two)

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

Moderators: Benj, Mods

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:

RTC for MIAC(Part two)

Postby Enamul » Tue Nov 06, 2012 11:16 pm

Hi Stuart
In this thread, we will start with basic MIAC program to make familiarization with MIAC. After couple of basic program, we will move to CAN test using MIAC and slave module without changing the slave circuitry. We will keep slave end of CAN bus as it is. Only MASTER end of CAN bus will be connected to MIAC (L) and (H) terminal and this time we will remove 120 ohm from Master end CAN bus and in MIAC we will close TA and TB terminal which will ultimately connect terminating resistor inside MIAC.

Have you tested any program in MIAC or it's still virgin? If so, I can post simple program to test 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: 787 times
Been thanked: 226 times
Contact:

Re: RTC for MIAC(Part two)

Postby acestu » Tue Nov 06, 2012 11:23 pm

Hi Enamul,

I have powered up the MIAC and had a look at the test program.

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 two)

Postby Enamul » Tue Nov 06, 2012 11:45 pm

Hi Stuart,
I think the Keypad test is a nice program for MIAC to start with. This will help you to test LCD and Keypad components of MIAC which will be useful in our purpose later on..
Attachments
3. Keypad Test.fcf
(10.5 KiB) Downloaded 221 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: 787 times
Been thanked: 226 times
Contact:

Re: RTC for MIAC(Part two)

Postby acestu » Fri Nov 09, 2012 9:27 am

Hi Enamul,

I have installed the drivers for the MIAC and programmed your test program successfully

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 two)

Postby Enamul » Fri Nov 09, 2012 3:06 pm

That's nice. Here is another test code for ADC testing in MIAC..Here are 4 channels but you can use 1,2 or even 4.
Attachments
2. Digital Volt Meter x 4.fcf
(12.96 KiB) Downloaded 235 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: 787 times
Been thanked: 226 times
Contact:

Re: RTC for MIAC(Part two)

Postby acestu » Sun Nov 11, 2012 6:01 pm

Hi Enamul,

I have programmed the MIAC with the Voltmeter code successfully but I don't know what I am supposed to do with it, I would imagine that it tells you the voltage at certain pins of the MIAC , I cannot see any marked I1, I2, I3 and I4.

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 two)

Postby Enamul » Sun Nov 11, 2012 6:31 pm

Hi Stuart
You should be able to see I1, I2, I3, I4 in MIAC as can be shown here..
MIAC.png
MIAC.png (464.43 KiB) Viewed 11185 times

You can see right to OR terminal I1, I2, I3 & I4 terminals. If you put variable voltage in those pin you should be able to see voltage in display.
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: 787 times
Been thanked: 226 times
Contact:

Re: RTC for MIAC(Part two)

Postby acestu » Sun Nov 11, 2012 6:42 pm

Thanks Enamul

Do I use the 0v for ground / negative ? , I don't want to damage anything !

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 two)

Postby Enamul » Sun Nov 11, 2012 10:01 pm

Hi
0V is GND obviously but which -Ve you mean?
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: 787 times
Been thanked: 226 times
Contact:

Re: RTC for MIAC(Part two)

Postby acestu » Sun Nov 11, 2012 10:23 pm

Yes Sorry

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 two)

Postby Enamul » Sun Nov 11, 2012 10:26 pm

No problem at all.
These users thanked the author Enamul for the post:
acestu (Sun Nov 11, 2012 10:55 pm)
Rating: 5.26%
 
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: 787 times
Been thanked: 226 times
Contact:

Re: RTC for MIAC(Part two)

Postby acestu » Sun Nov 11, 2012 10:47 pm

Hi Enamul,

I have shorted out the TA & TB terminals on the miac and connected the can bus high and low then removed the resister from the master end....

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 two)

Postby Enamul » Sun Nov 11, 2012 10:57 pm

That's great. Here is the RTC code for MIAC and slave..
Attachments
RTC_PIC18f4580_SLAVE.fcf
(48.54 KiB) Downloaded 203 times
RTC_MIAC.fcf
Please use the code in next post..this misses LCD start
(22.98 KiB) Downloaded 190 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: 787 times
Been thanked: 226 times
Contact:

Re: RTC for MIAC(Part two)

Postby acestu » Sun Nov 11, 2012 11:19 pm

Hi Enamul

I have programmed the MIAC and the Slave and when I power them both up the slave is showing time but the miac has a blank screen ?

Should the MIAC display show anything if the Canbus is not receiving anything ?

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 two)

Postby Enamul » Mon Nov 12, 2012 2:20 pm

Sorry there was a problem in MIAC code..it should be OK now.
Attachments
RTC_MIAC.fcf
(23.12 KiB) Downloaded 188 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: 787 times
Been thanked: 226 times
Contact:

Re: RTC for MIAC(Part two)

Postby acestu » Mon Nov 12, 2012 7:55 pm

Hi Enamul,

I have reprogrammed the Miac but I still only get the "MIAC RTC Unit" text on the screen, I have a wired link in the TA and TB sockets and just 1 resister on the slave end of the Can Bus, but it is a 100 ohm, should I try and find a 120 ohm resister ?

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 two)

Postby Enamul » Mon Nov 12, 2012 8:11 pm

You can try but I don't think that is so critical. May be something wrong in the internal CAN and external CAN of MIAC. We have to go through some other tests may be.
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: 787 times
Been thanked: 226 times
Contact:

Re: RTC for MIAC(Part two)

Postby acestu » Mon Nov 12, 2012 8:27 pm

Ok, that's great Enamul, only my luck hey ........

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: 787 times
Been thanked: 226 times
Contact:

Re: RTC for MIAC(Part two)

Postby acestu » Wed Nov 14, 2012 1:01 am

Hi Enamul,

I have connected the slave board back up to the old master breadboard and the unit is working with both LCD modules showing the time and date, therefore the problem must be between the Canbus and the MIAC, I now have 120 ohm resistors on the Canbus as well, if you know of a test for the MIAC canbus I would be grateful.

thanks
Acestu


P.S. can both units be hooked up to the Canbus at the same time ?
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: 787 times
Been thanked: 226 times
Contact:

Re: RTC for MIAC(Part two)

Postby acestu » Wed Nov 14, 2012 2:36 am

I have been looking through the MIAC manual and it says that I require 4 wires as per my enclosed diagram, on my setup I have a link in the TA & TB connections, the Can bus Hi & Low in the L & H connections then I have a link in the M & +v connections, but I have nothing in the 0v connection, is this right ?


Thanks
Acestu

miac_wires.jpg
miac_wires.jpg (92.56 KiB) Viewed 11105 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 two)

Postby Enamul » Wed Nov 14, 2012 7:03 am

then I have a link in the M & +v connections, but I have nothing in the 0v connection, is this right ?
I haven't told you anything about M& +V link. We don't need M pin at all. +V can be used or you can leave it depending on you. +V can be used as power supply for slave. MIAC datasheet is showing that..but you can use separate power supply for slave if you have or you can use +V. But you have to connect 0V pin of MIAC to GND of slave to have common ground. So for our case we can use 3 or 4 not necessary it must be 4.
These users thanked the author Enamul for the post:
acestu (Wed Nov 14, 2012 10:10 am)
Rating: 5.26%
 
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: 787 times
Been thanked: 226 times
Contact:

Re: RTC for MIAC(Part two)

Postby acestu » Wed Nov 14, 2012 9:58 am

Hi Enamul,

Can I just clarify what is meant by "So for our case we can use 3 or 4 not necessary it must be 4." please, if you mean it must be 4 wires, could you please show me how to connect to my breadboard


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 two)

Postby Enamul » Wed Nov 14, 2012 10:54 am

Sorry for confusing you again. Can you please tell me where you running your slave PIC and RTC module from..I mean where it gets power from? If it's getting it's power from MIAC +V terminal in that case you will need 4 connections to slave. 2 are L& H, 1 is common GND (0V) and other is +V for slave +ve supply.
But if you are using separate power supply for Slave and RTC module you don't need +V connection of MIAC. You can simply ignore that. You need only L, H and 0V.
These users thanked the author Enamul for the post:
LeighM (Wed Nov 14, 2012 11:01 am)
Rating: 5.26%
 
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: 787 times
Been thanked: 226 times
Contact:

Re: RTC for MIAC(Part two)

Postby acestu » Wed Nov 14, 2012 11:36 am

Hi Enamul,

My Slave on the breadboard has its own +5v power supply that plugs into mains, and I am powering the MIAC from a mains PSU, so I think from what you are saying is

I only need to connect the Can Bus H & L , and connect the 0v on the MIAC to the neg rail on my breadboard

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 two)

Postby Enamul » Wed Nov 14, 2012 12:01 pm

I only need to connect the Can Bus H & L , and connect the 0v on the MIAC to the neg rail on my breadboard
Absolutely right.
Enamul
University of Nottingham
enamul4mm@gmail.com