| ||||||||
Technical Support Support Resources Product Information | C51: GLOBAL VARIABLE PROBLEM WITH DALLAS 390 CONTIGUOUS MODEInformation in this article applies to:
QUESTIONI'm using Dallas 390 in contiguous mode and my global variables do not seem to be initialized. Is this a problem? CAUSEYes. The DS80C390 requires a modified INIT.A51 and the START390.A51 RESOLUTIONYou must download and use C51 compiler V6.23 or later, and do the following modifications on the INIT.A51 file: ;------------------------------------------------------------------------------ ; ; Far Memory Support ; ; If the C application contains variables in the far memory space that are ; initialized, you need to set the following define to 1. ; ; --- Set XBANK = 1 when far variables should be initialized $SET (XBANK = 1) ; ;------------------------------------------------------------------------------ ; ; Dallas 390/400/5240 CPU Contiguous Mode ; ; If you are using the Dallas Contiguous Mode, you need to set the following ; define to 1. ; ; --- Set DS390 = 1 when CPU runs in Dallas Contiguous Mode $SET (DS390 = 1) ; ;------------------------------------------------------------------------------ Set XBANK and DS390, as showed above, save the new file and add it to your project as the last file on your project. After downloading the 6.23 version, you must download and use the START390.A51 file ( it may be requested on the attached files section below ) because this Startup file has the correct load sequence of MCON and ACON registers ( Memory Configuration Register and Address Configuration Register ). MCON must be configured before ACON. The START390.A51 that originally downloads with V6.23 has the wrong loading sequence, so it will not work on your hardware. That is why you should use the modified version. SEE ALSO
Last Reviewed: Wednesday, May 25, 2005 | |||||||
| ||||||||