RTE-V831-PC
USER’S MANUAL (Rev. 2.00)
27
11.
SOFTWARE
This chapter describes the initialization of the hardware of the RTE-V831-PC board, and explains how to
use peripheral devices.
11.1.
INITIALIZATION
The boot routine initializes the bus controller built into the V831 for external memory or I/O access. The
wait control and DRAM timing values indicated below assume a bus clock of 33 MHz.
Register
Internal I/O address
Set value
Size
Remarks
BCTC
C000-0010H
30H
Byte
DBC
C000-0012H
30H
Byte
PWC0
C000-0014H
7470H
Half-word
PWC1
C000-0016H
0000H
Half-word
SRAM: 0 wait state (CS6)
PIC
C000-0018H
0000H
Half-word
DRC
C000-0020H
02H(82H)
Byte
EDO 60ns (hyper page mode)
RFC
C000-0022H
900EH
Half-word
Approx. 15
m
s
For detailed information about the registers, refer to the manual provided with the V831 CPU.
11.2.
LIBRARIES
Libraries are required for programming using the C compiler for I/O accesses and other purposes.
However, the methods of writing these libraries and passing their parameters described below are
specific to the GHS-C. So, modifications may be required, for example, when another compiler is used.
/ *
I/O library
* /
/ *
GHS V800 compiler parameter passing
* /
/ * a r g 0 : r 6 , a r g 1 : r 7 , a r g 2 : r 8 , r e t u r n : r 1 0 * /
i n b ( i n t a d d r )
/ *
Byte (8 bits) input
* /
{
__
a s m (
“
i n . b 0 [ r 6 ] , r 1 0
”
) ;
}
i n h ( i n t a d d r )
/ *
Half-word (16 bits) input
* /
{
__
a s m (
“
i n . h 0 [ r 6 ] , r 1 0
”
) ;
}
i n w ( i n t a d d r )
/ *
Word (32 bits) input
* /
{
__
a s m (
“
i n . w 0 [ r 6 ] , r 1 0
”
) ;
}
o u t b ( i n t a d d r , i n t d a t a )
/ *
Byte (8 bits) output
* /
{
__
a s m (
“
o u t . b r 7 , 0 [ r 6 ]
”
) ;
}
o u t h ( i n t a d d r , i n t d a t a )
/ *
Half-word (16 bits) output
* /
{
__
a s m (
“
o u t . h r 7 , 0 [ r 6 ]
”
) ;
}
o u t w ( i n t a d d r , i n t d a t a )
/ *
Word (32 bits) output
* /
{
__
a s m (
“
o u t . w r 7 , 0 [ r 6 ]
”
) ;
}