Hi Joe :-)
How are you ?
Just wondering whether my problem lies at 18F4520 or 16F887 !
You see when the 18F4520 was a set as the receiver and the 16F887 as a transmitter,
I would do an HSERIN to catch the data from the transmitter PIC and then an HSEROUT directly after to send the data to the PC comport ...All worked well!
A.Like this
16F887 (TX)----> (RX)18F4520(TX)------->MAX232--->PC COM PORT
B.When I changed things to this
18F4520 (TX)----> (RX)16F887(TX)------->MAX232--->PC COM PORT
the problem occurs.
Weird values at PC using MCS serial tool
Please also note this is if PIC's are WIRED together (not wireless)
In scenario B I check what the TX string is and it is what it's supposed to be in the serial tool window.
If I check at the 16F887 side in serial tool window I get incorrect values for the data received :-(
And that's what leads me to belive the problem lies at the 16F887 side .. but you may be right about the 18F4520 :-)
At this stage I would try almost anything to solve the problem
Kind regards
Dennis
PS.. Two fingers hey ? You're one up one me then :-) I'm like lightening on the keyboard ...never strike the same place twice :-)
**************UPDATE***************
On the transmitter PIC (18F4520) I am using this line
Code:
hserout [TRAIN,SYNK,XNUM,YNUM,ZNUM,$d,$a]
On the receiver PIC (16f887)
I use these two lines
Code:
hserin [WAIT(SYNK),XNUM,YNUM,ZNUM] ' (wait for synk byte)
hserout["X-",DEC XNUM," Y-",DEC YNUM," Z-",DEC ZNUM,$d,$a] 'to PC com port
If I remove this line
Code:
hserin [WAIT(SYNK),XNUM,YNUM,ZNUM] ' (wait for synk byte)
The I see data appearing in the serial tool window, obviously without the data I am sending.
So there seems to be a problem with HSERIN on the receiver PIC or what is being sent by the Transmitter PIC.
Bookmarks