Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
March 29, 2024, 10:02:51 10:02


Login with username, password and session length


Pages: [1]
Print
Author Topic: Help in PIC Networking  (Read 5457 times)
0 Members and 1 Guest are viewing this topic.
MicroBox
Junior Member
**
Offline Offline

Posts: 35

Thank You
-Given: 11
-Receive: 0


« on: December 18, 2009, 04:29:32 04:29 »

Greetings everyone!
                   Does anyone knows how to create a Pic Networking(a Master Pic and 3 Pic Slaves), and if possible share the schematic.

Thanks in advance,
Microbox
Logged
bbarney
Moderator
Hero Member
*****
Offline Offline

Posts: 2430

Thank You
-Given: 405
-Receive: 545


Uhm? where did pickit put my mute button


« Reply #1 on: December 18, 2009, 01:18:40 13:18 »

Here's a start for you
Logged

Ever wonder why Kamikaze pilot's wore helmet's ?
blacknight72
Junior Member
**
Offline Offline

Posts: 37

Thank You
-Given: 9
-Receive: 5



« Reply #2 on: December 18, 2009, 03:44:15 15:44 »

You can use CAN protocol, it's perfect in networking. Another choices are I2C and SPI network, I think!
Good luck, then.
Logged
waicon
Active Member
***
Offline Offline

Posts: 134

Thank You
-Given: 57
-Receive: 79


I'm learning to Dream...not Relaxing...zzZ


« Reply #3 on: December 20, 2009, 03:30:24 15:30 »

maybe can use RS485, multi-drop, which can be as long as 1KM, i think.
here is schematic for RS232 to RS485/RS422, http://rapidshare.com/files/323503276/RS232_RS485_ISOLATE.pdf

and ..write your own software protocol  Grin share with us.
Logged
tAhm1D
Senior Member
****
Offline Offline

Posts: 326

Thank You
-Given: 103
-Receive: 180



« Reply #4 on: December 28, 2009, 04:02:15 16:02 »

Hi MicroBox,
I made one such project with one 16F877A as master and 3 slaves. I used SPI to control these. I'll look up the files and try to post the schematic and code if possible.
Logged
BharatSujanani
Junior Member
**
Offline Offline

Posts: 48

Thank You
-Given: 31
-Receive: 24

All is Well


« Reply #5 on: December 29, 2009, 10:09:46 10:09 »

Hi MicroBox,
I have done it with I2C. In i2c you have to connect two pin of all controllers together. You have to connect Clock pin of all controllers connected and data pin of all controllers connected.
I have source code for master i2c and slave i2c for PIC. if you require tell me i will upload it on the forum.

Bharat
Logged

Bharat Sujanani
MicroBox
Junior Member
**
Offline Offline

Posts: 35

Thank You
-Given: 11
-Receive: 0


« Reply #6 on: January 01, 2010, 09:20:03 09:20 »

Hi Bharat,
            Please do send the source and schematic, I appreciate it very much...



regards,
MicroBox
Logged
Cain
Junior Member
**
Offline Offline

Posts: 81

Thank You
-Given: 165
-Receive: 102


« Reply #7 on: January 01, 2010, 10:46:08 22:46 »

S.N.A.P is another option...

http://www.hth.com/snap/

Cain
Logged
medik
Junior Member
**
Offline Offline

Posts: 41

Thank You
-Given: 75
-Receive: 4


« Reply #8 on: January 01, 2010, 11:45:13 23:45 »

Hi MicroBox,
I have done it with I2C. In i2c you have to connect two pin of all controllers together. You have to connect Clock pin of all controllers connected and data pin of all controllers connected.
I have source code for master i2c and slave i2c for PIC. if you require tell me i will upload it on the forum.

Bharat

I'm also looking at communicating between two PIC in my project. That will be nice if you upload it.
Logged
BharatSujanani
Junior Member
**
Offline Offline

Posts: 48

Thank You
-Given: 31
-Receive: 24

All is Well


« Reply #9 on: January 02, 2010, 09:01:19 09:01 »

I am attaching the master and slave i2c files.
And i have not attached schematic because in that only two connections are there, which i have explained in my last post.And connect pull up on both that I2C pins.
Logged

Bharat Sujanani
tasosstr
Junior Member
**
Offline Offline

Posts: 75

Thank You
-Given: 95
-Receive: 14


« Reply #10 on: January 27, 2010, 07:34:03 19:34 »

S.N.A.P is another option...

http://www.hth.com/snap/

Cain

Hello Cain,

Do you have use this protocol ?



I try to convert the sample code to vb.net 2008 without success  :-( do have try ? any help ?

Or do you have understand how the CRC16 working on the vb.net ?

What i was try without success is:

  Private Function Calc_crc()
        Temp_crc = Temp2 * 256
        Crc = Temp_crc Xor Crc
        For Temp1 = 0 To 7
            If Crc > 32767 Then
                Crc = Crc * 2
                Crc = Crc Xor Crcpoly
            Else
                Crc = Crc * 2
            End If
            Crc = Crc And 65535
        Next
        Calc_crc = Crc
        Crc2 = Microsoft.VisualBasic.Left(Hex(Crc), 2)
        Crc1 = Microsoft.VisualBasic.Right(Hex(Crc), 2)

    End Function
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC