Page 5 of 10

Re: RTC for Miac(Part One)

Posted: Thu Oct 11, 2012 10:05 pm
by Enamul
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

Re: RTC for Miac(Part One)

Posted: Thu Oct 11, 2012 10:12 pm
by acestu
Thanks Enamul

Acestu

Re: RTC for Miac(Part One)

Posted: Thu Oct 11, 2012 10:45 pm
by Enamul
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.

Re: RTC for Miac(Part One)

Posted: Thu Oct 11, 2012 11:14 pm
by acestu
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

Re: RTC for Miac(Part One)

Posted: Thu Oct 11, 2012 11:44 pm
by Enamul
ohh.. :(
Did you manage to compile the code?

Re: RTC for Miac(Part One)

Posted: Thu Oct 11, 2012 11:51 pm
by acestu
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

Re: RTC for Miac(Part One)

Posted: Fri Oct 12, 2012 12:10 am
by Enamul
Glad it worked finally..No problem we will start tomorrow..Good Night :)

Re: RTC for Miac(Part One)

Posted: Fri Oct 12, 2012 9:25 pm
by acestu
Hi Enamul,

I am building the send receive master first, the switch on port b4 would this connect to +5v or ground

thanks
Acestu
Master.jpg
Master.jpg (33.58 KiB) Viewed 14378 times

Re: RTC for Miac(Part One)

Posted: Fri Oct 12, 2012 10:26 pm
by Enamul
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.

Re: RTC for Miac(Part One)

Posted: Fri Oct 12, 2012 11:25 pm
by acestu
Hi Enamul,

the switch, is it a momentary action or latching ?

thanks stuart

Re: RTC for Miac(Part One)

Posted: Fri Oct 12, 2012 11:41 pm
by Enamul
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..

Re: RTC for Miac(Part One)

Posted: Sun Oct 14, 2012 4:25 pm
by acestu
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

Re: RTC for Miac(Part One)

Posted: Sun Oct 14, 2012 4:57 pm
by JohnCrow
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.

Re: RTC for Miac(Part One)

Posted: Sun Oct 14, 2012 5:07 pm
by acestu
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

Re: RTC for Miac(Part One)

Posted: Sun Oct 14, 2012 6:57 pm
by Enamul
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.

Re: RTC for Miac(Part One)

Posted: Sun Oct 14, 2012 7:01 pm
by acestu
Hi Enemul, I have connected up the bus with the 100k resisters but nothing seems to work unfortunately, any ideas ?

thanks
Acestu

Re: RTC for Miac(Part One)

Posted: Sun Oct 14, 2012 7:09 pm
by JohnCrow
Hi
Hi Enemul, I have connected up the bus with the 100k resisters but nothing seems to work unfortunately, any ideas ?
100 k or is that a typo? hopefully you mean 100 ohm :)

Re: RTC for Miac(Part One)

Posted: Sun Oct 14, 2012 7:13 pm
by acestu
Sorry you are right John, its a typo

thanks
Acestu

Re: RTC for Miac(Part One)

Posted: Sun Oct 14, 2012 7:15 pm
by Enamul
Hi Stuart,
What is shown in slave and master display? Because the program is tested one and should work straight way.

Re: RTC for Miac(Part One)

Posted: Sun Oct 14, 2012 7:20 pm
by acestu
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

Re: RTC for Miac(Part One)

Posted: Sun Oct 14, 2012 7:32 pm
by Enamul
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"?

Re: RTC for Miac(Part One)

Posted: Sun Oct 14, 2012 7:35 pm
by acestu
Hi Enamul,

Yes that is what the master does, but the slave never changes it always says "NOT-RECEIVED"...

thanks
Acestu

Re: RTC for Miac(Part One)

Posted: Sun Oct 14, 2012 7:46 pm
by Enamul
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.

Re: RTC for Miac(Part One)

Posted: Sun Oct 14, 2012 8:19 pm
by acestu
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

Re: RTC for Miac(Part One)

Posted: Sun Oct 14, 2012 8:22 pm
by Enamul
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..