PDA

View Full Version : PIC to PIC serial comms



damiko
- 29th July 2005, 15:08
I have two PIC16F88's , one is connected to 20 Mhz crystal on OSC1 and OSC2, the other connects to the same crystal, only on OSC1.. both pic's are functioning normally, both use the DEFINE OSC 20 command and timing of a pause 1000 command results in one second, this is good!

the portB pin 7 of both pic's are connected, just a direct connection. I send a command from one pic:

Serout PortB.7, 2,[BUS_StartByte,State,DT0,DT1,DT2,DT3,DT4]

and the other pic is waiting because it is instructed to:

Serin PortB.7, 2, [BUS_StartByte],State,Pilot,DT0,DT1,DT2,DT3,DT4

then there is a following command after serin to indicate to me that it has received this...such as printing out the values.

However, there is no response.. this used to work under the old PicBasic, but I guess I may be missing something, either in circuit or program...

Thanks for your time!

Dwayne
- 29th July 2005, 15:42
Hello Damiko,


See this Thread:

http://www.picbasic.co.uk/forum/showthread.php?t=579


Dwayne

NavMicroSystems
- 29th July 2005, 17:40
Damiko,

all we can do based on the two single lines of code you have posted with no context is telling you:

The Syntax is correct!

And:
Hey, this should be discussed in the "Serial" Category of the Forum !!