EM55 Compiler Version 2.2 APPLICATION NOTES REVISION DATE: APP. NOTE VERSION AFFECTIVE CHIPS: AFFECTIVE SOFTWARE: Jul, 10, 2002 1.0 All 2.2 The EM55SUDev compiler version 2.2, have some bugs with the commands described below. If possible, please avoid using these commands. If you must, then try the following corrective actions. 1. Short Debounce Time Bug: When defining “Project \ Option Setting … \ Debounce” item, the default setting is “2.” Defining 2 or above are also acceptable. However, DO NOT define “1.” If “Debounce =1” is defined, the Scan Key routine will misinterpret the setting and enter into the wrong path_name (into one of the key pathnames at the input point of Input_status instead of the right one). 2. “TRn?:L/H: Path_name” Command fail for EM5000 Series: When using EASY-n Format, the “TRn?:L/H: Path_name” command works well with EM55001 only. All the other EM55000 series IC’s (EM55002 ~ EM55700) CANNOT properly interpret the processes of the TRn execution. To achieve the same purpose of the command on EM55002 ~ EM55700, use the In-Line ASM as illustrated in the example next page. 3. “TRn?:L/H: Path_name” command mistake for EM5000S Series: When using EASY-n Format on EM55000S series IC’s, the Scan Key routine will misinterpret the setting and enter into the wrong path_name (one of the key pathnames at the input point of Inputstatus instead of the right one). To avoid the problem, user can modify the program by replacing the “TRn?:L/H: Path_name” command with In-Line ASM as illustrated in the example next page. Example (using EASY-16 format): [InputState] key: tr1 tr1 x tr1 tr1 ;Tr-n input path_name defined. [OutputState] [Path] Path0: key ch2:freq=8k vol22=15 end tr1: tr3ck m1?3:tr3on delay(1) p3=0 end ;Use “tr3ck m1?3:tr3on” to replace “TRn?:L/H:path_name” command. If you want to check tr7, then use “tr7ck m1?7”. ;For example, if you want to check another key, create the program under [ASM], e.g., “tr3ck,” “tr7ck,” etc. tr3on: p3=1 end [Background] [ASM] tr3ck_begin: page0 mov a,#0 mov p2,a mov p2s,a nop nop mov a,p1 mov m2,a mov a,#0100b and a,m2 caje #0100b,k3 jmp out0 k3: mov a,#3 mov m1,a jmp out out0: mov a,#0 mov m1,a out: tr3ck_end ;Add this routine for check TR3 ;Clear P2 = Lo ;Enable P2 output ;Waiting for the external circuit to charge (energize) ;Read P1 ;Save P1 to M2 ;Mask other bits ;Check TR3 =Hi? If yes go to K3 ;If not go to OUT0 ;TR3 =Hi, set M1=3 ;End this routine ;TR3 =Lo, set M1=0 ;Go back to main program tr7ck_begin: page0 mov a,#0 mov p2,a mov p2s,a nk: mov a,#1 mov p2,a nop nop mov a,p1 mov m2,a mov a,#0100b and a,m2 caje #0100b,k7 jmp out1 k7: mov a,#7 mov m1,a jmp out2 out1: mov a,#0 mov m1,a out2: tr7ck_end ;Add this routine for check TR7 ;clear P2 = Lo ;Enable P2 output ;Out P2 = 0x0001, ;Waiting for the external circuit to charge (energized) ;Read P1 ;Save P1 to M2 ;Mask other bits ;Check TR7 =Hi? If yes go to K7 ;If not to OUT1 ;TR7 =Hi, set M1=7 ;End this routine ;TR7 =Lo, set M1=0 ;Go back to main program