Download Print this page

Xycom XVME-682 Manual page 41

Advertisement

X V M E - 6 8 2 Manual
October , 1989
6 . 7 BYTE SWAPPING
T h e V M E b u s a n d P C / A T c o n v e n t i o n s differ i n t w o i m port a nt w a y s . The first i s i n h o w each
a d d r e s s e s d a t a b u s bi t s. The s e c o n d i n vol v es r e f e r e n c e s to n u m e r i c vari a bl e s l o n g e r t h an eight
bits.
W h e n c o m p a r i n g t h e w a y t h e V M E b u s a d d r e s s e s d a t a b u s bi t s, rel a ti v e to t h e w a y t h e PC/AT
f a mi l y a d d r e s s e s t h e m , w e fi n d t h at t h e b y t e s are s w a p p e d a s follows:
D A T A B I T S V M E b u s P C / A T b u s
D 1 5 - D 0 8 B y t e 0 B y t e
D 7 - D O B y t e 1 B y t e
W h e n referri n g to a numeri c vari a bl e l o nger than ei g ht bi t s, the PC/ A T st o res the least
si g ni f i c ant b y t e ( L S B ) at t h e l o wer a d d r e s s whi l e the V M E b u s (Mot o rol a t y pe) requi r es that
t h e m o s t si g ni f i c ant b y t e ( M S B ) b e s t o r e d at t h e l o west address.
T h i s p r o b l e m c o n c e r n s onl y n u m e r i c val u es. Stri n g-t y pe vari a bl e s are t r eat e d the same by
b o t h devices.
X y c o m s o l v e d the dat a b u s bit- s w a p p i n g p r o b l e m by c o n n e c t i n g Byt e 0 of the C P U to D15-
D 8 of t h e V M E b u s , a n d Byt e 1 of t h e C P U to D 7 - D O of t h e VMEbus.
P C / A T D A T A B U S V M E D A T A B U S B Y T E
D 7 - D O D
1
5
- D 8
D 1 5 - D 8
D
7
- D O
T h e s e c o n d p r o b l e m m u s t be s o l v e d wi t h sof t w are b e c a u s e the external h a r d w a r e cannot
di s t i n gui s h b e t w e e n n u m e r i c a n d stri n g-t y pe vari a bl e s. The p r o g r a m m e r m u s t b e a w a r e of the
fact that w h e n e v e r n u m e r i c s a r e to b e e x c h a n g e d b e t w e e n t h e P C / A T a n d t h e Motorol a -type
d e v i c e s o n the V M E b u s , d a t a b y t e s m u s t b e swapped.
Example
P C / A T w o r d = 1234
T h i s w o r d m u s t b e wri t ten to V M E b u s (Mot o rol a -t y pe) d e v i c e s a s 3412
6-17
1
0
0
1
A r t i s a n T e c h n o l o g y G r o u p - Q u a l i t y Instrumentation
... G u a r a n t e e d I ( 8 8 8 ) 8 8
I www.artisantg.com

Advertisement

loading
Need help?

Need help?

Do you have a question about the XVME-682 and is the answer not in the manual?

This manual is also suitable for:

Xvme-682/1Xvme-682/2Xvme-682/3Xvme-682/4