Sign in

username:

password:



Not a member?

Search piclist



Search tips

Subscribe to piclist



piclist by Keywords

12F675 | 16F628 | 16F84 | 16f877 | 16F877A | 16F88 | 18F458 | ADC | AVR | Bootloader | CAN | CCS | CRC | EAGLE | EEPROM | ICD | ICSP | IDE | JDM | LED | Macros | Microchip | MPLAB | PCB-CAD | PIC10F | Pic12f675 | PIC16F84 | PIC16F84A | PIC16F877 | PIC18 | PIC18F452 | PicBasic | PICC | PICSTART | PWM | RS-485 | RS232 | SMT | SPI | UART | USART | USB | Wireless | Wisp628 | Xilinx

Ads

Discussion Groups

Discussion Groups | Piclist | PIC to PIC communications

A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.

PIC to PIC communications - david.clavey - Feb 25 1:37:00 2001

I have a need to design a circuit that controls four RS232 serial ports and
a parallel printer port. The four serial ports would be connected to a 3COM
Palm Pilot (Main control), a single board modem, an external serial printer
and an external PC serial port. Any serial port can talk to any other serial
port. e.g. Palm to PC, Palm to Modem, PC to Modem etc ....

In order to do this I propose using a 16F877 as the master PIC controlling a
(Palm) serial port and the parallel printer port. To control the other three
RS232 serial ports I propose using three slave PIC's 16F627 because they are
cheap (2.22UKP). The Master PIC would then be in communications with the
three slave PIC's.

Question:
1. Has anyone got any advice on PIC to PIC communications using just two
lines (RX, TX).
2. Has anyone done it before? (Bound to have)
3. Anyone got a better idea (see Design Considerations below)
4. Rather than a Master PIC would a PIC token ring be better?
5. Anyone played with 16F627's, any problems with them as far as RS232 is
concerned?

Design considerations:
1. I only want to download the Master PIC inorder to commission the circuit
(using incircuit methods). Therefore the Master PIC must itself incircuit
download the three Slave PIC's. I would imagine the three slave PIC's
containing identical programs. The circuit must self test itself every hour
and take corrective action if possible. This may require the PIC to takeover
the modem and dial for help!
2. I can spare 9 I/O lines in the master PIC for connection to the three
slave PIC's. Therefore each slave PIC would have 3 connections, its RB6,
RB7 and RA5 ( wired to the Master PIC. This would allow incircuit download
of the slave PIC's.
3. The Slave PIC's would then have two lines RB6 and RB7 for receiving and
transmitting data to and from the Master PIC.
4. I could clock all four PIC's from the same source to make the
syncronisation easier.
5. The main control program will run in the Master PIC. The Slave PIC's
interrupting the Master PIC.
6. The Slave PIC's RAM memory would be used as a chash, buffering 128 bytes
inbound and 16 bytes outbound.
7. The Slave PIC's may be communicating at 115K baud, but would typically be
communicating at 38K baud.
8. The Master PIC is acting as a serial to parallel converter. (As well as
the main switch interface between the PIC's)
9. The parallel printer port is actually two parallel ports. An incomming
one from a PC and an outgoing one to a printer. This allows the Palm to
disconnect the PC parallel port and take over (borrow) the PC's parallel
printer.

regards
David Clavey
Technical Director
Lowther (UK) Ltd. (Portable Computers Specialists)
Home:
Work:





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )


PIC to PIC communications - Vecheslav Silagadze - Apr 10 3:20:00 2004

Hello everyone,

Just a simple question - is there any trick to direct PIC to PIC
communication?
Can I just wire one port to another and configure them appropriately in each
PIC, or do I need to add extra precautions (buffer? pullups? pulldowns?)

I've tried the simple approach of just wiring it (ports D and C on a 18F458
talking to a 16F877) and it seems to have the tendency to work for a few
minutes and then just freeze (works fine if I disable the communications.)

Vecheslav Silagadze

_________________________________________________________________
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: PIC to PIC communications - atomic_ant - Apr 10 18:41:00 2004

why not use i2c

--- Vecheslav Silagadze <>
wrote:
> Hello everyone,
>
> Just a simple question - is there any trick to
> direct PIC to PIC
> communication?
> Can I just wire one port to another and configure
> them appropriately in each
> PIC, or do I need to add extra precautions (buffer?
> pullups? pulldowns?)
>
> I've tried the simple approach of just wiring it
> (ports D and C on a 18F458
> talking to a 16F877) and it seems to have the
> tendency to work for a few
> minutes and then just freeze (works fine if I
> disable the communications.)
>
> Vecheslav Silagadze _________________________________________________________________
>
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines

__________________________________





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: PIC to PIC communications - Don Hackler - Apr 10 20:39:00 2004

There's nothing special in the hardware about tying two PICs together;
sounds like you might
be having software problems....

Vecheslav Silagadze wrote:

>Hello everyone,
>
>Just a simple question - is there any trick to direct PIC to PIC
>communication?
>Can I just wire one port to another and configure them appropriately in each
>PIC, or do I need to add extra precautions (buffer? pullups? pulldowns?)
>
>I've tried the simple approach of just wiring it (ports D and C on a 18F458
>talking to a 16F877) and it seems to have the tendency to work for a few
>minutes and then just freeze (works fine if I disable the communications.)
>
>Vecheslav Silagadze
>
>_________________________________________________________________
>http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines >
>
>to unsubscribe, go to http://www.yahoogroups.com and follow the instructions
>Yahoo! Groups Links




(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )