YAY ...I'm now back at my original problem which prompted me to start this thread :-) or :-( ?
In post #9 here I had used the wrong settings for the usart , if you look carefully you'll see that the values are set for 4 MHz and I had set to use the internal clock @ 8 MHz. I changed to use internal clock @ 4MHz and now at least I get values in hyperterminal....b ut they are WRONG !
The HSEROUT line from the 18F4520 is as follows:
[code]
TRAIN VAR BYTE
train = $B3
SYNK VAR BYTE
SYNK = $7E
XNUM VAR BYTE
YNUM VAR BYTE
ZNUM VAR BYTE
hserout [TRAIN,SYNK,XNUM,YNUM,ZNUM,$d,$a]
[code]
It works perfectly ... I can see the values in hyperterminal/MCS serial tool window as they are sent!
So I see this
That's the numbers $B3,$7E,31,100,69
Now when I'm at the receiver side the numbers I receiver PIC side are way different ...
Here's the receiver code
Code:
hserin [WAIT(SYNK),XNUM,YNUM,ZNUM]
' and now out to hyperterminal (or wherever!)
hserout["X-",DEC XNUM," Y-",DEC YNUM," Z-",DEC ZNUM,$d,$a] 'to hyperterminal
Here's what I get in MCS serial tool window /hyperterminal
X-71 Y-84 Z-53
X-71 Y-84 Z-53
X-71 Y-80 Z-53
X-71 Y-80 Z-53
X-71 Y-80 Z-53
This should be X- 31,Y-100,Z-69
These are completely di8fferent to what I am sending !
This is really confuising ... can anyone see what I am doing wrong ?
Kind regards
Dennis
Bookmarks