INSTRUCTION MANUAL
(Last Modified: 04 November 2010 06:08:40 PM )
After synthesizing the firmware code and configuring the Digilent D2 board by downloading the bit file to the FPGA (see WebPack Configuration), the DE248 is ready for use.
The primary means of controlling the DE248 is via the ASCII-based RS-232 interface. The simplest means of communicating with the system is via HyperTerminal. Be aware that, once you define a connection with HyperTerminal, there are some settings that you can never see or change again. (Hey, ask Microsoft.)
The HyperTernminal configuration file used during development is available for your use.
These are the settings that were needed (for HyperTerminal version 5.1) to make the system work - your mileage may vary.
When you create a new connection, the first dialog is "Connect To". You want to change the "Connect using" field to the port that your cable is connected to. This will usually be COM1. Note that the default is COM2. I believe that this is because the typical user used COM1 for local devices and COM2 for a modem. Selecting "OK" will bring up the "COM1 Properties" dialog. You want to make the following setting:
Bits per second: 115200
Data bits: 8
Parity: None
Stop bits: 1
Flow Control: Xon/Xoff
Now select "Apply" and "OK". You will never be able to see or change these settings for this configuration again. Stupid, yes.
Now select "File-Properties" to bring up the configuration properties dialog box. Select the "Settings" tab and select the "ASCII Setup" button to bring up the "ASCII Setup" dialog box and check the box in the "ASCII Sending" section that says, "Send line ends with line feeds". Everything else can be unchecked. The box in the "ASCII Receiving" section telling HyperTerminal to wrap long lines is checked by default and this is acceptable.
You can verify the connection by hitting the "ESC" key. The
DE248 should respond with the "DE248" title string and a "#>
"
command prompt. Enter the following command: "W0001" (without the quotes)
followed by the command "R00". The following should be the result:
#>
-> DE248
#> W0001
-> REG[00]=01
#> R00
-> REG[00]=01
#>
Note the two different
prompts. The "#>
" prompt is the command prompt indicating
that the DE248 is awaiting user input. The "->
' prompt
indicates output that was sent by the DE248.
Writing to any of the HOST-writable registers can be accomplished with a command of the following format:
#> WAADD
-> REG[AA]=DD
Where "AA
" is the two-digit hexadecimal value of the
register to be written to and "DD
" is the two-digit
hexadecimal value of the data to be written.
In response, the DE248 will report the present value of the register that was just written to.
Reading from any of the registers can be accomplished with a command of the following format:
#> RAA
-> REG[AA]=DD
Where "AA
" is the two-digit hexadecimal value of the
register to be read.
In response, the DE248 will report the present value of the register where "DD
"
is the two-digit hexadecimal value of the data contained in that register.
The DE248 can read from either the HOST-writable or the FPGA-writable registers.
The HOST/FPGA registers are partitioned so that the HOST-writable registers are in the lower half of the 8-bit register address space while the FPGA-writable registers are in the upper half. At the present time, only half of each space is populated, hence the HOST-writable registers occupy 0x00 through 0x3F while the FPGA registers occupy 0x80 though 0xBF.
Operating the DE248 is a "simple" matter of reading and writing to the various registers. The trick, of course, is knowing what to write to which register when. Since the DE248 is designed to be highly flexible and modular, documenting how to do specific things all in one place is difficult. Instead, the user is referred to the documentation for the specific modules of interest and to the HOST/FPGA register map for information on where the registers are located in the default configuration and how to find their actual values in the code (assuming that whoever modified it was considerate enough to follow the convention).