Specifications
49
TCP/IP Stack uses a multitasking technique called cooperative multitasking. In a
cooperative multitasking system, there is more than one task; each performs its
job and returns its control so that the next task can perform its job. StackTask
and ARPTask are cooperative tasks.
Normally cooperative multitasking is implemented in the operating system or in
the main application, but with Microchip‟s design, it is independent of any
operating system; it implements its own cooperative multitasking system. This
allows it to be used in any system, regardless of whether it uses a multitasking
operating system or not. In order to use an application utilizing the Microchip
TCP/IP Stack, it must be written using a cooperative multitasking method. This
can be accomplished by either dividing the job into multiple tasks, or organizing
its main job into a Finite State Machine and dividing a long job into multiple
smaller jobs.
2.7.8 Implementation
In order for the TCP/IP stack to function, you must use C compiler “defines” to
configure to program. In order for the server to operate properly, the clock
frequencies need to be configured. Those options are found within the Tick.C
file. Table 10 below describes the purpose of each of those configurable values.
Define
Values
Purpose
CLOCK_FREQ
(compiler.h)
Oscillator
Frequency
(hz)
Define system oscillator
frequency to determine tick
counter value
TICKS_PER_SECONDS
10-255
To calculate a second
TICK_PRESCALE_VALUE
2, 4, 8, 16, 32,
64, 128, 256
To determine tick counter value
Table 10 Configuration used by Tic C
The file system needs to be configured to know where to look for an image.
These configuration options can be located in MPFS.c. Table 11 below contains
a description of each of those values.
Define
Values
Purpose
MPFS_USE_PGRM
N/A
Uncomment this if program
memory will be used for MPFS
storage
MPFS_USE_EEPROM
N/A
Uncomment this if external
serial EEPROM will be used for
MPFS storage
MPFS_RESERVE_BLOCK
0-255
Number of bytes to reserve
before MPFS storage starts
EEPROM_CONTROL
External Data
EEPROM
Control Code
To address external data
EEPROM