English
Language : 

CT2577 Datasheet, PDF (16/41 Pages) Aeroflex Circuit Technology – APPLICATION NOTE 108
DATA STORAGE AND RETRIEVAL IN RAM
The storage and retrieval of data on RAM is optimized for fast processor accesses. The
data (Transmit or Receive) is stored with the first data word (Word #0) in memory location
#0n and the last data word (Word #n) in location 00. The processor reads the Command
word and extracts the T/R bit, subaddress, and word count bits as a pointer to the proper
memory location. The word count field is used as a down counter variable so that a Do Loop
routine is executed and then branched out at counter = 00. This may be more efficient in
some compilers than an up counter and comparing current loop counter with word count
field on every loop. The following section contains sample software pseudo code for data
handling. See Memory Map for further details.
SAMPLE SOFTWARE CODE
The following section contains sample pseudo-code for programming and operation the
SmaRT unit. The code most resembles Microsoft Quick Basic code (IBM DOS compatible)
for simplicity.
RETRIEVING OR LOADING DATA TO RAM
REM *******************************************************************************************
REM *
REM * Routines for operation in Remote Terminal (RT) Mode
REM *
REM ********************************************************************************************
REM ********************************************************************************************
REM * Variables
REM * _______
REM *
REM * NCMDEMPTY 0 = EMPTY (NO Command WORDS IN FIFO)
REM *
1 = HAVE COMMAND WORDS IN FIFO
REM *
REM *
This signal is derived from NEMPTY
REM *
on the CT2577.
REM *
REM * MODE
0 = RT MODE
REM *
1 = BC MODE
REM *
REM * CMDWORD = COMMAND WORD READ FROM FIFO
REM *
REM * WORDCNT = LOWER 5 BIT OF COMMAND WORD
REM *
INDICATES HOW MANY DATA WORDS
REM *
REM * DATA() = DATA ARRAY (32 WORDS MAX)
REM *
REM * MEMPOINT = LOWER 11 BITS OF THE COMMAND WORD
REM *
REM * T/R_BIT = BIT #10 OF THE COMMAND WORD
REM *
REM *
APPLICATION NOTE #108
16
Released 9/98