RTC for Miac(Part One)
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
Re: RTC for Miac(Part One)
Hi,
I made the program in Flowcode V4.5 It should work in Flowcode V5.4 but I am getting the same error..seems they are not compatible..Don't worry allow me some minutes..I am posting program using FCv5
I made the program in Flowcode V4.5 It should work in Flowcode V5.4 but I am getting the same error..seems they are not compatible..Don't worry allow me some minutes..I am posting program using FCv5
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: RTC for Miac(Part One)
Thanks Enamul
Acestu
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
Re: RTC for Miac(Part One)
Hi Stuart,
I have linked the FCV5 bug correction earlier and I forgot that now..Here is the bug correction link..
http://www.matrixmultimedia.com/mmforum ... 512#p38512
You will see FC5_PIC_CAN.c file to download in the link...Replace the old one in "Flowcode/v5/Components" directory..
Edit: so last posted program will compile after fixing the bug.
I have linked the FCV5 bug correction earlier and I forgot that now..Here is the bug correction link..
http://www.matrixmultimedia.com/mmforum ... 512#p38512
You will see FC5_PIC_CAN.c file to download in the link...Replace the old one in "Flowcode/v5/Components" directory..
Edit: so last posted program will compile after fixing the bug.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: RTC for Miac(Part One)
Hi Enamul,
Not having much luck, problems with the dev board now, the green power light will not come on now and the voltage regulator on the board is red hot ?
thanks
Acestu
Not having much luck, problems with the dev board now, the green power light will not come on now and the voltage regulator on the board is red hot ?
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
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: RTC for Miac(Part One)
Ok that was weird, its working now, yes I have just programmed the chip, getting late now though so I will carry on tomorow Enamul, and
as always thank you for your time and help
Acestu
as always thank you for your time and help
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
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: RTC for Miac(Part One)
Hi Enamul,
I am building the send receive master first, the switch on port b4 would this connect to +5v or ground
thanks
Acestu
I am building the send receive master first, the switch on port b4 would this connect to +5v or ground
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
Re: RTC for Miac(Part One)
Hi Stuart,
You have to connect RB4 to Vcc via 4.7K resistor..a switch from RB4 to GND. Pressing sw, RB4 = 0 and normally high.
You have to connect RB4 to Vcc via 4.7K resistor..a switch from RB4 to GND. Pressing sw, RB4 = 0 and normally high.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: RTC for Miac(Part One)
Hi Enamul,
the switch, is it a momentary action or latching ?
thanks stuart
the switch, is it a momentary action or latching ?
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.
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
Re: RTC for Miac(Part One)
You can use momentary switch as whenever you press switch data will send to slave and master will be in another loop for data receiving..
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: RTC for Miac(Part One)
Hi Enamul,
I have just finished the second node, I am going to join them both on the canbus now, do the end of line resistors have to be dead on 120 ohms because I dont have any at this value ?
thanks
Acestu
I have just finished the second node, I am going to join them both on the canbus now, do the end of line resistors have to be dead on 120 ohms because I dont have any at this value ?
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.
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
Re: RTC for Miac(Part One)
Hi Stuart
I dont think the value its too critical.
I'm using (measured with the DVM) 118.3 ohms on the termination for my miac expansion modules (the miac end is built in)
That is also the value I get if I measure across the CAN terminations on the E-block can board.
I dont think the value its too critical.
I'm using (measured with the DVM) 118.3 ohms on the termination for my miac expansion modules (the miac end is built in)
That is also the value I get if I measure across the CAN terminations on the E-block can board.
1 in 10 people understand binary, the other one doesn't !
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: RTC for Miac(Part One)
Thanks John,
The nearest I have is 100 ohms, but I have read articles that say people have used 60 ohm resisters, so I don't know, what is the worst that will happen, it won't work ?
thanks
Acestu
The nearest I have is 100 ohms, but I have read articles that say people have used 60 ohm resisters, so I don't know, what is the worst that will happen, it won't work ?
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
Re: RTC for Miac(Part One)
Hi Stuart,
According to datasheet of MCP2551, you should be fine if you use even 60 ohm. So I think you can simply connect 100 ohm for both terminals.
According to datasheet of MCP2551, you should be fine if you use even 60 ohm. So I think you can simply connect 100 ohm for both terminals.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: RTC for Miac(Part One)
Hi Enemul, I have connected up the bus with the 100k resisters but nothing seems to work unfortunately, 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.
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
Re: RTC for Miac(Part One)
Hi

100 k or is that a typo? hopefully you mean 100 ohmHi Enemul, I have connected up the bus with the 100k resisters but nothing seems to work unfortunately, any ideas ?

1 in 10 people understand binary, the other one doesn't !
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: RTC for Miac(Part One)
Sorry you are right John, its a typo
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
Re: RTC for Miac(Part One)
Hi Stuart,
What is shown in slave and master display? Because the program is tested one and should work straight way.
What is shown in slave and master display? Because the program is tested one and should work straight way.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: RTC for Miac(Part One)
Hi Enamul, the Master says "NO-TRANSMISSION" and the slave says "NOT-RECEIVED"
When the button on the Master is pressed the Master says "CAN-TRANSMISSION 84" and then changes to "NOT-RECEIVED"
The slave does not change
thanks
Acestu
P.S. I am using the temp sensor for the analogue input
When the button on the Master is pressed the Master says "CAN-TRANSMISSION 84" and then changes to "NOT-RECEIVED"
The slave does not change
thanks
Acestu
P.S. I am using the temp sensor for the analogue input
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
Re: RTC for Miac(Part One)
When you press the button, you should see "CAN Transmission" in first line and 84 in second line. Are you getting that? You mean in slave you always see "Not-Received"?
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: RTC for Miac(Part One)
Hi Enamul,
Yes that is what the master does, but the slave never changes it always says "NOT-RECEIVED"...
thanks
Acestu
Yes that is what the master does, but the slave never changes it always says "NOT-RECEIVED"...
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
Re: RTC for Miac(Part One)
Hi,
I have modified the code for you that John used couple of days earlier. It is tested in FCV5..If it doesn't work in your case; I have to think in circuit connection and programmer issue.
I have modified the code for you that John used couple of days earlier. It is tested in FCV5..If it doesn't work in your case; I have to think in circuit connection and programmer issue.
- Attachments
-
- ADC-Switch TX.fcf
- (18.38 KiB) Downloaded 304 times
-
- ADC-Switch RX.fcf
- (34.59 KiB) Downloaded 270 times
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
Re: RTC for Miac(Part One)
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
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
Re: RTC for Miac(Part One)
SO you mean now you can get data sending from master to slave and slave returning to master using the previous programs? If so, great well done! I am sending now one program for RTC with set options..