Software for the 8032/arcnet at the TEC 

J Fried, M.A. Kelley

 

The Control Command Block (as described in Timing and Control Module - Joe Mead) and its data will be received over arcnet at the FEM by a C language program using SMC Control Link protocol (fig 1) This program will be in a protected portion of an AMD 64k EEPROM (AMD29f010) (fig 2). Functions will be parsed by a separate (also C language - IAR compiler and linker for the 8051) program (fig 4) which has been transmitted over arcnet and programmed into the AMD EEPROM. This user program is compiled and linked with a starting address equal to the beginning of EEPROM non-protected memory (fig 2). This must be specified in the linker file (.XCL) - fig 3. Data segments have been set up to allow communication between the protected arcnet/boot program and this user program (also fig 3).

 

For a download of the user program (fig 5) the 8032 internal RAM is used as a buffer. Packets, which have been read by the protected arcnet program, are passed through this IRAM buffer to be programmed into the AMD EEPROM. If P3.5 is low (see Time Expansion Chamber Arcnet Commands paper - Jack Gannon), write is enabled in the flash memory. The download is accomplished, therefore, by successive transfers from normal 8032 external RAM with P3.5 high to 8032 IRAM, setting P3.5 low, writing to flash memory, setting P3.5 high again, etc. until user program has been copied to flash memory. A flag (PGB) is set in flash memory at the finish of this download to indicate the presence of a user program. (This is erased when the flash memory is erased -before a new user program is written). Flash memory then becomes program memory until a subsequent download is requested.