USART, single master (8051), multiple slave (PIC16F876) - suggestions

Sep 29, 2006 1 Replies

We built a machine with a CAN bus connecting modules to a CAN board in a PC.



We had a useful little Laser Beam Power Meter [LBPM] board based on a PIC16F876 attached to CAN. It had a debug serial port. S/w was developed on MPLAB/CCSC C.



The next machine used a Cypress FX2LP (based on an 8051). It has a debug serial port. S/w was developed on Keil C.



Whaddya know, we need to connect the old LBPM board to the new Cypress board.



As I fear this may happen again, I am looking for software to use the USART to connect the two.



As I suspect there may be other useful PIC boards from our past that may be dragged in, I'd like to use the 8051 as a single master talking to one (initially) or more PIC boards.



It's low volume and we do not want to lay out any new boards.



It's quite low throughput.



I accept I am very likely to lose my debug facilty, but that's life.



Both ends seem to support addressing over the USART.



Any simple suggestions? Protocol? C source code appreciated :-)



Things we considered but rejected: a) Put USB target on the PIC board b) Put CAN on the Cypress board c) Introduce another interface (SPI, IIC, etc) - they've been used/adapted already. d) Use a USB to CAN adapter box (or make one) e) Wireless, optical fibres, or any other sort of magic. f) Etc.


There's some interesting stuff here:

On that page there's a reference to "DF1 - Allen-Bradley (Rockwell)"; if you search around the AB/Rockwell site, you will find descriptions of their serial protocol.

I would hesitate to write a new protocol; odds are theirs can do what you need.

GH

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required