Home

EM61000 Series V3.1

image

Contents

1. K1 see B gg 6 4 TR Trigger Key 1 HE e l 8 r 3 333 Ji jf eeeeveeee K2 ee eec O JO JO o 1 H 33 ees JE RE we eo ooo o 0 lt 12 Trigger Key 2 3 333 EEEBOOIOIOIOIOIOIG K3 E E 33 go l 33 EE EEER i 9 lt TR3 Trigger Key 3 3 HE 35 S El 1 e ee ee e E e BI Matz EE HE 3883 eeeeeeee 0 4 TR4 Trigger Key 4 3 HE eee 6 0 0 o pa m ee eee 6 6 0 DI HE e eeeeeee EM61000 IDE Series User s Guide Easy Program e 83 Chapter 6 6 9 3 Direct 8 Application Circuit NOTE Ports 3 4 amp 5 not shown ge Eg E EE O o SPEAKER 6 9 3 1 EMV60KB Jumper Configuration for Direct 8 Use Port 1 as input key Bridge ROW SETTING JUMPER 1 and COLUMN SETTING JUMPER 2 as follows 84 e Easy Program P20 P21 P22 P23 P24 P25 P26 P27 ROW SETTING JUMPER 1 O O 00000000 0 BERN P30 P31 P32 P33 P34 P35 P36 P37 00000000 0 EM61000 Series IDE User s Guide 00000000 0 P40 P41 P42 P43 P44 P45 P46 P47 COLUMN SETTING JUMPER 2 Chapter 6 6 9 3 2 Applicable EMV60KB Trigger Keys for Direct 8 H D000000000000000000000090 D00000000000000000000000 D00000000000000000000000 0000000000000000
2. 000000000000000000000000 000000000000000000000000 000000000000000000000000 000000000000000000000000 e oe ooo 0 5 e o0 o eO A O A o A N A A C2 N A N CH A T trae a eta rar EM61000 IDE Series User s Guide Easy Program e 95 Chapter 6 6 9 10 EASY 56 Application Circuit ba ba ba b e Ji bi ba bi 399ggggg ELTETE NOTE Ports 3 4 amp 5 not shown 6 9 10 1 EMV60KB Jumper Configuration for EASY 56 Use Ports 1 amp 2 as the applicable keyboard scan matrix ports Bridge ROW SETTING JUMPER 1 and COLUMN SETTING JUMPER 1 as illustrated below O O O P20 O P10 P21 O P11 P22 o P12 P23 O P13 P24 O P14 P25 o P15 P26 O P16 P27 O P17 ROW SETTING JUMPER 1 96 Easy Program P50 P51 P52 P53 P54 P55 P56 P57 O O O O O O O O O P20 P21 P22 P23 P24 P25 P26 P27 COLUMN SETTING JUMPER 1 EM61000 Series IDE User s Guide Chapter 6 d E B 5 3B d H Applicable keyboard keys are similar with EASY 32 Section 6 9 7
3. veo 000000000000000000000000 000000000000000000000000 000000000000000000000000 ircul 000000000000000000000000 Applicable keyboard keys are similar with EASY 32 Section 6 9 7 2 except applicable keys are extended to include Keys K33 to K40 as indicated below 6 9 8 2 Applicable EMV60KB Trigger Keys for EASY 40 Chapter 6 Ports 3 4 amp 5 not shown NOTE 6 9 9 EASY 48 Application C EM61000 Series IDE User s Guide 94 e Easy Program En Chapter 6 6 9 9 1 EMV60KB Jumper Configuration for EASY 48 Use Ports 1 amp 2 as the applicable keyboard scan matrix ports Bridge ROW SETTING JUMPER 1 and COLUMN SETTING JUMPER 1 as illustrated below o oo o P20 O P10 P50 O P20 P21 O P11 P51 o P21 P22 o P12 P52 O P22 P23 o P13 P53 o P23 P24 O P14 P54 O P24 P25 o P15 P55 o P25 P26 O P16 P56 O P26 P27 O P17 P57 O P27 ROW SETTING JUMPER 1 COLUMN SETTING JUMPER 1 6 9 9 2 Applicable EMV60KB Trigger Keys for EASY 48 Applicable keyboard keys are similar with EASY 32 Section 6 9 7 2 except applicable keys are extended to include Keys K33 to K48 as indicated below A em N q A C2 Wi A D
4. EM61000 Series IDE User s Guide Appendix A Voice ROM Data Allocation e 103 Appendix A 104 e Voice ROM Data Allocation EM61000 Series IDE User s Guide En Appendix B Appendix B MIDI EM61 mid File B 1 Compatible MIDI File Format MIDI files must be compatible with the General Midi GM specification and saved as MIDI Format 1 type files EAE UE 2 x ammo Gwen J mi gi eri BRAH Wavtb mid save ge wn um SR z wa ave file as Format 1 type Bia Options vA Saving MIDI as MIDI Format 1 B 2 MIDI Duration B 2 1 Acceptable Minimum Beat 1 16 beat 649 note 64h rest 1 12 beat 32 Triplet note 32 Triplet rest Acceptable length should be a multiple of the above beats EM61000 IDE Series User s Guide MIDI EM61 mid File e 105 Appendix B kam B 2 2 Quantization and Resolution Use the quantization feature to adjust notes position and apply the shortest beat see Section C 2 1 above as the resolution value Quantize E al x a Strength 100 percent Audition select a uration sm or enter a tick value SE fo 2 uns IV Start Times Window 100 percent Iv Note Durations E Only Notes Lyrics and Audio Offset 0 ticks Stretch Audio Events Using CakeWalk Quantize Dialog for Quantization B 2 3 Timebase It is recommended that the Timebase of your ed
5. EM60000 IDE Series User s Guide Getting Started in File View Mode e 21 Chapter 3 Gan 3 Select Projects tab from dialog and assigna Target d TNR Microcantroller Filename prj name for the new project in the Project Name box suffix prj will auto append to ERES E MGOSDOS playme ody files the filename Gi Source Files i playmelody asm Object Files 4 Locate the folder where you want to store CG 3 Header Files t EM60600S DEF the new project You may use the Browse VOICE DEF icon to find the appropriate folder Seco PEN E EMGO READSKEY ASM 5 Select the target microcontroller for your EMEQ HEADTAIL ASM E MELODY ASM project from the Micro Controller list box 8 FREQ TELDEF XZEMBOMTB 6 Select the project type for your new project xc e from the Type group box default is ASM i PLAYMELODY LST LE playmelody Ist PRC J Map Files 7 Assign system clock frequency by clicking E playmelody map on one of the options provided in the Frequency group box Default is 4 MHz Lj Vaiceview E Fieview 8 Assign desired size for your demo EPROM by clicking on one of the two options provided in the EPROM group box When 4MB default is selected the resulting EPROM data file is suffixed with v40 additional file with v4 suffix is created if file size exceeds 512K When 8MB EPROM is selected the resulting data file is suffixed with v80 27C040 EPROM for 512Kb and 27
6. 000000000000000000000000 000000000000000000000009 dd dd dd d Sc af al at at at al at a HELENE NOTE Easy Program e 87 Ports 3 4 amp 5 not shown 6 9 5 EASY 16 Application C EM61000 IDE Series User s Guide Chapter 6 Pz 6 9 5 1 EMV60KB Jumper Configuration for EASY 16 Use Port 2 as the applicable keyboard scan matrix port Bridge ROW SETTING JUMPER 1 and COLUMN SETTING JUMPER 1 as follows O O O O O O P20 o P50 o o o P20 P21 o P51 o o o P21 P22 o P52 o o P22 P23 o P53 o o o P23 P24 0 o o P54 O P24 P25 0 o o P55 o P25 P26 o O O P56 o P26 P270 O O P57 O P27 ROW SETTING JUMPER 1 COLUMN SETTING JUMPER 1 6 9 5 2 Applicable EMV60KB Trigger Keys for EASY 16 K33 Ku K49 K57 TR1 Trigger Key 1 gt 6 e TR13 Trigger Key 13 TR5 Trigger Key 5 Ww TRO Trigger Key 9 ed K34 K42 an e EES TR2 Trigger Key 2 eJ 0 4 TR14 Trigger Key 14 TR6 Trigger Key 6 WW T R10 Trigger Key 10 K35 K43 K51 K59 TR3 Trigger Key 3 6 0 4 1515 Trigger Key 15 i w TR7 Trigger Key 7 ah TR11 Trigger Key 11 K36 KM K52 Ke TR4 Trigger Key 4 e 6
7. Del erte eee ere eei e UE USER eS 41 5 2 Assembler and Linker Process Flow 42 5 3 Assembler Conventions iecit eet icti arie aeri a TE Sedet eds 43 5 3 1 Statement Syntaxe een TH entier He Eee eine e RET EIE anaes 43 5 3 3 Numeric Presentation erre eet iere tenet eye en EFE denen edd 43 5 3 3 Arithmetic Operations as aa na a a ea nennen eterne nens 44 5 3 31 TEGANG ET A4 5 3 3 2 Summary of the Operators In the Order of Priority 44 5 4 Program Directives uuu ERE GR RR eee 45 5 5 Conditional Assembly sessi erre 49 5 6 Reserved Words teen ice eiecit RR ecce iit ee trei credi tees 51 5 6 1 Directives Operators isa sarea anae an Ee a a eere eene nennen enne rentrer enn Na Ee 51 5 6 2 Instruction Mnemonics cccccscssscessseseeesseessecessecaeceseesseceeeeesseeeeeesseeeneeeaes 5 5 6 3 Register Name antecedentes ee dee E ER eec RT P ederet 51 5 7 Assembler Linker Error Messages 52 5 7 1 Assembler Error Messages cccccccccssscsccsseceseceseeeeseceseceseecsseeeseseseeesseeeseeenees 52 5 7 2 Linker Error MeSsages csssssssscssstessesssecsssesssessseessenessesseeteseessesseatscaneaees 59 6 Easy Program EM61000 Series IDE User s Guide 6 1 Writing an EASY Format ESY Program 61 6 1 1 File HE 61 6 1 1 1 IriputState o ee ertet rentes 62 6 1 1 2 Ee ae 62 6 113 Path EE 63 6 1 1 4 Background esseeseeseeeeeeeneennenen
8. Connecting EM60000 ICE to Host Computer The EM60000 ICE connects to the host computer from the Top Board through 25 pin D type connector As illustrated above the 25 pin male connector at one end of the cable is plugged into the JP2 connector of the Top Board At computer side the other end of the cable is connected to the printer port 18 e System Installation EM60000 Series IDE User s Guide Chapter 2 2 2 1 1 EM60000 ICE Setup You need to configure your emulator s printer port for address compatibility with your host and define Option the ICE code setting that conforms to your target ICE Code Setting microcontroller The Option menu is provided for Project Setting this purpose Easy Project Setting Font Option Menu nad ca ocu aL connection click Connect command from the Option menu The following dialog will display Connect Port Select the appropriate printer port address to connect to your EM60000 ICE Default is 378H Connect Dialog for ICE Connection to Host oo click ICE Code Setting command from the Se Option menu You will O Crystal Frequency be prompted to select O 1MHz one of the two available O 2MHz O 3 58MHz code options from the O 4MHz i O Mu Code Option dialog AM Select the appropriate O 4MB code for your target e KE x microcontroller j Cancel EM60000 IDE Series User s Guide Code Option Dialog for ICE System Inst
9. X multiply Sound Curve Envelope from ENV File X multiply Sound Volume from MIDI File V Final Sound Output EM61000 IDE Series User s Guide Envelope Data EM61 env File e 127 Appendix D DA Envelope Generator and Data Format Envelope data of real sound could be achieved using a basic three stage envelope generator namely AD Attack Decay Sustain and Release Attack Decay AD Sustain Release D 4 1 Data Format Envelope n AD group m D depicts the time taken for the ascending amplitude to reach maximum Attack and the subsequent tapered decay rate Decay These rates of change in the envelope are shaped by samples The duration for each sample is one tick is the next level of the envelope after Decay It is further separated into two parts Sustain Main and Sustain Vibration e Sustain Main where sustain level remains smooth but at slightly tapered angle e Sustain Vibration where the sustain level is in a series of waveform segments smooth repeating change of loudness is pure envelope decay stage that is the envelope value is decreased by M3 decrement at every tick n The assigned number 0 31 E of a particular Envelope m The total number of AD groups H in a particular program D group O level level level level specifies the volume levels D AD group m 1 level D group m 2 level level level with which
10. 10 e Introduction Breakpoint Clear All Breakpoints Generate EPROM File Generate Mask File Clear Trace Memory Run program starting from the current program counter until breakpoints are hit Run program starting from the current program counter until Break Execution command stop debugging occurs Run program starting from the current program counter up to the location where the cursor is anchored applies to ICE debug mode only Perform hardware reset register contents are displayed with initial values Execute instructions step by step with register contents updated at the same time Execute instructions as in Step Into except for Call instruction which is executed as in Go above Stop running program without ICE reset program will resume running from the location where it was last stopped Set debugger in normal editable mode while ICE reset is carried out Debugger in debugging mode sets the Editor window to read only Set or reset a breakpoint Set breakpoint under ROM dialog Clear all active breakpoints Create an EPROM program file epm from the project Create a mask program file msk from the project Clears all trace memory from ICE EM60000 Series IDE User s Guide Option Menu Option Connect ICE Code Setting Project Setting Connect ICE Code Setting Project Setting Easy Project Setting Easy Project Setting Font Window Menu Window New Windo
11. EM61400 24 32 40 48 56 64 EM61500 24 32 40 48 56 64 EM61000 Series IDE User s Guide Gan Chapter 6 2 Chip Body Name Option This option specifies the particular EM61000 Series chip body to be processed under EASY program The valid body name is one of the following EM61001 EM61002 EM61100 EM61200 EM61300 EM61400 EM61500 EM61600 The program ROM voice ROM and I O port configurations for each body are as follows Body PROM VROM Port Port2 Port3 Port4 Ports DAC EM61001 8Kwords 32Kbytes EM61002 8Kwords 32Kbytes EM61100 8Kwords 64Kbytes EM61200 8Kwords 128Kbytes EM61300 8Kwords 256Kbytes EM61400 8Kwords 512Kbytes EM61500 8Kwords 1024Kbytes NOTE Each input output port is 8 bits in width 3 Scankey Routine User N Option If you want to use a keyboard configuration other than the one provided by EASY compiler you can write your own keyboard scan routine and enter the file into the dialog File box to replace the one from EASY compiler after the User N check box is enabled See Section 6 8 1 for the details on how to write a user scankey routine You also need to enter the number of keys of your keyboard into the Keynumber box and the output configuration of the corresponding ports into their respective Port Config boxes 4 Debounce Option This box allows you to define the debounce time of keyboard scan
12. Eree Run Cap Run to Cursor To set the number of times to skip a breakpoint E Reset F12 T Step Into F11 before stopping D Ou Sie En Break Execution F6 1 Click on Breakpoint command from the X Exit Debugging F8 Debug menu Then click on the ROM di Insert Remove Breakpoint F9 sub menu the ROM dialog will display see figure below Z Clear All Breakpoints Accessing ROM Dialog from Debug Menu Enter Loop Counter Rom Oo value here and click Modify button Times to skip before 4 Modify D USERS GUIDEA0903 1GPGNIEST ML line 11 4 time s Location Defined loop counter value appended ROM Dialog Showing Two Defined Breakpoints 2 From the Location list box select enable checkbox the source file s you wish to assign a loop counter 3 Goto the Times to skip before edit box and directly enter the desired loop counter value 0 255 default is 0 or use the spin button to spin for the desired value 4 Click on the Modify button to apply the value Observe the loop counter value being appended at the end of the corresponding breakpoint 3 6 1 3 Enable Disable Breakpoint from ROM Dialog To disable a breakpoint without removing its footprint a useful feature when you want to clear breakpoint temporarily clear the check box of the selected breakpoint EM60000 IDE Series User s Guide Getting Started in File View Mode e 29 Chapter 3 Times to skip before EJ 4 Modify D USER
13. Ports 3 4 amp 5 not shown BJT 8050 R1 BYPASS RESISTOR 6 9 7 1 EMV60KB Jumper Configuration for EASY 32 Use Ports 1 amp 2 as the applicable keyboard scan matrix ports Bridge ROW SETTING JUMPER 1 and COLUMN SETTING JUMPER 1 as illustrated below O O O P20 o P10 P21 o P11 P22 O P12 P23 o P13 P24 O P14 P25 o P15 P26 O P16 P27 O P17 ROW SETTING JUMPER 1 P56 P57 P26 P27 O oo P50 o o o P20 P51 O P21 P52 o o o P22 P53 o P23 P54 O P24 P55 O P25 O O 0000 0000 COLUMN SETTING JUMPER 1 EM61000 IDE Series User s Guide Easy Program e 91 Chapter 6 Pz 6 9 7 2 Applicable EMV60KB Trigger Keys for EAY 32 A zd 1 K25 6 a TR25 Trigger Key 25 el DE g TR1 Trigger Key 1 TR9 Trigger Key 9 E Ko ae RR TR17 Trigger Key 17 TR2 Trigger Key 2 e e e TR26 Trigger Key 26 TR10 Trigger Key r en ki Gs TR18 Trigger Key 18 TR3 Trigger Key 3 le e 6 4 1827 Trigger Key 27 TR11 Trigger Key 11 e QM pou 7 dd 9 Trigger Key 19 TR4 Trigger Key 4 e Te 9 lt R28 Trigger Key 28 TR12 Trigger Key ee ii SO m TR20 Trigger Key 20 TRS Trigger Key5 e 0 e 9 4 1829 Trigger Key 29 TR13 Trigger Key a a TT TR21 Trigger Key 21 TR6 Trigger Key 6 e O Je lt TR30 Trigger Key 30 TR14 Trigger Key aes i ae TR
14. data or contents of register Mi is to be replaced Set which new instrument data or content of register Mi will replace the original instrument Change the original instrument set by MORGINST to new instrument set by MNEWINST Before using this parameter set the original new instrument with MORGINST and MNEWINST parameters beforehand Set the instrument of melody Channel n to data or to the contents of the register Mi during melody playback where n 1 4 for EM61001 002 n 1 8 for EM61100 500 Define the envelope of melody Channel n as data or contents of the register Mi during melody playback where n 1 4 for EM61001 002 n 1 8 for EM61100 500 Define the volume of melody Channel n as data or as contents of the register Mi during melody playback where n 1 4 for EM61001 002 n 1 8 for EM61100 500 Activate execution of the path equation with path name p name when the melody note of Channel n is ON The default value is OFF Pause the current melody playback This is a toggle function Mute the current melody playback This is a toggle function Set tempo value The valid data is 40 to 240 beat min Increase tempo value by one step Decrease tempo value by one step EM61000 Series IDE User s Guide MSTOP DAC1 ON OFF RANGE data1 VOL data2 ASSIGN chan_name1 channel_name2 DAC2 ON_OFF RANGE data1 VOL data2 ASSIGN chan_nam
15. statements ENDP These keywords are used for defining subroutines and to improve programs legibility Examples Banko PROC BC 0x04 6 BC 0x04 7 B INCLUDE Include source files that contain symbol definition macro procedure definition etc Two types of include statement are available one applies to System Default files and the other is applicable to User Defined files The Include System Default files are located in the include sub directory of the IDE directory INCLUDE file name The Include User Defined files may or may not have its full path specified If you do not specify the full path the default path will be used that is the location of the current source files INCLUDE file path file name INCLUDE file name 46 e Assembler and Linker EM61000 Series IDE User s Guide Chapter 5 E PUBLIC The PUBLIC directive exports symbols to other modules PUBLIC label lt label gt B EXTERN The directive used to import external symbols from other modules EXTERN lt label gt lt label gt E VAR Defines assembler time variables Label VAR expression The value of the variable is valid only during assembly time E MACRO ENDM Macro definition statement label MACRO parameters statements ENDM Example Banko MACRO BC 0x04 6 BC 0x04 7 MP_Note see note below MOV A NoteBuf XOR A CPAUSE JBS SF Z JMP SMP Note
16. as the high byte address of data pointer for voice ROM Add the data pointer with data or contents of register Mi Turn on TCC2 timer interrupt Turn off TCC2 timer interrupt Play the melody file It will call the scan loop and execute the next parameter till the playing stops Play the melody file without calling the scan loop nor executing the next parameter immediately Play the melody file and repeat N times Play the melody file and repeat N times without calling the scan loop Easy Program e 71 Chapter 6 Pz MnTONE i inst_data f freq_ Play the tone file in the melody Channel n Specify the data w wav_data e env_data frequency index and initial envelope MCHn STOP MPLAY p_name MORGINST data Mi MNEWINST data Mi MXINST MnINST data Mi MnENV data Mi MnVOL data Mi MnNOTEON p name MPAUSE MMUTE TEMPO data TEMPO TEMPO 72 e Easy Program Where n 1 4 for EM61001 002 n 1 8 for EM61100 500 uam i 2 0 max instrument number 1 inst data is the instrument number freq data is the frequency index 0 26 w data is the waveform index of the instrument 0 2 env data is the envelope 0 127 Stop the tone waveform playback in melody Channel n where n 1 4 for EM61001 002 n 1 8 for EM61100 500 If a melody file is playing the path equation with path name p name will be executed Set which original instrument
17. not the ROMless kernel chip D53 RUN When lit it indicates that the ROMless kernel chip is at running status D54 PWR When lit it indicates that the ICE power is ON EM60000 Series IDE User s Guide Pz Chapter 1 1 3 1 1 Top Board JP3 Connector Pin Assignment The 30x2 JP3 connector provides VCC GND I O ports reset pin and voice output pins as indicated below Pin1 2 GND ground signal Pin 5 12 Port 1 0 Port 1 7 Pin 13 20 Port 2 0 Port 2 7 Pin 21 28 Port 3 0 Port 3 7 Pin 29 36 Port 4 0 Port 4 7 Pin 37 44 Port 5 0 Port 5 7 Pin 45 Kernel chip Reset pin Pin 49 50 VO1 D A 1 Output Pin 53 54 VO1 D A 2 Output Pin 59 60 Vcc Power pins HEADER 2037 EM60000 ICE Top Board JP3 Connector Pin Assignment 1 3 2 EM60000 ICE Bottom Board J3 5V DC Power Connector gt q F1 JP1 ug U3 25 pin D type e Connector female JP2 U8 T ii U7 U5 U6 OFF Power Switch cu ai U4 ON JH1 EM60000 ICE Bottom Board Schematic EM60000 IDE Series User s Guide Introduction e 15 Chapter 1 kam The Bottom Board major components are as follows U1 ICE interface controller chip U2 U3 U6 amp U7 Program code SRAMs U4 amp U5 Trace buffer SRAMs J3 5V power connector positive center
18. o P57 P27 COLUMN SETTING JUMPER 1 6 9 11 2 Applicable EMV60KB Trigger Keys for EASY 64 Applicable keyboard keys are similar with EAS Y 32 Section 6 9 7 2 except applicable keys are extended to include all Keys K1 to K64 as indicated below 000000000000000000000000 000000000000000000000000 000000000000000000000000 000000000000000000000000 A q A N q A RI Wi A A T co A q q e oe o oe 09 053 e o 6 oe e e e oe eO e e o 6 oe e o e e o 6 e e 6 e A co A a o A N A A oO N A K CH A T A q o A o R 98 e Easy Program EM61000 Series IDE User s Guide Gan Appendix A Appendix A Voice ROM Data Allocation A 1 Introduction When compiling the Voice Builder collects the speech melody data codes and writes them to a Voice ROM data file The information in Voice ROM contains Instrument Block Instrument Block Pointer Envelope Block Envelope Block Pointer Melody Code Melody Code Address Pointer User Data and User Address Pointer Each starting address of pointer and each block number are located at the beginning of Voice ROM followed by Instrument Envelope Melody and User Data EM61000
19. 1 3 Introduction to EM61000 ICE esses nennen ener nere 12 1 3 1 EM61000 ICE Top Boa 13 1 3 1 1 Top Board JP3 Connector Pin Assignment eee 14 1 3 2 EM61000 ICE Bottom Board 14 2 System Installation 17 2 1 System Requirements ertet tse EEA adere LC pH FH Era epa 17 2 1 1 Host Computer 17 2 1 2 External Power Bource eerte nek aa enne nnns 17 2 1 3 Audio Speaker ceo e eet t te ia au a 18 2 2 System Installatiori ueteri ee Feet eee Reset eta ine eder aed 18 2 2 1 Connecting EM61000 ICE with Host Computer 18 2 2 1 1 EM61000 ICE eer 19 2 2 3 Installation of EM61IDE Program to Host Computer 20 2 3 Starting the EM6IIDE Program 20 EM61000 Series IDE User s Guide Contents e iii Contents E 3 Getting Started in File View Mode 21 3 Su Tcr TEE 21 3 2 Create New Project soie eiit ehe ee pa eerta 21 3 2 1 Changing the Target Microcontroller Halfway into the Project 22 3 3 Add and Remove Source Files from to Project sss 23 3 3 1 Create New Source File for the Project ssssssssseseeeeneenen 23 3 3 2 Add Existing Source Files to the New Project sss 24 3 3 3 Open Source File or Display its Path 24 3 3 4 Deleting Source Files from Project 25 3 4 Edit a Source File From and Within Project essere 25 3 5 Assemble and Link the Project sss eene eene ener nnnns 26 3 5 1 Assemble Files t
20. 4 1h16 Trigger Key 16 x e TR8 Trigger Key 8 TR12 Trigger Key 12 RI SS eggs KRIER D d B Be 3 2888 eeeeeeee 1 e B BB e D app eee ee e ee E TIT 33 34855 eeeeeleee 33 SEB 6 a 988958 ejeje e e e e e d e 6 6 6 E Ie 6 6 6 6 0 0 m e oo e e e 88 e Easy Program EM61000 Series IDE User s Guide CS Chapter 6 6 9 6 EASY 24 Application Circuit OO LS1 i SPEAKER s BJT 5 8050 1 5 7 R2 y BYPASS RESISTOR A t a NOTE Ports 3 4 amp 5 not shown 6 9 6 1 EMV60KB Jumper Configuration for EASY 24 Use Ports 1 amp 2 as the applicable keyboard scan matrix ports Bridge ROW SETTING JUMPER 1 and COLUMN SETTING JUMPER 1 as illustrated below Oo 0 Oo 0 0 P20 o P10 P50 O P20 P21 O P11 P51 o P21 P22 O P12 P52 O P22 P23 o P13 P53 o o o P23 P24 O P14 P54 o o O P24 P25 o P15 P55 o o o P25 P26 O P16 P56 o o O P26 P27 O P17 P57 o O O P27 ROW SETTING JUMPER 1 COLUMN SETTING JUMPER 1 EM61000 IDE Series User s Guide Easy Program e 89 Chapter 6 Pz 6 9 6 2 Applicable EMV60KB Trigger Keys for EAY 24 K1 K9 K17 TR1 Trigger Key 1 g 6 6 TR17 Trigger Key 17 TR9 Trigger Key 9 N K2 K10 K18 TR2 Trigger Key 2 6 TR18 Trigger Key 18 TR10 Trigg
21. ADD A NoteOn ENDM EM61000 Series IDE User s Guide Assembler and Linker e 47 Chapter 5 Pz E MACEXIT Macro exit statement MACEXIT The assembler will not assemble the statements subsequent to the MACEXIT directive Examples ABC VAR 10 Dank MACRO BC 0x04 6 IF ABC gt 4 MACEXIT ENDIF BC 0x04 7 ENDM Only the source line BC 0x04 6 will be assembled The remaining lines are ignored not assembled B MESSAGE User s output message in the assembler time output window MESSAGE lt characters gt Examples ORG 0x0000 MESSAGE Now set bank to 0 BC 0x04 6 BC 0x04 7 The output window will display USER MESSAGE Now set bank to 0 B Current program counter value User can use this directive as operand Examples JMP Jump to current line which is an infinite idle loop 48 e Assembler and Linker EM61000 Series IDE User s Guide CS Chapter 5 5 5 Conditional Assembly B IF ELSEIF and ENDIF IF conditional directives IF expression statements ELSEIF expression lt statements gt ELSE lt statements gt ENDIF If the expression after the IF directive is true the assembler will assemble the subsequent source lines until ELSEIF ELSE ENDIF directives are encountered Example ORG 0x0000 Bank MACRO num IF num 0 BC 0x04 BC 0x04 ELSEIF num 1
22. All ELATI Assemble Build Rebuild AII Chapter 1 View hide Standard or Build toolbar View hide ICE modes R W flag text file type DOS MAC UNIX keyboard status etc View hide all captions for Project RAM and Output windows View hide gradient shading of all mini windows caption bars View hide Project window View hide Special Register window View hide Control Register window View hide RAM window View hide Output window View hide Document Bar View hide Trace Buffer Create a new project Open an existing project Saves the active project together with all related data Close the active Project window Insert program voice source files into project Insert music tones into project Insert percussion into project Assemble the active file window generate obj file Compile modified files only Compile all files regardless of their recent change status EM60000 IDE Series User s Guide Introduction e 9 Chapter 1 Debug Menu Debug El Go Free Run Run to Cursor 3 Reset 9 Step Into TP Step Over Break Execution X Exit Debugging Ctrl F5 Go F5 Free Run F12 F11 F10 Run to Cursor F6 M Insert Remove Breakpoint Breakpoint amp Clear All Breakpoints F8 F9 Reset Step Into Step Over Break Execution Exit Debugging Insert Remove Breakpoint Tool Menu Tool Generate EPROM File Generate Mask File Clear Trace Memory
23. Alt Backspace Build Toolbar Assemble Ctrl F7 Build F7 Rebuild Free Run Ctrl F5 Go F5 Run to Cursor Step Over F10 Step Into F11 Break Execution F6 Exit Debugging F8 Reset F12 Insert Remove Breakpoint F9 Clear All Breakpoints 13 14 15 16 17 18 19 20 21 22 23 24 25 Introduction e 11 Chapter 1 E 1 2 2 4 Document Bar E BCGDev E Splashercpp E StdAfcepp Ed testasm The Document bar displays the buttons representing each of the active files in the Editor window Click the button of the pertinent file that you wish to place in front of the Editor window to perform editing function is similar with taskbar buttons under Windows 1 2 2 5 Status Bar Cursor position a Keyboard mode Ready Ln8 Col5 DOS OVR CAP NUM SCRL ICE running indicator Text file OS format R W flag While your project is being debugged with EM60IDE ICE an ICE running indicator will show in the status bar The Cursor position indicates the cursor location within the text Editor window Text file OS format is DOS MAC or UNIX R W flag indicates the active file Read Write status If Read only Read will display otherwise the field is empty Keyboard mode displays the status of following keyboard keys B Insert key OVR is dimmed when overtype mode is off highlighted when on B Caps Lock key CAP is dimmed when uppercase character mode is o
24. Auto z Manual under the User Data node of the Project window G ben To remove data file s from the node just select the file and press the Delete key qj T32 WAV 423 Midi Files D WEASEL MID 5 9 User Data 5 A VoiceView m Project Window after Inserting Speech MIDI amp Data Files 4 3 5 How to Insert Instrument Files into Tone Node Manually To manually select instruments from tone library Project and insert them under Manual of Tone node New click the Insert Tones into Project command De from Project menu Select the desired Close instruments from the Source box of the resulting Insert Files to Project Insert Tone dialog and click the Add button to eat Tones into Projesp E d 5 Insert Percussion into Project insert the selected instruments into the gre bl Ctrl F Destination box The selected instruments are A 5 e then displayed under the Manual node after Rebuild All you click the OK button Project Menu Source Dest 000 ACOUSTIC GRAND PIAN 4 001 BRIGHT ACOUSTIC PIA 002 ELECTRIC GRAND PIANI 003 HONKY TONK PIANO 004 RHODES PIANO 005 CHORUSED PIANO 006 HARPSICHORD 007 CLAVINET 008 CELESTA 010 MUSIC BOX VIBRAPHONE did Add button Available tone instruments from tone library Remove button A Cancel Insert Tone Dialog To remove tone instrume
25. B How to add remove source file in a project B How to edit assemble and link the projects B How to debug the project when errors occur B How to generate EPROM and Mask Files from project 4 2 Creating an Entirely New Voice Project To create an entirely new voice project repeat the procedure specified in Section 3 2 of Chapter 3 The newly created voice project will be displayed in the Project window under Voice View tab with its tree structures 1 e Tone Percussion Midi Files Speech Files and User Data nodes see figure at right below The defined project name and microcontroller appear on top of the window You are now ready to insert your source files and start compiling the voice data files Project xl 5 43 EM60600S playmelody files CH Tone 7 CH Auto E 010 MUSIC BOX Wl 011 VIBRAPHONE 4 3 Compiling Project Before you could start compiling you need to initially insert see next section the required midi and binary or table AB 073 FLUTE New SE 43 Manual Open source files into Midi Files Speech E13 Percussion s e pus Files and User Data nodes respectively as anual Insert Files to Project With these nodes filled up you may E Speech Files Insert Tones into Project execute the automatic compilin qp H32 WAV Insert Percussion into Project T g 4 T32 WAV commands Build or Rebuild All from 1429 Midi Files qup pure F WEASEL MID Build F7 Pr
26. File The first two lines show the title and version of version 2 0 the file SWORKDIR D Work61 C61_0001 0927 TWF The SWORKDIR upper case line is where you define the directory path of your twf file C 3 Instrument List Section Instrument List is where you prescribe the instruments for your tone and percussion groups of sound Architectures of its contents are explained below C 3 1 Tone Percussion Instrument Group Field Contents Field Description Tone type instrument can be divided into several groups or Tone group Tone group n where n is the tone group number List the number used in the nth tone group The values following the equal sign states the instrument type or MIDI patch Tone group n number prefixed with T ex T010 T024 etc The numbers are separated by a space Each instrument number represents one type of tone instrument and must be unique from others Percussion type instrument can be divided into several groups or Percussion grou p group Percussion group n where n is the percussion group number List the number used in the nth tone group The values following the equal sign states the instrument number or MIDI patch Percussion group n number prefixed with P ex P035 P040 etc The numbers are separated by a space Each instrument number represents one type of percussion instrument and must be unique from others
27. File from Project Window 24 e Getting Started in File View Mode EM60000 Series IDE User s Guide Chapter 3 3 3 4 Deleting Source Files from Project ER E M60600S playmelody files B Source Files E playmelody asm Object Files E Header Files EM60600S DEF VOICE DEF X EM60 ADR EM60_CLRRAM ASM 8 EM60_READSKEY ASM EMBO HEADTAIL ASM MELODY ASM FREQ TBL DEF 8 EM60 MTB 3 4 List Files NOP LST X PLAYMELODY LST amp playmelody Ist y Map Files E playmelody map FileView EI VoiceView From the Project window select the file s you wish to delete Then press the Delete key from your keyboard Project Window 3 4 Edit a Source File From and Within Project You can edit source files that are already inserted in the project To do so double click the source file you wish to edit from the Project window and the file will open in the Editor window of the EM60IDE Program 7 EMBOGOOS playmelody file E43 Source Files Double click to e Gl emere open amp edit file pan E INCLUDE lt VOICE DEF gt Io CH Header Files INCLUDE ZAEM60 adr List Files m Map Files CM Sch2ADPCM Source file opened for editing define mode flag R18 tone 6 AR Voiceview File view Editing Source File From and Within Project EM60000 IDE Series User s Guide Getting Sta
28. Guide ZERO p name TRn H L p name param0 param N param0 param Mi Mi VROMDATA DP Data Section Name DP_L data Mi DP_M data Mi DP_H data Mi Mi DP_L Mi DP_M Mi DP_H DP DP data Mi TCC2 ON TCC2 OFF MDY Melody Section Name MDY Melody Section Name MDY Melody Section Name N MDY Melody Section Name N EM61000 IDE Series User s Guide Chapter 6 If the zero flag is 1 the path equation with pathname p name will be executed If the trigger TRn is HILL the path equation with path name p name will be executed n can be from 1 and up to the number N of EASY N Execute a set of parameters N times N 0 255 Execute a set of parameters repeatedly The execution time will be in accordance with the contents of register Mi Define the contents of register Mi as the data to be pointed by data pointer of VROM for table read The data pointer will point to the next data automatically Assign the address of data pointer as Data Section Name for voice ROM Assign the low byte address of data pointer for voice ROM Assign the medium byte address of data pointer for voice ROM Assign the high byte address of data pointer for voice ROM Define the contents of register Mi as the low byte address of data pointer for voice ROM Define the contents of register Mi as the medium byte address of data pointer for voice ROM Define the contents of register Mi
29. Introduction project by clicking the Insert Tones into Projects command from Project menu and select the desired instruments from the resulting Insert Tone dialog The selected instruments are then shown under the Manual node Percussion Node contains the percussion instruments defined by your MIDI files Like the Tone node above the Percussion node consisted of two child nodes Auto and Manual It is also initially empty regardless of the presence of MIDI files in the voice project Only after clicking the Build or Rebuild All command from the Project menu see Chapter 4 Section 4 3 1 that the EM60IDE starts to automatically collect the percussion instruments for MIDI files and display them under Auto node Likewise you can manually insert percussion instruments into the voice project by executing the Insert Percussion into Projects command from Project menu and select the desired instrument from its Insert Percussion dialog The selected instruments are then displayed under Manual node Speech Files hold and display the wave files of your choice This is done by clicking the Insert Files to Projects command from the Project menu see Chapter 4 From the resulting Insert File into Project dialog browse for Speech File wav file folder and select the one you want to insert in the voice project The selected Speech File will show under the Speech Files node EM60
30. Pz Like tone instruments you can remove selected SJ EMBOGOOS playmelody files percussions under the Manual node but not E Tone ic E Auto from Auto node To delete percussion files B Manual iz amp 000 acoustic erano pano from Manual node follow the procedure stated E cere AN for Tone node above 5 010 MUSIC BOX E143 Percussion Z3 Auto CH Manual 37 SIDE DRUM ACOUSTIC SNARE OPEN HI HAT Speech Files d H32 wav qj T32 wav Midi Files 5 WEASEL MID E User Data Bj TEST BIN Project Window after Inserting Tone amp Data Files Manually 40 e Getting Started in Voice View Mode EM60000 Series IDE User s Guide En Chapter 5 Chapter 5 Assembler and Linker 5 1 Introduction If your assembly file is yet to be created you can take advantage of the EM6IIDE s New dialog by clicking New command from the File menu to create your new assembly file filename and use the EM6IIDE text editor to compose its content 1 Click the Files tab of the NEW dialog and select the EMC Source File asm as your source file type from the EMC Source File Type list box Files Projects EMC Source File asm E V Add to Project EMC Source File c EMC Header File h Project Name TEST prj File Name 1 2 Location 5 New Dialog Showing File Tab for Creating a New Source File Assign a filename for the new
31. Section 6 1 1 8 above which could help you easily remember the particular registers The valid registers for EM61000 series are as follows Body Valid Registers EM61001 MO M110 EM61002 MO M110 EM61100 MO0 M101 EM61200 MO M101 EM61300 MO0 M101 EM61400 MO M101 EM61500 MO M101 6 3 Path Equation Parameters and Definitions Each path equation definition within a Path block may contain one or more parameters as may be required as shown in the table below The following explains some of the unique segments used in the parameters Mi Registers as defined in Section 6 2 Speech Section Name The speech waveform file wav inserted in the IDE project Melody Section Name The melody file inserted in the IDE project It could be the MIDI mid or Elan s melody intermediary file mit Head Waveform Name The head waveform file inserted in the IDE project Tail Waveform Name The tail waveform file inserted in the IDE project Data Waveform Name The data file inserted in the IDE project Path Name Jump to the other path as defined in the Path block Asm Name Call the In EASY assembly block defined in the Asm block DELAY n Delay n seconds The minimum delay unit is 0 001 seconds For example Delay 0 2 means 0 2 second delay and Delay 8 6 means 8 6 seconds delay RATE n Define the flash rate of flash output pins that are set to P or PI n can be any number from 1 to 8 of the eig
32. Series IDE User s Guide Voice ROM Data Allocation e 99 Appendix A A 2 EM61001 002 100 Voice ROM Configuration The length for each pointer is 2 bytes long Address Voice ROM 0000h Total instrument number 0001h Start address of instrument block pointer 0003h Total envelope number Melody Code 0 Melody Code 1 0004h Start address of envelope block pointer 0005h Total melody code number Melody Code n 1 Instrument Block O pointer 0006h Start address of melody code address pointer 0008h Total user data number Instrument Block 1 pointer 0009h Start address of user data address pointer Melody code address Pointer O Instrument Block n 1 pointer Instrument Block O Instrument Block 1 Melody code address Pointer 1 Instrument Block n 1 Envelope Block 0 pointer Envelope Block 1 pointer User data address Pointer O Envelope Block n 1 pointer Envelope Block O Envelope Block 1 User data address Pointer 1 Template Waveform O Envelope Block n 1 User Data O User Data 1 Template Waveform 1 Template Waveform n 1 100 e Voice ROM Data Allocation User data n 1 EM61000 Series IDE User s Guide Appendix A A 3 EM61200 300 400 500 Voice ROM Configuration The length for each pointer is 3 bytes long Address Voice ROM 0000h Total instrument number 000
33. World Select file View Twf Header Tranlation success Type 1 Tone D Perc The input file is C Program FileSElan6 old MW The output file is C Program FilesElan61 ola AW The template waveform is tone type The data length 1500 Loop start address 1408 Sampling rate 4000 44100 12000 is 92 The loop type is short loop lt 128 The note of this waveform is 48 The begin note of this waveform is 1 The end note of this waveform is c e delta frequency of this waveform is U Ope Sync type is sync e envel AA EM61000 Series IDE User s Guide PZ Appendix C weight specifies the percentage of volume based on the original sound required when specified tone instrument is played Examples 0 zero percentage or none of the original volume is required 1 e no sound mute 60 requires 6096 of the original volume when the specified tone instrument is played 100 requires 10096 of the original volume when the specified tone instrument is played C 3 2 2 Pitch Scale Example T010 This particular instrument number T010 is the name Music Box Music Box tone type instrument per MIDI scale A2 F 4 G4 F 5 G5 B6 A2 B6 is the defined full Scale range gamut It consisted of three pitch scales or segments namely 42 F 4 G4 F 5 and G5 B6 A2 F 4 T010_0 NORMAL 100 G4 F 5 T010 1 NORMAL 100 G5 B6 T010 2 NORMAL 100 Each of the 3 pitch scale o
34. and Find in Files where Build displays assembler linker related messages trace logs and error messages Double click on the error message to link to the corresponding program text line in the Editor window where the source of error occurs Debug displays debugging related messages and their corresponding error messages Find in Files allows you to find a like string selected from an active file from other active or inactive files in your folder Lines containing the like string will display on the Output window complete with its source filename and directory EM60000 IDE Series User s Guide Introduction e 7 Chapter 1 1 2 2 2 Menu Bar and its Commands 8 e Introduction File Edit View Project Debug Tool Option Window Help File Menu Eile New LS Open Close E Save Save As Save All Cla ER Open Project Save Project Close Project amp Print Print Preview Print Setup Ctrl P Recent Files Recent Projects Exit Edit Menu Edit x Undo Alt Backspace Co Redo Cut Shift Del Copy Ctrl C Paste Cte V Select All Chrl A Go to Line Ctrl G g Find Ctrl F Find in Files Replace Ctrl H New Open Close Save Save All Save as Open Save Close Project Print Preview Setup Recent File Recent Projects Exit Create a new project or source file Open an existing document or project Close the active document
35. assembly source file in the File Name box Locate the folder where you want to store the new assembly source file in your disk You may use the Browse icon to find the appropriate folder 4 Check Add to Project check box default if you want to automatically add the new assembly file into your project Otherwise clear the check box 5 Click OK button after confirming your inputs You will be prompted to start writing the newly defined assembly file in the Editor window EM61000 Series IDE User s Guide Assembler and Linker e 41 Chapter 5 kam 5 2 Assembler and Linker Process Flow Assembly file asm EE SE e Included files Assembler and Linker Process Flow Chart 42 e Assembler and Linker EM61000 Series IDE User s Guide Chapter 5 5 3 Assembler Conventions 5 3 1 Statement Syntax The statement syntax is shown in the following format label operator operand operand comment Where 1 Characters enclosed in brackets are optional Space amp Tab Used to separate elements from each other Label The colon is optional and is followed by one or more spaces or tabs A label may consists of alphabets digits and underscores Ex A Z a z 0 9 The digit character 0 9 must not be the first character of a label Only the first 31 characters are recognized Operator An assembler instruction or directive Directives provide the direction to the assembler specifying the manner wit
36. collect notes and assign them to the IC hardware channels automatically The only thing you need to do is to check and be sure that at most only eight notes are active at the same time As the translator support polyphony chord these notes may be located in the same or different tracks staffs If more than eight notes are active at the same time the translator will fail and an error message will display E Ifthere are instruments in the MIDI file that are not supported by the EMOOIDE the translator will show a warning message and replace all the unsupported instruments with the default instrument Insert Tone List 000 Acoustic Grand Piano To view all the instruments available for your application do the following e Click Insert Tones into Project command from the Project menu The Insert Tone dialog will display with the list of all available tone instruments see Section 4 3 4 for more detail e Click Insert Percussion into Project command from the Project menu The Insert Percussion dialog will display with the list of all available tone instruments see Section 4 3 6 for more detail B When editing the common MIDI file on PC percussion can be identified by setting the channel parameter to 10 and use different notes to represent different percussion instruments This is also true in the EM60IDE translation The rule is the same but with some restrictions as described below e The percussion must have its
37. eae gue en 128 D 5 Illustrative Examples and Demonstrations esssesseseeeeeenerennenen 130 D 5 1 Common Enwvelone enne eene enne nnne 130 D 5 2 AD Sustained Without Vibration Envelope cccccccccssceseesecsteeeseeeneeensees 131 D 5 3 AD Sustained with Vibration Envelope sse 133 viii e Contents EM61000 Series IDE User s Guide En Chapter 1 Chapter 1 Introduction 1 1 Overview EM60000 Series Integrated Development Environment EM60IDE is a project oriented development tool for Elan s EM60000 series microcontrollers It is a fully integrated development environment comprising of the EM60000 ICE in circuit emulator and EM60000 IDE software tool MIDI files mid mit Wav files wav User data tbl bin Assembly module asm Object module obj JI EPROM Data File lt I EM60000 IDE pon EM60000 ICE Voice Program Data File EM60000 Integrated Development Environment EM60000 IDE Series User s Guide Introduction e 1 Chapter 1 fim 1 2 Introduction to EM60IDE Program The EM60IDE Program is a Windows based program that is used among other things to develop embedded programs for EM60000 series microcontrollers The embedded program is developed by taking one or more source files in assembly language and translate them into object files that are linked to each other along with one or more libraries The created executable program is then downloaded to EM60000
38. is the same as defined label Cause The external symbol name and internal defined label are identical Solution Modify the internal defined label to differ with external symbol name 54 e Assembler and Linker EM61000 Series IDE User s Guide Chapter 5 B Error A017 error A017 Address of ORG is error Cause The ORG address definition is incorrect Solution Redefine the ORG definition with correct address B Error A018 error A018 MACEXIT can not be set outside macro Cause The MACEXIT instruction is set outside the macro definition Solution Either remove the MACEXIT macro instruction or insert it inside the macro definition B Error A019 error A019 Parameter must be string variable Cause The formal parameter is not defined as a string Solution Change the formal parameter to string B Error A020 error A020 Memory can not be allocated Cause OS memory saturated Solution Close unused applications or any editor window that is currently not used B Error A021 error A021 The source statements exceed k lines Cause The number of lines in the source file exceeds the system default limitation Solution Split the program into two or more smaller programs B Error A022 error A022 The tree is error because of parser error Cause The program line syntax is in error Solution Rewrite and correct the program line EM61000 Series IDE User s Gui
39. label Solution Remove the public or extern variable B Error A037 error A037 The operand value can not be calculated Cause The operand expression format is incorrect Solution Modify the operand expression with correct format B Error A038 error A038 The symbol symbol name is not extern symbol Cause The symbol is not defined as internal nor external Solution Redefine symbol with appropriate symbol name B Error A039 error A039 The reference number is over k limits Cause The reference number of PUBLIC or EXTERN exceeds limitation Solution Decrease the number of external symbols B Error A040 error A040 The length of file name file name exceeds 256 Cause The filename length is over 256 characters Solution Decrease length of filename to within 256 characters 58 e Assembler and Linker EM61000 Series IDE User s Guide Chapter 5 5 7 2 Linker Error Messages B Error L001 error L001 Memory of stack overflow Cause OS unable to allocate extra memory memory full Solution Close unused applications or any editor window that is currently not used B Error L002 error L002 The file name not found Cause The defined filename is missing or cannot be identified Solution Check filename for entry error or whether it exists or not B Error L003 error L003 The Object file format dose not belong to EMC object file format Cause The obje
40. m ASM block name 4 The EASY compiler will locate these blocks and the user defined scan key routine at the end of the end of the program without optimization EASY cannot guarantee that they will be located in the same page either Therefore you have to use FCALL and FJMP in lieu of CALL and JMP commands to place them in the same page 76 e Easy Program EM61000 Series IDE User s Guide En Chapter 6 6 7 Initial Condition After power on or reset the EM61000 Series IC will enter into its hardware initialized condition as described in the EM61000 User Manual Then the EASY program will further implement through software additional initial conditions of its own into the chip 1 All I O ports will be set to output except for the ones that are configured as input in the Trigger option The output initial value is in accordance with port configuration status defined in EASY Project Option dialog see figure below 2 All registers MO M1 are cleared set to 0 3 Speech Channel 1 melody Channels 1 amp 2 are assigned to DACI Speech Channel 2 melody Channels 3 amp 4 are assigned to DAC2 6 8 Options for Configuring EASY Project The following paragraphs provide the options required to configure an EASY project as illustrated in the Easy Project Option dialog shown below The EASY compiler under IDE will read the selected options when compiling the EASY project Easy Project Option
41. playmelody vid E x ke PLAYMELODYASM E E pe e E EM60600S playmelo Y ACC 0x00 GC Tone Be OAR 00 CG Auto msi mmer 0400 Ek dp tel voice Log Fi Le 02 PC 0 00 Special Register ij 073 FLUT Body EM60600S Er 0x00 Window Manual Project D users guideNEM6OK 04JRSR 0400 B E Percussion Date Tue Oct 08 10 38 15 05 INTC 0x00 3 Auto Version 2 1 0EMTC 0x00 Manual i Fl lnstrument list DI mE 1 Tone instrument list ng 0x00 1 0x00 010 MUSIC BOX 09RS 0x00 Encoding wave files Stee 07 EE 00 DU 07 EE ona 2 R a Encoding file D USERS GUIDENEMBDKUSER SGUID 30 44 3A 5C 55 53 45 52 53 E SC1 0 00 Encoding file DAUSERS GUIDEXEMEDK SER SGUIDE D1 20 FF FF FF FF FF FF FF FF Translating MIDI files SEQ 0x00 Control Register _ Translating MIDI File D USERS GUIDE EMBOKUSERS 2130 36 30 30 53 50 4C 41 59 venu 9 Building voice data 02 20 9C D3 00 01 E8 07 EE 00 Window Voice compile success 02 30 4D 36 30 4B 55 53 45 52 JOEREN 0x00 03 20 36 30 30 53 50 4C 41 T MEZ 0 00 03 30 45 41 53 45 4C 2E 4D GI Mca 000 mea aan S E DAT 0400 H SJK am Fes _ le Dos Read CAP NUM 7 RAM Window EM60IDE Main Window Layout The Project window under FileView Mode tab holds the Source Header List and Map Files Where Source Files asm are the source assembly files that are added into the current project Also located under this node are the Object
42. register Mj The carry flag will be changed Easy Program e 67 Chapter 6 Mi R SHIFT Mj Mi L_SHIFT Mj Mi AR SHIFT Mj Mi P1 Mi P2 Mi P3 Mi P4 Mi P5 Mi Mj data Mj data Mi Mj Mk Mj Mk Mi Mj Mk data Mi Mj Mk MI Mi Mk data Mi Mk MI Mi Mk data Mi MkY MI 68 e Easy Program Define the contents of register Mi as the result of one bit right shift of the contents of register Mj The MSB in register Mi becomes 0 The carry flag will be changed Define the contents of register Mi as the result of one bit left shift of the contents of register Mj The LSB in register Mi will be 0 The carry flag will be changed Define the contents of register Mi as the result of one bit arithmetic right shift of the contents of register Mj The MSB in register Mi will be the sign bit of register Mj The carry flag will be changed Set the contents of Mi as the contents that are read from Port 1 Set the contents of Mi as the contents that is read from Port 2 SET the contents of Mi as the contents that is read from Port 3 Set the contents of Mi as the contents that are read from Port 4 Set the contents of Mi as the contents that are read from Port 5 Define the contents of register Mi as the contents of register Mj plus subtract data Define the contents of register Mi as the contents of register Mj plus subtract the contents of register Mk Define the contents of r
43. respectively These files are located in the DEFAULT folder Unslib 0 has no function in the Template List as unlike tone percussion type instruments does not need percussion index However the value is needed to fill in the program allocated slot Otherwise error will occur EM61000 IDE Series User s Guide Instrument Map EM61 ist File e 123 Appendix C 124 e Instrument Map EM61 ist File EM61000 Series IDE User s Guide Gan Appendix D Appendix D Envelope Data EM61 env File D 1 Introduction This Envelope env data file is applicable to EM61000 Series Integrated Development Environent EM61IDE Version 2 0 This tool supports all series of EM61000 chips EM61001 EM61500 The Envelope env data file contains the tone waveform envelope parameters that are required and source d by twf files to play MIDI in conjunction with the Instrument Map ist file under EM61IDE The full sound waveform envelope that is required to produce a complete sound feature to be played with your MIDI are provided in the Envelope env data file A default Envelope env data file is automatically generated when you create a new MIDI project with the EM61IDE program The file which bears the same filenames as that of your project is located under the project folder You can always modify these files to suite the requirements of your project EM61000 IDE Series User s Guide Envelope Data EM61 env Fi
44. should be operation operand operand Cause The syntax format of the statements is in error Solution Modify format as operation operand operand error A004 The label label name is redefined a m o gt e e A Cause The defined label already exists Solution Redefine the label name to make it unique from others error A005 The EQU syntax is label EQU operand a m x o gt e e a Cause The EQU syntax is in error Solution Modify the line to with appropriate syntax 52 e Assembler and Linker EM61000 Series IDE User s Guide Chapter 5 B Error A006 error A006 The INCLUDE nest depth is over 256 Cause The maximum INCLUDE nest depth level is exceeded Solution Decrease the nest depth to within the 256 levels B Error A007 error A007 The IF conditional expression is in error Cause The expression IF conditional is in error Solution Modify the IF conditional with correct expression B Error A008 error A008 Attempt to divide by zero Cause An attempt is made to divide the number of expression by zero Solution Avoid dividing the expression by zero B Error A009 error A009 The assembler dose not support floating point Cause A non supported floating point arithmetic is defined as the assembler number system Solution Change the floating point to an integer number B Error A010 error A010 The s
45. size 76 Bytes Wave length 0 01 sec Sample rate 5952 Hz Coding Type PCM d Speech File Property Dialog The dialog box provides information on filename path file size in byte waveform length in second sampling rate and the current coding type setting You may change the coding type by clicking the arrow of the Coding Type drop down list box 4 3 4 How to Insert User Data into User Data Node User Data node is where your table tb and or Look in Ga eosPlavwetoov el ol cl binary bin files are a ELAIROM E bin inserted for inclusion into TET your voice project to support instrument playback function of the EM60000 series sound processors File name fest Lx Project To insert User Data A Files of type Binary Data Files D bin J Cancel EU click the Insert Files RENE Z to Project command Insert Files into Project Dialog Showing bin Files from the Project menu From the resulting Insert Files into Project dialog browse for the tb or bin folder and select the file you want to insert in the voice project omes Tito Project Insert Percussion into Project Assemble Ctrl F7 I Build F Rebuild AU Project Menu EM60000 IDE Series User s Guide Getting Started in Voice View Mode e 37 Chapter A Pz Project sl Press the OK button in the dialog to apply au E TD selection The selected data files will be shown E
46. table shows patches where EM61000 complies with the 128 preset MIDI specified instruments Note that Patches Number 115 116 and 117 are unique to EM61000 and do not conform to MIDI specified instruments General MIDI General MIDI Patch General MIDI EM61000 Instrument Name Instrument Name No Instrument Name 086 Lead 7 Brit Saw Wave 087 Lead 8 Brass Lead 002 ElectricGrand Piano 089 Pad 2 Warm 047 Timpani Pad 3 Polysynth 048 String Ensemble 1 049 String Ensemble 2 092 Pad 5 Bowed Glass 050 Synth Strings 1 093 Pad 6 Metallic 051 Synth Strings 2 094 Pad 7 Halo 009 Glockenspiel 052 Choir Aahs 095 Pad 8 Sweep 053 Voice Oohs 096 SFX 1 Ice Rain 054 Synth Voice 097 SFX 2 Sound Track Orchestra Hit 098 SFX 3 Crystal 099 SFX 4 Atmosphere 100 SFX 5 Brightness 101 SFX 6 Goblins 016 Hammond Organ 102 SFXT EchoDmps 103 SFX 8 Sci Fiction 061 Brass Section 104 Sitar 062 Synth Brass 1 020 ReedOrgan 063 Synth Brass2 106 Shamisen 065 Alto Sax 108 Kalimba 109 Bagpipe 110 Fiddle 111 Shanai Timkie Bell Agogo Woodblock Major Triad 116 Taiko Drum Minor Triad 117 Melodic Tone Mandol
47. the AD has to pass from the starting level to ending level ranges from 0 to 127 last level 1 1 marks the final AD volume level and the end of the AD stage It also marks the start of the Sustain stage Sustain main ml nl Level ml A constant value 0 127 or 128 e Envelope Data EM61 env File A rate with which the volume H levels decreases at each defined tick value nl during Sustain stage EM61000 Series IDE User s Guide Sustain Vibration m2 n2 Q EM61000 IDE Series User s Guide Appendix D nl The duration number of tick at 48 Ticks per beat required to travel between the set constant volume levels ml Level The final decreasing volume level with which the Sustain stage ends and Release stage starts This occurs when such volume level is equaled or negatively surpassed EXAMPLE 1 Sustain main 3 4 50 Where m1 3 nl 4 ticks amp Level 50 This means that the volume decreases at the rate of 3 levels per 4 ticks until the preset Final Volume level is equal or less than 50 EXAMPLE 2 Sustain main 000 Where m1 0 n1 0 ticks amp Level 0 This means that the envelope has no Sustain stage and will hang at the last AD stage volume level Note that the Sustain main is defined as 0 0 O when Sustain main is in horizontal not tapered or decreasing level or in Vibration wavefor
48. 000 Series IDE User s Guide Current file being edited Chapter 1 Midi Files hold and display the MIDI files of your choice This is done by clicking the Insert Files to Projects command from the Project menu see Chapter 4 From the resulting Insert File into Project dialog browse for Midi File mid file folder and select the one you want to insert in the voice project The selected MIDI file will show under the MIDI files node User Data contains the data files tb and bin required by your application To insert data files click the Insert Files to Project command from the Project menu From the resulting Insert File into Project dialog browse for the text format Text Data File tb folder and select the one you want to insert in the voice project If inserting binary data browse for the Binary Data Files bin folder from the same dialog Press the OK button in the dialog to apply selection The selected data files will be shown under the User Data node Editor Window The EM60IDE Editor is a multi windowed editing tool for initial add 1 1 1 ifvi qu ES creating viewing and modifying source files 0x0000 JMP POWER ON ACC BUF A 2 time The EM60IDE Editor major features are INTC TCIF timer melod JMP TIMER 1 o JMP TCC ISR E Colored syntax highlighting TIMER 1 JBS INTC MIF test for MT UMP weien E Unlimited file
49. 00000000 6 9 4 Direct 9 16 Application Circuit K1 gi TR1 Trigger Key 1 K2 0 4 1 amp 2 Trigger Key 2 K3 g TR3 Trigger Key 3 K4 g TRA Trigger Key 4 K5 e TR5 Trigger Key 5 K6 0 4 16 Trigger Key 6 K7 6 4 187 Trigger Key 7 K8 0 lt TR8 Trigger Key 8 E o o E o o E o o o o O o o o NOTE Ports 3 4 amp 5 not shown E Bg B RE o o SPEAKER BJT 8050 R1 BYPASS RESISTOR EM61000 IDE Series User s Guide Easy Program e 85 Chapter 6 E 6 9 4 1 EMV60KB Jumper Configuration for Direct 9 16 DIRECT 9 16 use Ports 1 amp 2 as input pins for applicable triggers keys which can only be implemented from two EMV60KB keyboards or from one EMV60KB keyboard and one user provided keyboard Both sets of keyboards are connected in parallel Trigger Keys1 8 use the first EMV60KB with Row amp Column jumper settings same with that of DIRECT 8 see Section 6 9 3 1 Trigger Keys 9 16 use the second EMV60KB and the ROW SETTING JUMPER 1 and COLUMN SETTING JUMPER 2 are bridged as follows O O O P20 O P30 O o P40 P21 O P31 O o o P41 P22 O P32 O o o P42 P23 O P33 0 o o P43 P24 O P34 O o o P44 P25 O P35 0 o o P45 P26 O
50. 080 EPROM for 1024Kb are recommended File View Mode Project Window 9 Click OK button after confirming all your choices and inputs The new project is created with the defined project name and microcontroller you have selected displayed on top of the Project window under File View tab which now shows all the source program components Click File View tab if it is not active 22 e Getting Started in File View Mode EM60000 Series IDE User s Guide Gan Chapter 3 3 2 1 Changing the Target Microcontroller Halfway into the Project When you want to change the target microcontroller you P have previously selected for your project click on T Option menu and choose Project Setting command The Project Option dialog shown below listing all the ICE Code Taning available microcontrollers will then display iere EE EMEO Series Font O EMenoo Senno Option Menu O EM60201 O M60301 O Evene Cancel Project Option Dialog for Changing Target Chip 3 3 Add and Remove Source Files from to Project You can either insert existing source files into the new or existing project or create new ones from within EM60IDE text Editor and automatically insert them into the new project 3 3 1 Create New Source File for the Project If your source file is yet to be created you can take advantage of the New dialog by clicking New command from the File menu to create your new source file filename and use the EM
51. 116 Instrument Map EM61 ist File EM61000 Series IDE User s Guide Pz Appendix C C 3 1 1 Tone Percussion Group Example Assign a required tone group for your project and collect the needed tone type instruments for such group i e Group 0 T010 Music Box T024 Acoustic Nylon Guitar etc or as you have defined for the project Define the required percussion type instruments in 3 groups and assign each with the needed E instrument i e Group 0 035 Acoustic Bass percussion group Se Drum Group 1 040 Electric Snare and percission group 27P950 Group 2 050 High Tom or as you have defined for the project Instrument List tone group 1 tone group 0 T010 T024 T033 T046 T072 T073 T074 T091 percussion group 3 percussion group 0 P035 C 3 2 Tone Instrument Pitch Scale Field Contents Field Description Tn Field name with tone instrument number prefixed with T as defined by MIDI Name The corresponding Instrument name for the above instrument number This field defines the full pitch range gamut in used and monitors the start and end points of each range separated by a dash 71 There can Scale be more than one segment in a full pitch range Each segment is separated from others by a space ex A2 F 4 G4 F 5 G5 B Total number of segment in a pitch range cannot exceed 256 The individual segment of the above full pitch range gamut The pitch scale info
52. 1h Start address of instrument block pointer 0004h Total envelope number Melody Code 0 Melody Code 1 0005h Start address of envelope block pointer 0008h Total melody code number Melody Code n 1 Instrument Block O pointer 0009h Start address of melody code address pointer 000Ch Total user data number Instrument Block 1 pointer 000D1h Start address of user data address pointer Melody code address Pointer O Instrument Block n 1 pointer Instrument Block O Instrument Block 1 Melody code address Pointer 1 Instrument Block n 1 Envelope Block 0 pointer Envelope Block 1 pointer User data address Pointer O Envelope Block n 1 pointer Envelope Block O Envelope Block 1 User data address Pointer 1 Template Waveform O Envelope Block n 1 User Data O User Data 1 Template Waveform 1 Template Waveform n 1 EM61000 Series IDE User s Guide User data n 1 Voice ROM Data Allocation e 101 Appendix A A 4 Data Table Address for Include File The starting address of each pointer is defined in the EM61IDE Program generated file adr This file contains the Total Instrument Number Instrument Block Pointer Total Envelope Number Melody Code Pointer Total User Data and the User Data Pointer These are illustrated in the example below A 4 1 For EM61001 002 100 The length of each
53. 2 except applicable keys are extended to include Keys K33 to K56 as indicated below 6 9 10 2 Applicable EMV60KB Trigger Keys for EASY 56 1 o Oo Ze je e e e e e e eo 1 so e e e e e WR Rm mm 5 a aa aa BERRERRE ge e e e e e e e wo N 1 Se e e e e ce DM GL e e 6 6 1 f o le e e e 6 9 1 1 vo e oe 06 Ce h eeeescAmeememmme me See EE E mamme 1 0000000000000000 00000000 000000000000000000000000 000000000000000000000000 gt 000000000000000000000000 9 O c O 000000000 000000000 000000000 000000000 000000000 000000000 coccccces 900000000 G 000000000 000000000 000000000 000000000 S Q q 090000000000000000000000000000 D ft ee00000000000000000000006000000 D O 5 I c 5 o d V kW g lt HN LH NH NN 6 LU Wot el vt hail abet it al dean m AMAM Eo o Oo Easy Program e 97 EM61000 IDE Series User s Guide Chapter 6 kam 6 9 11 1 EMV60KB Jumper Configuration for EASY 64 Use Ports 1 amp 2 as the applicable keyboard scan matrix ports Bridge ROW SETTING JUMPER 1 and COLUMN SETTING JUMPER 1 as illustrated below O O O P20 o P10 P21 o P11 P22 O P12 P23 o P13 P24 O P14 P25 o P15 P26 O P16 P27 O P17 ROW SETTING JUMPER 1 O oo P50 o o o P20 P51 O P21 P52 o o o P22 P53 O P23 P54 o o o p24 P55 O P25 P56 o P26
54. 22 Trigger Key 22 TR7 Trigger Key7 e Je lt TR31 Trigger Key 31 TR15 Trigger Key 15 E e T See TR23 Trigger Key 23 TR8 Trigger Key 8 O le TR32 Trigger Key 32 VH K TR24 TR16 Trigger Key 16 Trigger Key 24 DO0000000000000000000000 DO00000000000000000009000 D0000000000000000000090900 000000000000000000000000 92 e Easy Program EM61000 Series IDE User s Guide CS Chapter 6 6 9 8 EASY 40 Application Circuit m s D u s 5 5 Buh o 8 Ue o o T 5 s 5 Bu ux Q TEE s 4 ZU NOTE Ports 3 4 amp 5 not shown Li SPEAKER BJT a R1 aS RESISTOR 6 9 8 1 EMV60KB Jumper Configuration for EASY 40 Use Ports 1 amp 2 as the applicable keyboard scan matrix ports Bridge ROW SETTING JUMPER 1 and COLUMN SETTING JUMPER 1 as illustrated below O oo O P20 o o o P1o P50 O P21 O P11 P51 O P22 o o o P12 P52 O P23 o P13 P53 O P24 O P14 P54 O P25 o P15 P55 o P26 O P16 P56 O P27 O P17 P57 O ROW SETTING JUMPER 1 COLUMN SETTING JUMPER 1 EM61000 IDE Series User s Guide Easy Program e 93 L Sp i BJT meu SS RESISTOR
55. 6OIDE text editor to compose its content 1 Click the Files tab of the NEW dialog and select the type of source file you want to create from the EMC Source File list box i e asm default for assembly file See for EASY file c for C Language file and for header file Files Projects Pre assign a filename for the new source file EMC Source Filel zer EMC Source File esy EMC Source File c EMC Header File h EMC Source Files File Name Click to browse I for appropriate folder Location EADocuments and Settings sa Cancel New Dialog Showing File Tab for Creating a New Source File 2 Assign a filename for the new source file in the File Name box 3 Locate the folder where you want to store the new source file in your disk You may use the Browse icon to find the appropriate folder EM60000 IDE Series User s Guide Getting Started in File View Mode e 23 Chapter 3 Pz 4 Check Add to Project check box default if you want to automatically add the new file into your project Otherwise clear the check box 5 Click OK button after confirming your inputs You will be prompted to start writing the newly defined source file in the Editor window 3 3 2 Add Existing Source Files to the New Project If your source file is ready you can immediately insert it into your new project 1 From the Menu bar click on Project menu Choose Insert File
56. B 6 1 Tempo R nge eerte ri ht nein tot tri dri eoe ee ideal ao 110 B 6 2 Tempo Limitation eee RE n 110 B 6 3 Multiple Tempos enne nne entente rnn nennen 111 NEM SeMD AE 111 BA Tanitations asas saa aia Bana NG a A ERIDIB HEURE 111 BS rte leede eege 111 C Instrument Map EM61 ist File 113 OMM DPODITIEPERT M 113 C 2 General Section eiit ee redii hiis 116 C 2 1 General Exame 116 C 3 Instrument List SECO isak akasia nag aa ae ENE ENG NAGA KETAN GG NETE ENGGEN d EEN 116 C 3 1 Tone Percussion Instrument Group Field Content 116 C 3 1 1 Tone Percussion Group Example sse 117 C 3 2 Tone Instrument Pitch Scale Field Contents sese 117 C 3 2 1 Pitch Scale Format nennen 118 C 3 2 2 Pitch Scale sample 119 C 3 3 Percussion Instrument Field Contents sssssssssseeeeeeennes 121 C 3 3 Percussion Instrument Example sse 121 CA Template List Section seen rne hern neon de nns 121 CAT Field Contents cscs etic ates A i HS 121 C 4 2 Template Waveform Variable Tomat 122 C 4 2 1 Template Waveform Example seen 122 D Envelope Data EM61 env File 125 DI Nok anereLa Tes aken o Nagan Nn NA ee 125 D 2 Envelop vs Play MIDI 126 D21 Summary ceia co eere ree tete rto re nero teo eee era eo ada ees 126 DA Envelope Generator and Data Format 128 DAI Data Formal teet rene ton tne eet vete ee een ee gude Del aa b aa Yee Pe
57. BS 0x04 BC 0x04 ELSEIF num 2 BC 0x04 BS 0x04 ELSEIF num 3 BS 0x04 BS 0x04 ELSE MESSAGE Error Invalid bank number ENDIF ENDM EM61000 Series IDE User s Guide Assembler and Linker e 49 Chapter 5 E IFE ELSEIFE and ENDIF IFE conditional directives IFE expression statements ELSEIFE expression lt statements gt ELSE lt statements gt ENDIF If the expression after the IFE directive is false the assembler will assemble the subsequent source lines until ELSEIFE ELSE ENDIF directives are encountered IFDEF label lt statemen lt label gt lt statemen ELSEIFDEF ELSE lt statemen ENDIF IFDEF ELSEIFDEF and ENDIF IFDEF conditional directives ts gt ts gt ts gt If the label after the IFDEF directive has been defined the assembler will assemble the subsequent source lines until ELSEIFDEF ELSE ENDIF directives are encountered Example ORG 0x0000 TEST 1 IFDEF TEST MOV A Q0 MOV 0x10 A ENDIF 50 e Assembler and Linker EM61000 Series IDE User s Guide Chapter 5 IFNDEF ELSEIFNDEF and ENDIF IFNDEF conditional directives IFNDEF label statements ELSEIFNDEF label lt statements gt ELSE lt statements gt ENDIF If the label after the IFNDEF directive has been defined the assembler will assemble the subsequent source lines until ELSEIFNDEF ELSE ENDIF directives are e
58. DIR 024 C4 twf 0 t024 2 USER SWORKDIR 024 C5 twf 0 t024 3 USER SWORKDIR 024 C6 twf 0 t033 0 DEFAULT 033 O twf 0 E033 1 DEFAULT 033 1 twf 0 E033 2 DEFAULT 033 2 twf 0 t046 0 USER SWORKDIRV046 C4 twf DT046 0 USER SWORKDIR 046 C4 D10 twf 0 t046 1 USER SWORKDIRN046 C5 twf 0 DTO46 1 USER SWORKDIRV046 C5 D10 twf 0 t046 2 USER SWORKDIRN046 C6 twf 0 DT046 2 USER SWORKDIR 046 C6 D10 twf 0 t072 0 USER SWORKDIRN0O72 C4 twf 4 DTO72 0 USER SWORKDIR 072_C4 D15 twf 4 t072 1 USER SWORKDIRVO72 C5 twf 4 DTO72 1 USER SWORKDIRN072 C5 D13 twf 4 t072 2 USER SWORKDIRNO72 C6 twf 4 DTO72 2 USER SWORKDIR 072 C6 D10 twf 4 t073 0 USER SWORKDIRV073 C4 twf 4 073 1 USER WORKDIR 073 C5 twf 4 t073 2 USER SWORKDIRV073 C6 twf 4 EM61000 IDE Series User s Guide Instrument Map EM61 ist File e 115 Appendix C Ee t074 0 USE t074 1 USE t074 2 USE R SWORKDIR 074 C4 twf SWORKDIRNO74 C5 twf R SWORKDIR 074 C6 twf EET quie e el oe oe A A A oe TO91 0 USE 1 Ke SWORKDIRNO91 G4 twf oe e p035f DEFAULT p035 twf 0 p040f DEFAULT P040 twf 0 p050f DEFAULT p050 twf 0 C 2 General Section This section of the Instrument Map file defines the title and version information of the file and provides the path to your Tone Waveform twf file C 2 1 General Example General title EM61000 Instrument
59. EM61000 Series USER S GUIDE ELAN MICROELECTRONICS CORP Fourth Edition September 2004 Trademark Acknowledgments IBM is a registered trademark and PS 2 is a trademark of IBM Microsoft MS MS DOS and Windows are registered trademarks of Microsoft Corporation Easy Sound is a registered trademark of ELAN Microelectronics Corp O 2000 2004 ELAN Microelectronics Corporation All Rights Reserved Printed in Taiwan ROC 09 2004 The contents of in this manual is subject to change without notice ELAN Microelectronics assumes no responsibility for errors that may appear in this manual ELAN Microelectronics makes no commitment to update or to keep current the information contained in this manual The software described in this manual is furnished under a license or nondisclosure agreement and may be used or copied only in accordance with the terms of the agreement ELAN Microelectronics products are not intended for use in life support appliances devices or systems Use of ELAN Microelectronics products in such applications are not supported and is prohibited NO PART OF THE EASY SOUND AND OF THIS MANUAL MAY BE REPRODUCED OR TRANSMITTED IN ANY FORM OR BY ANY MEANS WITHOUT THE EXPRESS WRITTEN PERMISSION OF ELAN MICROELECTRONICS Elan Microelectronics Shanghai Ltd ELAN MICROELECTRONICS CORPORATION Headquarters Hong Kong Office USA Office No 12 Innovation Road 1 Elan HK Microelectronics Ela
60. Errors Modify source files to correct the errors and repeat assemble and link operations 3 6 Debugging a Project Debug With the source files deprived of its errors you Ge P re now ready to debug the files Be sure th rude pum are now ready to debug the files Be sure the Ay pase COMI EM60000 ICE is properly connected see X Reset F12 Chapter 2 System Installation to your computer D Step Into Fil Step Over F10 Debugging commands are available from the Sii Break Execution F6 Debug Menu as well as from the EM60IDE 9 Exit Debugging Fe Program Toolbar M Insert Remove Breakpoint F9 Breakpoint 0 e Di zh E k3 M Z t Clear All Breakpoints Toolbar for Debugging Commands Debug Menu EM60000 IDE Series User s Guide Getting Started in File View Mode e 27 Chapter 3 3 6 1 Defining Breakpoints and Program Counter Breakpoints are a combination of addresses and loop counter A program stops when one of the defined addresses matches with the contents of the program counter and its relative loop counter decreases to zero When the program stops the contents of program counter all the registers and RAM are read from the emulation chip and displayed in their respective windows The register values that have been recently changed prior to breakpoint execution are expressed in red You can set as many breakpoints as you want 3 6 1 1 Breakpoint Setup 28 e Getting Start
61. F1 Fuse 1A maximum current JP2 25 pin D type connector connects ICE to PC 1 ICE power switch 16 e Introduction EM60000 Series IDE User s Guide Gan Chapter 2 Chapter 2 System Installation 2 1 System Requirements 2 1 1 Host Computer The EM60000 IDE requires a host that meets the following configuration B IBM PC 486 minimum Pentium 100 or greater recommended or compatible computers B Win95 98 2000 WinME NT or WinXP E 800 x 600 pixels monitor is recommended with small fonts display is preferable B Atleast 10M byte or more free hard disk space B Atleast 16M byte of RAM 32 or more is recommended B Mouse is optional but highly recommended 2 1 2 External Power Source The EM60000 ICE hardware requires a single 5 0VDC power source as provided by the power adapter that comes with the EM60000 ICE package The power adapter has a full range input voltage range of 100 to 240 volts A fuse 1A maximum is installed near the DC connector for protecting the ICE from excessive current The DC connector configuration is illustrated herewith spe d9 EM60000 ICE DC Connector Configuration EM60000 IDE Series User s Guide System Installation e 17 Chapter 2 E 2 1 3 Audio Speaker An 80 external speaker is required for audio testing of user s program on Top Board of EM60000 ICE 2 2 System Installation 2 2 1 Connecting EM60000 ICE with Host Computer anm 2 Printer Port
62. Files obj which contains the source linked object files Header Files are the reference files required by assembly programs List Files st are the list files of source assembly files Map File map is the file generated by the linker The root node of the Project window shows your current microcontroller and project filename Introduction e 3 Chapter 1 Target Microcontroller VoiceView Mode Project Window The Project window under VoiceView Voice View Mode Mode tab provides the Tone Percussion Speech Files Midi Files and User Data nodes that contain files for user s EM60600S playmelody files Td utilization in developing voice projects Manual where Percussion Auto Tone Node stores the musical instru c3 Manual i ec 59 TAN Speech Fies ments defined by yolnitially Auto node f H32 wav is empty even if the MIDI files has been lt Taz WAV added into the voice project ur MIDI CH Midi Files T WEASEL MID files The Tone node contains two child lt User Data nodes Auto and Manual Only after the Build or Rebuild All command is executed from the Project menu see Chapter 4 that the EM60IDE starts to automatically collect the instruments from MIDI file and display them under Auto node On the other hand you can Tab Selected lt CR Iessen E FileView manually add instruments into the voice 4 e
63. ICE for simulation verification and debugging 1 2 4 Tools under File View and Voice View Modes 2 Introduction The EM6OIDE Program is integrated with the following resourceful tools File View Mode B Project Manager that create save open and closes project It also manipulates the existing project and source files that are part of the project B Editor that provides editing functions for creating viewing and modifying source files It supports find replace cut copy paste and multi level undo redo B Assembler that supports file include macro assemble arithmetic block comment conditional assemble list and map file B Linker that supports multiple source and object files linking B Source Level Debugger that provides source level debugging function on target embedded on the EM60000 ICE In Circuit Emulator You can explore and analyze the status register and the memory contents of the EM60000 target with the EM60000 IDE With its powerful features like multiple breakpoints real time modification of register contents and disassembly the EM60000 ICE becomes the indispensable pair of EM60000 IDE in offering a perfect development environment for EM60000 series microcontrollers See Chapter 3 for the full discussions of File View Mode functions Voice View Mode B Project Manager that create save open and closes project It also manages and manipulates the existing MIDI files speech files and user data files to sup
64. L 100 G4 F 5 T033 1 SNORMAL 100 G5 B6 T033 2 NORMAL 100 T046 name Harp scale A2 F 4 G4 F 5 G5 B6 A2 F 4 T046 0 NORMAL 100 DI G5 F 7 G4 F 5 T046 1 NORMAL 100 DI T072 name Piccolo scale A2 F 4 G4 F 5 G5 B6 A2 F 4 T072_0 NORMAL 100 DI G4 F 5 T072_1 SNORMAL 100 DI T073 name Flute scale A2 F 4 G4 F 5 G5 B6 A2 F 4 T073_0 SNORMAL 100 G4 F45 TO73 1 NORMAL 100 G5 B6 TO73 2 SNORMAL 100 T074 name Recorder scale A2 F 4 G4 F 5 G5 B6 A2 F 4 T074 0 NORMAL 100 G4 F 5 T074 1 NORMAL 100 G5 B6 T074 2 NORMAL 100 0 1 072 0 072 1 G5 B6 T072_2 NORMAL 100 DT072 2 DETUNE 85 amp amp oe DETUNE 60 DETUNE 60 G5 B6 T046 2 NORMAL 100 DTO46 2 DETUNE 560 DETUNE 85 DETUNE 85 114 e Instrument Map EM61 ist File EM61000 Series IDE User s Guide Appendix C T091 name Chord Voice scale A2 B6 A2 B6 TO91 0 NORMAL 100 P035 name Acoustic Bass Drum template P035f P040 name Electric Snare template P040f P050 name High Tom template P050f Template List E010 0 DEFAULT 010 O twf 0 t010 1 DEFAULT 010 1 twf 0 E010 2 DEFAULT 010 2 twf 0 t024 0 USER SWORKDIRV024 C3 twf 0 t024 1 USER SWORK
65. Limit Description Input state name lt 255 The total number of Input state names Trigger lt 64 Up to EASY 64 Output state name lt 255 The total number of output state names Background re entry lt 128 128 1 Background can use 1 DELAY n 2 play midi amp speech without brackets 3 main path execution limited to BK_ENABLE total value Repeat times of loop lt 255 parameterO pparameter1 N parameter See Note below for maximum N value Repeat times of 255 VoiceParameter N or VoiceParameter N voice playing See Note for maximum N value DELAY n gt 0 001s Delay time valid value EASY routine maximum internal delay time is 63 75s delay If the assigned time exceeds the value the compiler will automatically perform a double delay which total delay time equals to the defined time Name p Op 1 128 p 128 is the maximum value that can be assigned Name k1 p1 k2 p2 lt 256 k256 p256 is the maximum value that can be used Mi IC body The maximum number of registers that can be dependent defined depends on the type of IC body you are using Refer to Section 6 2 Applicable Registers for details Parameter Path um The maximum capacity that can be defined for each In EASY assemble space command depends on the available space of the Macro dependent program ROM in use Symbol NOTE Loop parameter can include voice playing repeat parameter 6 6 Guid
66. P36 O o o P46 P27 O P37 O o o P47 ROW SETTING JUMPER 1 COLUMN SETTING JUMPER 2 6 9 4 2 First EMV60KB Applicable Trigger Keys 1 8 K1 6 TR1 Trigger Key 1 K2 0 4 162 Trigger Key 2 K3 0 4 163 Trigger Key 3 k4 g TR4 Trigger Key 4 K5 g TR Trigger Key 5 D000000000000000000000900 DO00000000000000000000909 D00000000000000000000000 D00000000000000000000000 K6 0 4 156 Trigger Key 6 H K7 8 4 1 amp 7 Trigger Key 7 K8 0 lt TR8 Trigger Key 8 86 e Easy Program EM61000 Series IDE User s Guide Chapter 6 6 9 4 3 Second EMV60KB Applicable Trigger Keys 9 16 ra o m e wW ra e ES S l E ta K6 G9 lt TR9 Trigger Key 9 6 TR1 Trigger Key 10 6 lt TR11 Trigger Key 11 8 lt 1812 Trigger Key 12 K5 0 4 TR13 Trigger Key 13 lt TRi4 Trigger Key 14 K7 g lt TR15 Trigger Key 15 K8 0 4 TR16 Trigger Key 16 K1 K2 K3 K4 OH go aa itio ON ara oor 20000000 ircul 000000000000000000000000 000000000000000000000000
67. S GUIDE 0903_1656 TEST VLG line 11 4 time s Clear Check box to clear breakpoint without removing breakpoint footprint Location ROM Dialog Showing a Breakpoints Cleared without Removing its Footprint Observe the corresponding breakpoint being cleared highlight disappears but its footprint remains E Playmdy asm al x SWAPA RETI MTC ISR BC INTC MIF PAGE 1 JMP MelodySubroutine TCC2 ISR Breakpoint footprint BC INIC TC2IF MOV SF BUF MOV SF A MOV A ACC BUF estore A BC SF Z Z flag Active Source File Showing a Cleared Breakpoint with its Footprint Intact SE To remove a particular breakpoint and its footprint select the breakpoint from the Location list box and click on the Remove button To totally remove all _Penoveat breakpoints and their respective footprints click Remove All button You can also clear all breakpoints and footprints by clicking Clear All Breakpoints from the Debug menu or pertinent icon from Toolbar 3 6 2 Debugging Tools Start and perform debugging with the following commands from the Debug menu or their pertinent icons from Toolbar Go Run program starting from the current program counter until breakpoints pgs are hit and breakpoint address executed 30 e Getting Started in File View Mode EM60000 Series IDE User s Guide Pz Chapter 3 Free Run Run program starting from the current program counter until Break Execution command occu
68. The valid value can be set as 100us 200004s or 80000ys EM61000 IDE Series User s Guide Easy Program e 79 Chapter 6 Gs 5 NO STOP Option If you want to allow voice playback continuously when trigger is received the NO STOP check box should be enabled If this option is disabled the voice playback is stopped once trigger is received 6 Timer Resolution Option This option is used to set the TCC and TCC2 timer interval for TCCAsm and TCC2Asm respectively The TCC value ranges from 1 to 50 ms positive integer only while that of TCC2 ranges from 0 1 to 200 ms The In EASY assembly in the TCCAsm and TCC2Asm sections will be accessed according to this time interval 7 Number of Random Generator Option This option sets up the random number generator A total of three random generators are offered in the EASY program This option sets the range of each random number generator as follows Random1 0 N Random2 0 N Random3 0 N Where N ranges from to 127 8 Initial Port Configuration Option Set the power on initial condition for output ports The setting has no effect on the pins marked as X in the tables on Output Port Configuration for EASY N and DIRECT N for different EASY types These pins will set as High when automatically powered on by compiler 80 e Easy Program EM61000 Series IDE User s Guide En Chapter 6 6 8 1 How to Write a Custom Scankey Routine The scankey routine must consist
69. Trigger Number EsyN C Direct A J F S CUN Fiel ONSE A File Applies to custom Port Config m defined scankey 3 Por II Por III routine only Body name Port 11111111 Port mH 4 Dhome Os zl NO STOP 6 Timer Resolution r TO 1 ms Col 5 ms Random Generator Initial Port Config F Randoml 7123 Por 1111100 Por 11111111 T Random TS Porth 11111111 T Random3 13 Port IH Easy Project Option Dialog EM61000 IDE Series User s Guide Easy Program e 77 Chapter 6 1 Trigger Number Option MATAN This option specifies the input trigger type for the EASY program The valid options are DIRECT 8 16 EASY 24 32 40 48 56 64 Input Trigger DIRECT 4 Port 1 Pin in Use Port 2 Pinin Port 3 Pin in DIRECT 8 DIRECT 9 DIRECT 10 DIRECT 11 DIRECT 12 DIRECT 13 DIRECT 14 DIRECT 15 DIRECT 16 ojooocoo lososo NINN INN INN NTN EASY 16 EASY 24 EASY 32 EASY 40 EASY 48 EASY 56 EASY 64 oco olo oooooosolo o e o M ojlon o wv x oo7 x o v The available trigger key configuration for each body is as follows 78 e Easy Program EM61001 DIRECT N 24 32 40 48 56 64 EM61002 24 32 40 48 56 64 EM61100 24 32 40 48 56 64 EM61200 24 32 40 48 56 64 EM61300 24 32 40 48 56 64
70. allation e 19 Chapter 2 2 2 2 Installation of EM60IDE Program to Host Computer The installation of EM60IDE Program is quite easy Like most software installation procedure under Windows application just follow the instruction of installer until installation is completed 2 3 Starting the EM60IDE Program To start EM60IDE Program click on the EM60IDE icon from desktop or from LN Windows Start menu When starting from the Start menu click Programs then Su look for EM60IDE group and click on EM60IDE icon Once the program is started the main window of the program displays EE ELAN EM6O IDE Ble Edt Ven Project Debug Tool Option Window Help m x amp m m A48t tuo9 95 Bis xi walne 00JAR TCC 0x00 por 0 00 moer 0x00 04RSR 0x00 OSINTC 0x00 MTC 0x00 U7 TCC2 0x00 eps 0400 papa 0400 Q amp Mode 0x00 ton 0x00 CPot 0x00 0D Pot3 0x00 to 0x00 VoiceView tab OF Ports Voice View Mode si mon FileView tab File View Mode oce ics RE 0x00 0x00 EM6OIDE Program Main Window By default the Project window display in File View Mode ready to create new project and process existing source non voice files under the FileView tab Go to the next chapter Chapter 3 for the details of the EM60IDE function under File View Mode To process new voice data using your MIDI files and o
71. and press the Delete key 4 3 3 How to Insert Speech Files into Speech Node ee files to your voice project Lookin ES 600sPLaYMELODY gt KM cl click the Insert Files to en Project command from 1 014E5 44k SBT the Project menu From the Eo resulting Insert Files into weasel Project dialog browse for Speech File wav file folder and select the one you want to insert into the EES voice project and click OK button The selected wave file will show under the Speech Files node of the Project window File name Cancel Insert Files into Project Dialog Showing Speech Files v Z To remove wave file s from the node select the file and press the Delete key 36 e Getting Started in Voice View Mode EM60000 Series IDE User s Guide Chapter 4 You can also set the coding type PCM ASPCM E EM606005S playmelody files or ADPCM for the selected speech wave file by SG 1 Right clicking the filename H32 WAV in Mica the example at right under the Speech Files pad node Manual EI Speech Files 2 Click the Property command from the NGAHAD WAV x qu T32 WAV IS Property resulting shorcut menu and the EM60IDE Mat File will display the Speech File Property a dt SC dialog of the selected speech wave file Sieten Speech File Property Setting Speech File wav Coding Type Filename D NUSERS GUIDENXEMBOKUSER SGUIDENGO00SPLAYMELOD Y H32 WAV File
72. begin with an ampersand amp to indicate that it is a continuation to the previous line of the same path equation definition Refer to Section 6 3 Path Equation Parameters and Definitions for the list of parameters and its corresponding definitions 6 1 1 4 Background BackgroundName parameter0 parameter1 parameterN Background allows the program to execute 2 commands simultaneously The major flow of a program must defined in Path section Background is applicable only when the program needs to perform two things at the same time The switching between main path and background path occurs when delay or voice melody playback command is executed For example play voice in the main path and perform output in background or play voice in background and perform time out in the main path Background process is enabled in the main pathby BK ENABLE name command and can be disabled by BK DISABLE All parameters in Path section can be used in Background section except BK ENABLE and BK DISABLE The path name in some parameters can only be referenced to the name of background path name EM61000 IDE Series User s Guide Easy Program e 63 Chapter 6 kam 6 1 1 5 Asm In EASY Assembly ASM AsmNamel statements label statements AsmName2 statements In EASY assembly provides a block for users to write assembly code in EASY format The syntax of In EASY assembly is the same as the assembl
73. bly source programs 5 Create EPROM Data File for the type of EPROM you have defined in the New dialog setup for creating new project see Section 4 2 If you have chosen the 4MB EPROM the generated EPROM data file will be suffixed with v40 when the file size is within 512K When file size exceeds 512K a second data file will be created with a 4 suffix If the 8MB EPROM is chosen the data file will be suffixed with v60 4 3 1 1 Melody Code Header While compiling the EM60IDE collects the melody and data codes and writes them to a voice data file The melody codes has header containing information about the sampling and tempo The first two bytes are the tempo information The 3 MSB of the first byte is the MTC pre scale value You can write this value to MSR2 0 of prescale control register The second byte is the MTC timer value You can just write this value to the MTC timer counter register By doing so the correct MTC interval corresponding to tempo speed will be set up 34 e Getting Started in Voice View Mode EM60000 Series IDE User s Guide En Chapter 4 4 3 1 2 How EM60IDE Translate Your MIDI File B The EMOOIDE translator will skip the channel setting in the MIDI file Hence the channel setting in MIDI file are ignored and has no influence whatsoever on the hardware channels of EM60000 series IC E Because the EM60000 series IC are only equipped with eight hardware channels the translator can easily
74. chips EM61001 EM61500 An Instrument Map ist file is automatically generated when you create a new MIDI project with the EM61IDE program The file which bears the same filenames as that of your project is located under the project folder You can always modify these files to suite the requirements of your project An example of a modified Instrument Map file TUTOR IST is shown below The file consisted of three major sections namely 1 General Section 2 Instrument List Section 3 Template List Section The following shows the sample contents of each section The subsequent Sections show their detailed function descriptions General title EM61000 Instrument File version 2 0 SWORKDIR D Work61 C61_0001 0927 TWF Instrument List tone group 1 tone group 0 T010 T024 T033 T046 T072 T073 T074 T091 percussion group 3 percussion group 0 P035 percussion group 1 P040 percussion group 2 P050 EM61000 IDE Series User s Guide Instrument Map EM61 ist File e 113 Appendix C T010 name Music Box scale A2 F 4 G4 F 5 G5 B6 A2 F 4 T010_0 NORMAL 100 G4 F 5 T010 1 NORMAL 100 G5 B6 TO10 2 NORMAL 100 T024 name Acoustic Nylon Guitar scale C2 F 3 G3 F 4 G4 F 5 C2 F 3 T024_0 NORMAL 100 G3 F 4 T024 1 NORMAL 100 G4 F 5 T024 2 NORMAL 100 G5 F 7 T024 3 NORMAL 100 T033 name Electric Bass Fingered scale A2 F 4 G4 F 5 G5 B6 A2 F 4 T033 0 SNORMA
75. ct file format is not compatible to EMC object file format Solution Re assemble the source file with EM6IIDE B Error L004 error L004 Symbol symbol name is not defined Cause The symbol is missing i e not defined Solution Define the symbol B Error L005 error L005 Public symbol symbol name is conflicted Cause The defined public symbol is in conflict with other symbol Solution Redefine the public symbol B Error L006 error L006 ROM address k is conflicted Cause The program address is in conflict with another Solution Use the Edit Find menu to find the conflicting address in the list file then modify the program position with proper address EM61000 Series IDE User s Guide Assembler and Linker e 59 Chapter 5 Pz B Error L007 error L007 The file file name can not be created Cause Disk or system refused to create the file Solution Check disk for capacity If okay then try rebooting the system B Error L008 error L008 Line k The machine address k exceeds ROM size k Cause The program address exceeds maximum ROM size Solution Decrease the program code B Error L009 error L009 No project file active Cause No project is opened nor created Solution Open or create a project B Error L010 error L010 No output window found Cause Output window is not displayed Solution Click on View Output The Output window sho
76. de Assembler and Linker e 55 Chapter 5 Pz B Error A023 error A023 allocated memory type memory fault when memory is allocated Cause OS memory already full Solution Close unused applications or any editor window that is currently not used B Error A024 error A024 Set assembler variable must be integer value Cause The result of expression to the right of SET instruction is not an integer value Solution Modify the expression into an integer value B Error A025 error A025 Address of ORG must be integer value Cause The ORG address is not an integer value Solution Rewrite the ORG address expression into an integer value B Error A026 error A026 The k address of PC is out of k ROM size Cause The program counter address exceeds the program ROM size Solution Decrease the code size B Error A027 error A027 The assembler is exceed max pass k Cause The assembler pass exceeds the maximum default pass Solution Check the assembler for errors B Error A028 error A028 The operand k value dose not include the valid data Cause The operand value is invalid Solution Change the operand with valid value 56 e Assembler and Linker EM61000 Series IDE User s Guide Chapter 5 B Error A029 error A029 The k address is conflicted Cause The program address is in conflict with another Solution Use the Edit Find menu to find the conflicting ad
77. display the banked control registers for D A Converter 1 and 2 STACK shows the stack register at 2 byte data length The bottom of the stacked registers is located at the left end column and the stack depth is 8 EM60000 Series IDE User s Guide Pz Chapter 1 You can modify the register content by clicking on the value and key in the desired value RAM Window When values are U1 20 FF FE FF EF EF EF FF FR FE FF FF FF EF FF FF FF changed they 01 30 36 30 30 53 50 4C 41 59 21 00 00 00 50 00 00 00 600SPLAY P are shown in red 2 20 CC 48 FF 00 DC 01 EE 00 20 D7 AC 7F 4F 7B EA D6 H ssa NS 4D 36 30 4B 55 53 45 52 27 53 47 55 49 44 45 5C M60EKUSER SGUIDE 03 20 30 30 53 50 4C 41 59 4D 45 4C 4F 44 59 5C 57 600SPLAYMELODYNW 03 30 4F m3 SH bA SE BF OD F6 DC DF EC 62 D4 59 50 54 OK reten BEST RAM window provides the updated contents of RAM in the same way as in updating the contents of the special registers The address format hex is XX DD example 00 20 means Bank 0 and offset 20 Output Window Ll Configuration Test Project Assembling Test asm Linking Test O error s O warning s gt Nila Debra Find in Filis 7 lt The Output window displays messages announcing results of project compiling such as assembler linker trace log history and debugging including their respective error messages The window consisted of three tab sub windows namely Build Debug
78. dress in the list file then modify the program position with proper address B Error A030 error A030 The file filename could not be opened Cause The prescribed filename is in error or missing Solution Check filename for entry error or whether the file exists or not E Error A031 error A031 The configure file read error Cause The file configuration format is not correct Solution Set up the EM61IDE software again B Error A032 error A032 The file filename can not be opened Cause The prescribed filename is in error or missing Solution Check filename for entry error or whether it exists or not B Error A033 error A033 The macro is not defined Cause The stated macro name cannot be found i e not defined or in error Solution Define a new macro or correct the existing macro name B Error A034 error A034 The expression can not be calculated Cause The expression format is in error Solution Modify the expression with correct format EM61000 Series IDE User s Guide Assembler and Linker e 57 Chapter 5 Pz E Error A035 error A035 The operation operation name is not defined Cause The operation name is not found or not defined by EM6IIDE Solution Check the EM61IDE user menu for valid operators B Error A036 error A036 The PUBLIC or EXTERN label label name must be address label Cause The label defined by PUBLIC or EXTERN is not an address
79. e GM requirements except for the patches of musical instrument Presently the EM61000 Tone Library INSLIB only supports 66 patches User needs to modify the MIDI file in order to fill the missing instrument patches to make it compatible with EM61000 EM61000 IDE Series User s Guide MIDI EM61 mid File e 107 Appendix B B 4 2 Maximum Tones in Channel and Looping The maximum number of tones that can be played at a given moment with EM61000 channel is 8 EM61000 can only accept 4 channels of long loop tones when each loop exceeds 128 bytes B 4 3 Patch Change EM61000 supports multiple patch changes in a channel Bank Patch Change Pot d Channel 1 Cancel Bank Select Hep Method Nomar An example of a Se patch change setup Bank f d in a channel aJ Marimba 7 J 1 Tik P g3 A T on nici ede el x HMSF MBT Ch Kind Data Note D5 98 60 88 60 107 60 Electric Grand Piano 94 112 105 103 2 01 060 2 02 000 2 02 060 110 94 116 102 102 103 112 102 106 Marimba 6 SERRE EE Lt MANU 5 01 000 5 01 030 5 02 030 5 03 000 5 03 090 5 04 030 6 01 000 MENNEN Patch Change Setup in a Channel under CakeWalk 108 MIDI EM61 mid File EM61000 Series IDE User s Guide Pz Appendix B B 4 3 General MIDI vs EM61000 Patches The following
80. e instrument variables T046 0 DT046 0 T046 1 DT046 1 and T046 2 DT046 2 respectively These variables link to tone instrument names stated in the Template List section where the complete properties of the instruments are defined Hence A2 F 4 becomes A2 F 4 T046_0 NORMAL 100 DT046 0 DETUNE 60 Where A2 FH4 is the defined pitch scale segment T046 0 DT046 are the tone instrument variables to be sourced from Template List section NORMAL isthe waveform delta frequency value 0 Normal or no frequency compensation required specified when converting WAV file into TWF file with Wav2Twf tool see figure in Page 6 DETUNE is the waveform delta frequency which value is 999 to 999 but NOT 0 frequency compensation required when the tone instrument is played This value is specified when conver ting WAV file into TWF file with Wav2Twf tool see figure in Page 6 100 60 are the output volume setting in percentage i e 100 for output without Delta F change and 60 for output with Delta F change EM61000 Series IDE User s Guide Appendix C T091 name Chord Voice Scale A2 B6 A2 B6 T091 0 NORMAL 100 This shows an example of a scale with a single pitch segment C 3 3 Percussion Instrument Field Contents Field Description Pn Field name with the percussion instrument number prefixed with P as defined by MIDI name Instrument name te
81. e1 channel name2 M61001 002 not supported HEAD Head Waveform Name HEAD1 Head Waveform Name HEAD2 Head Waveform Name M61001 002 not supported TAIL Tail Waveform Name TAIL1 Tail Waveform Name TAIL2 Tail Waveform Name M61001 002 not supported BK_ENABLE BackgroundName BK_DISABLE EM61000 IDE Series User s Guide Chapter 6 Stop the current melody playback Set up DAC1 control The arguments ON_OFF RANGE VOL and ASSIGN are optional Where ON_OFF ONT turns on DAC ON OFF OFF turns off DAC RANGE data1 or Mi is the value 0 2 VOL data or Mj is the value 0 7 ASSIGN channel name assigns which channel is to be sent into DAC mixer The chan name options are n 1 4 for EM61001 002 n 1 8 for EM61100 500 Set up DAC2 control the argumentS ON OFF RANGE VOL and ASSIGN are optional Where ON OFF ONT turns on DAC ON OFF OFF turns off DAC RANGE data1 or Mi value is 0 2 VOL data or Mj is the value is 0 7 ASSIGN channel name assigns which channel is to be into DAC mixer The chan name options are n 1 8 for EM61100 500 only Play a ramp up waveform specified by Head Waveform Name on DAC1 amp 2 and turn them on Play a ramp up waveform specified by Head Waveform Name on DAC1 and turn it on Play a ramp up waveform speci
82. ed in File View Mode To assign a breakpoint position d Breakpoint Footprint Breakpoint cursor at any point of the line h breaknointi E b E mem nl x where a brea point 1S going to e ORG 0x0000 initial add set and then press F9 key p c ag TE a x IMER MOV ACC BUF A 2 time Observe the line highlighted in red MOV A SF e MOV SF BUF A 0x0004 with a red footprint dot to its left MOV A RSR 05 d MOV RSR BUF A 0x0006 margin JBS INTC TCIF timer melod JMP TIMER 1 s JMP TCC ISR You can also click on the Insert TIMER 1 JBS INTC MIF test for Mi P JMP TCC2 ISR Remove Breakpoint icon hand JMP MTC ISR TCC ISR BC INTC TCIF TEC ISR shape on the toolbar or choose A RSR_BUF restore RSR Insert Remove Breakpoint ns e BRUN EE EE command from the Debug menu SE to set the breakpoint Active Source File with a Defined Breakpoint Likewise the defined breakpoint is cleared if F9 or the hand icon is clicked the second time with the cursor positioned on the defined breakpoint To clear all existing breakpoint click Clear All Breakpoints command from Debug menu or its icon from Toolbar Note that this method of clearing a breakpoint will also remove the breakpoint footprint To remove breakpoint without deleting its footprint use the ROM dialog as explained below EM60000 Series IDE User s Guide Pz Chapter 3 Debug El Go F5 3 6 1 2 Breakpoint Loop Counter Setup
83. egisters Mi amp Mj as the contents of register Mk multiplied by data signed multiplication The high byte of the result will be stored in Mi the low byte will be stored in Mj Define the contents of register Mi amp Mj as the contents of register Mk multiplied by MI signed multiplication The high byte of the result will be stored in Mi the low byte will be stored in Mj Define the contents of register Mi as the resulting contents of register Mk divided by data signed division Define the contents of register Mi as the resulting contents of register Mk divided by the contents of register MI signed division Define the contents of register Mi as reminder of the contents of register Mk divided by data signed division Define the contents of register Mi as reminder of the contents of register Mk divided by the contents of register MI signed division EM61000 Series IDE User s Guide Mis Mi and datalMi and Mk Mi Mj or data Mj and Mk Mi Mj xor data Mj and Mk Mi inv Mj Mi j 1 0 Mi j Mk I Mi j Pn x P2 Mildata P3 Mi data P4 Mildata P5 Mi data Mi data p name Mi Mj p name Mi lt gt data p name Mi lt gt Mj p name Mi data p name EM61000 IDE Series User s Guide Chapter 6 Define the contents of register Mi as the contents of register Mj AND data that of register Mk Define the contents of register Mi as the co
84. elines to Writing Assembly Code When defining blocks Asm TCCAsm and user defined scan key option be sure to take note of the following 1 The following symbols are valid but cannot be assigned twice m The Data Registers note that Mi i 0 1 2 is already defined by EASY compiler EM61000 series register definitions i e RO TCC PC SF RSR INTC MTC R7 R6 R9 MODE PORTI PORT2 PORT3 MULT PRODL EM61000 IDE Series User s Guide Easy Program e 75 Chapter 6 Gs PRODH C DC Z P T PSO PSI PS2 TCIF MIF TCIE MIE ENT WTE WAKEL WAKEH P2L L P2L H PIL IOC5 IOC6 ADDL ADDM ADDH DATA RATE DAI DA2 ENV F1 F2 IOCD IOCE CSCHI CSCH2 CMCHI CMCH2 CMCH3 CMCH4 CVROM CDACI CDAC2 SENT SENA MENA and DAC ON The file ezinclem xxxx def included in the EM61000 IDE package also lists the register definitions which are located in between symbols memon memoff of the file 2 The valid macros are BANK FDEC FDECA FMOV FJBC FJBS FBC FBS FJZ FJZA FSWAP FSWAPA FDJZ FDJZA FINC FINCA FCLR FCOM FCOMA FRRC FRRCA FRLC FRLCA FADD FSUB FAND FXOR FOR MOV SUB OR AND XOR ADD FMPY FCALL and FJMP Refer to ezincluser emc60 inc included in the EM61000 IDE package for the definitions of each item 3 When writing assembly codes EASY compiler will generate internal labels prefixed with ELAN except for the following m Path name
85. elope 2 AD group 1 AD group 0 127 120 115 110 105 100 95 90 1 Sustain main 0 0 0 Sustain Vibration 0 0 0 Release 1 EM61000 IDE Series User s Guide Envelope Data EM61 env File e 131 Appendix D Meaning AD Stage starts at Volume Levels 127 first level in AD Group 0 then at each tick it decays decreases to Level 120 120 gt 115 gt 110 gt 105 SE ass and ends at Level 90 last level in AD Group 0 where Sustain Stage Sustain Stage starts at Volume Level 90 and the level is sustained horizontally 90 gt 90 gt 90 2 until the program release instruction is received before the end of a beat Release Stage starts at the sustained Volume Level 90 and drops to Level 0 as it complies with the program instruction gt 0 and the whole envelope ends The resulting Sound Curve Envelope of the above envelope data 1s shown below Envelope 19 21 lo 1 13 15 17 19 21 23 25 27 29 31 33 35 37 39 4 43 27 29 31 33 35 37 39 41 43 45 47 Tick AD Sustain Program 132 e Envelope Data EM61 env File EM61000 Series IDE User s Guide dom Appendix D D 5 3 AD Sustained with Vibration Envelope The following example shows another unique envelope where its Sustain Main is equal to 0 0 0 but its Sustain Vibration is not The Release stage of this type of envelope will not function in accordance with the beat The program will have the control when to release the Sustain stage before the end o
86. enerate EPROM File command to create EPROM program file Filename will be the same as project name but with epm suffix The EPROM file should not exceed 16K bytes 27C256 or 27C512 EPROM are recommended B Click Generate Mask File command to create msk program file Filename will be the same as project name but with msk suffix The location of the generated EPROM Mask file will be displayed in the Output window By default the files are placed in the same folder where your project file is located 3 8 Save Open and Close Projects To save your new project click Save Project from the File File menu The project is automatically saved in the New same folder where your EM60IDE Program is located Open Ctrl 0 Close To open an existing project click Open Project from E Save ES the File menu You will be prompted to select the project you want to open from the Open Project dialo g Open Project Save Project Look in 3 exe o Al e amp Print Cul4P Bin Print Preview include Prnt Setup ke o ooo Hl M File Menu Files of type Project Files pri z Cancel Zi Open Project Dialog To close the active project click Close Project command from the File menu 32 e Getting Started in File View Mode EM60000 Series IDE User s Guide Chapter 4 Chapter 4 Getting Started in Voice View Mode 4 1 Overview This chapter provides a step by step description on
87. er Key 10 K3 K11 K19 TRS Trigger Key 3 le e lt 15 9 Trigger Key 19 TR11 Trigger Key 11 N K4 K12 K20 TR4 Trigger Key 4 g 6 e lt TR20 Trigger Key 20 7y TR12 Trigger Key 12 K5 K13 K21 TR5 Trigger Key 5 6 TR21 Trigger Key 21 TR13 Trigger Key 13 Trigg d K6 K14 K22 6 lt _ TR22 Trigger Key 22 TR6 Trigger Key 6 TR14 Trigger Key 1di NV KT K K23 e 06 4 TR23 Trigger Key 23 P TR7 Trigger Key 7 TR15 Trigger Key 15 le Ke K16 K24 TR8 Trigger Key 8 Q 4 TR24 Trigger Key 24 TR16 Trigger Key 16 N DO0000000000000000000000 DOO000000000000000000000 O0000000000000000000000 jO0000000000000000000000 H 90 e Easy Program EM61000 Series IDE User s Guide Chapter 6 6 9 7 EASY 32 Application Circuit TR25 TRE TR o o o o o o TREE TRIO TRE o O o o o TRE Tg TR o o o o 1 T o o TREE TRI2 TR o o o o o o pu dE pt or Qum o o o o ER JUL O o O o o o o o TR32 TRA TRIS TRE 9 o 9 VEC d CRYSTAL NOTE
88. er than or equal to that of register Mj the path equation with the path name p name will be executed If the contents of register Mi are less than or equal to data the path equation with the path name p name will be executed If the contents of register Mi are less than or equal to that of register Mj the path equation with the path name p name will be executed if the jth bit of register Mi are equal to 1 0 the path equation with the path name p name will be executed if the contents of register Mi are equal to 0 the path equation with the path name p 0 will be executed If the contents of register Mi are equal to 1 and the corresponding path encounters X don t care the equation will execute the next parameter If the contents of register Mi are equal to 2 the path equation with path name p 2 will be executed so on and so forth The maximum number of path names that can be accommodated in the bracket is 128 If the contents of register Mi equal to k0 the path equation with path name p 0 will be executed If the contents of register Mi equal to k1 the path equation with path name p 1 the equation will be executed and so on and so forth The maximum number of path names that can be accommodated in the bracket is 128 If the carry flag is 1 the path equation with the pathname p name will be executed EM61000 Series IDE User s
89. f a beat Hence the envelope will play in the following manner AD Sustain Vibration Programmed release Example Envelope 3 AD group 1 AD group 0 127 120 115 110 105 100 95 90 1 Sustain main 00 0 Sustain Vibration 4 1 8 Release 1 Meaning AD Stage starts at Volume Levels 127 first level in AD Group 0 then at each tick it decays decreases to Level 120 120 gt 115 gt 110 gt 105 gt and ends at Level 90 last level in AD Group 0 where Sustain Stage Sustain Stage starts at Volume Level 90 then continues to decrease at 4 levels interval per tick until it reaches the bottom Volume Level 82 90 8 Then increases at the same rate from bottom Level 82 back to peak Level 90 90 gt 86 gt 82 gt 86 gt 90 where the Vibration waveform is repeated until the program release instruction is received before the end of a beat Release Stage also starts at the sustained Volume Level 90 and drops to Level O as it complies with the program instruction gt gt 30 and the whole envelope ends The resulting Sound Curve Envelope of the AD Sustained with Vibration using the above data is shown below EM61000 IDE Series User s Guide Envelope Data EM61 env File e 133 Appendix D F T 8 5 3 e e We e amp amp amp E ge N e Ka MN e w e e T eo w 3 1 EM61000 Series IDE User s Guide 134 e Envelope Data EM61 env File
90. ff highlighted when on B Num Lock key NUM is dimmed when the numeric keypad calculator mode is off highlighted when on B Scroll Lock key SCRL is dimmed when cursor control mode is off highlighted when on 12 e Introduction EM60000 Series IDE User s Guide En Chapter 1 1 3 Introduction to EM60000 ICE The EM60000 ICE is the emulation assembly that houses the EM60000 ROMIess kernel chip RAM connectors etc When connected to a host PC through the printer port it lets you download the voice code and program you are developing for an EM60000 series chip In conjunction with the EM60000 IDE program it then allows you to monitor test evaluate debug and modify on line your downloaded program Ss Interface Flat Cable User s Device Ta A Si E 3 Bottom Board To Host PC Printer Port Connector EM60000 ICE Hardware Architecture The complete set of EM60000 ICE comprises of the following hardware modules and cables B A Main Emulation Module consisting of a top and a bottom boards The Top Board is installed piggy backed on the Bottom Board e The top board see figure next page houses the EM60000 ROMIess kernel chip voice SRAMs connectors for voice output speaker crystal RC reset button BJTs the 60 pin connector with I O ports VCC GND voice output amp reset pins that connects to user s verification equipment etc e The bottom board see figure after next page houses the ICE interface controlle
91. fied by Head Waveform Name on DAC2 and turn it on Play a ramp down waveform specified by Tail Waveform Name on DAC1 amp 2 and turn them off Play a ramp down waveform specified by Tail Waveform Name on DAC1 and turn it off Play a ramp down waveform specified by Tail Waveform Name on DAC2 and turn it off Enable a background equation defined in Background block see Background block in Section 6 1 1 4 Disable background equation see Background block in Section 6 1 1 4 Easy Program e 73 Chapter 6 Pz END Power down the chip and stop the program 6 4 Reserved Words The following words are reserved for EASY compiler s internal usage and should NOT be used when defining your own generated labels variable names macros and other parameters ASM ASSIGN AR SHIFT BACKGROUND BK ENABLE BK DISABLE CARRY DELAY END EQU F H INPUTSTATE L L ROTATE L SHIFT LC ROTATE MACRO OUTPUTSTATE PATH RATE R ROTATE R SHIFT RC ROTATE STOP SYMBOL TCCASM X ZERO DP The following reserved words contain subscripts character which denotes number DACi Mi MiiTONE Pi RAND Tri DACT MO to M44 M1TONE P1 RAND1 TRItoTR 64 DAC2 M2TONE P2 RAND2 M3TONE P3 RAND3 M4TONE P4 P5 74 e Easy Program EM61000 Series IDE User s Guide CS Chapter 6 6 5 Limitations The following are some of the existing limitations for the current version of the EASY format program tom
92. h which the assembler is to generate object code at assembly time Operand There can be one or more operands separated by commas Comment A comment can be a line comment or block comment Line comment is preceded by a semi colon Block comment begins with and ends with 5 3 2 Numeric Presentation pe Type 1 Type 2 Type 3 De a OD lt digits gt lt digits gt D lt digits gt exade a 0X lt digits gt lt digits gt H x Octa 0Q lt digits gt lt digits gt Q Bina OB lt digits gt lt digits gt B Note 1 In Type 2 hexadecimal presentation if the first character is not a digit a zero 0 must be added as a prefix 2 If conflict occurs between Type 1 and Type 2 Type 1 will take precedence i e the assembler will use the Type 1 presentation EM61000 Series IDE User s Guide Assembler and Linker e 43 Chapter 5 E 5 3 3 Arithmetic Operations All the assembler arithmetic operations are evaluated during assembly period Errors will be generated if a value is not successfully calculated while assembling The assembler use integer operation and will translate floating point value to integer automatically 5 3 3 1 True and False The assembler uses OxFF as TRUE and 0x00 as FALSE 5 3 3 2 Summary of the Operators In the Order of Priority Parentheses 2 Unary operators Logical NOT Complement Unary minus 3 Multiplication arithmetic operators shif
93. ht flash rate variables 16 n Hz 66 e Easy Program EM61000 Series IDE User s Guide Chapter 6 RandN data Mj p name RandN lt gt data Mj p name RandN zdata Mj p name RandN gt data Mj p name RandN data Mj p name RandN gt data Mj p name RandN zdata Mj p name RandN p 0 x p 2 Mi data Mj Mi RC ROTATE Mj Mi LC ROTATE Mj Mi R ROTATE Mj Mi L ROTATE Mj EM61000 IDE Series User s Guide If the contents of register RandN equal to data register Mj contents the path equation with the path name p name will be executed N can be any number from 1 to 3 If the contents of register RandN do not equal to data register Mj contents the path equation with the path name p name will be executed N can be any number from 1 to 3 If the contents of register RandN do not equal to data register Mj contents the path equation with the path name p name will be executed N can be any number from 1 to 3 If the contents of register RandN are greater than data register Mj contents the path equation with the path name p name will be executed N can be any number from 1 to 3 If the contents of register RandN are less than data register Mj contents the path equation with the path name p name will be executed N can be any number from 1 to 3 If the contents of register RandN are greater than or equal to data register Mj contents the path equation
94. ild command from the Insert Files to Project Assemble amp Link Insert Tones into Project recently modified Insert Percussion into Project Project menu to assemble and files only E Assemble Ctrl F7 link only those source files that Build F7 were recently modified Assemble amp Link all files Rebuild All regardless of their modification status Project Menu 26 e Getting Started in File View Mode EM60000 Series IDE User s Guide Chapter 3 EM60IDE will assemble and link all source files to generate binary bin files using your project name as filename The binary file is automatically saved in the same folder where your source files are located Status of the assembly operation can be monitored from the Output window as shown below Output Window Showing Successful Assembly amp Link Compilation If error is detected during compilation pertinent error message will also display in the Output window Double click on the error message to link to the source of error from corresponding program text line in the Editor window Encoding wave files Translating MIDI files Building voice data Voice compile success Assembling playmelody asm D USERS GUIDESEMBOKUSER SGUIDE 600SPLAYMELODY playmelody asm 44 error A033 The macro is not defined laymelody cds 1 error s or warnina s x Build Find in Files Output Window Showing Assembly amp Link Compilation
95. in 118 Synth Drum 119 Reverse Cymbal 120 Guitar Fret Noise 035 FretlessBass Whistle 121 Breath Noise 079 Ocarina 122 Seashore 080 Lead 1 Square Wave 123 Bird Tweet 081 Lead 2 Saw Tooth 124 Telephone Ring 082 Lead 3 Caliope 125 Helicopter 083 Lead 4 Chiff 126 Applause 084 Lead 5 Charang 127 Gunshot 085 Lead 6 Solo Voice 115 116 amp 117 are EM61000 unique instruments EM61000 IDE Series User s Guide MIDI EM61 mid File e 109 Appendix B kam B 5 Volume B 5 1 EM61000 Playing Volume Modifying the velocity in the MIDI file will change the EM61000 overall playing volume Time di Cancel Help Pitch Set Velocity Velocity Jos setting to adjust output volume Duration 60 wit Chanel fl Modifying Play Volume under CakeWalk B 5 2 Volume Range The acceptable volume range for EM61000 is 0 127 B 6 Tempo B 6 1 Tempo Range The acceptable tempo range for EM61000 is 40 240 B 6 2 Tempo Limitation EM61000 Voice Translator can only accept one tempo for each MIDI If several tempos are available only the last tempo is accepted BB Wavib mid Tempo 1 01 000 120 00 Only the last tempo in a series is recognized Tempo Range Setup 110 e MIDI EM61 mid File EM61000 Series IDE User s Guide En Appendix B B 6 3 Multiple Te
96. in the default directory You must specify the full directory path File name specifies the filename for the template waveform location DEFAULT need to specify the filename only location USER must specify the absolute path name or use amp WORKDIR envelope index specify the type of envelope for template waveform The format is Yon where n is any of the 32 types 0 32 envelope index available Note that this applies to tone instruments only C 4 2 1 Template Waveform Example Template List t010 0 DEFAULT 010 O twf 0 The tone instrument music box is to be sourced from 010 0 twf which is located in the DEFAULT folder Unslib 0 is the Envelope index number as defined in the Envelop env file t072 0 USER SWORKDIRNO72 C4 twf 4 The tone instrument Picolo is to be sourced from 072 c4 twf which is located in the USER defined TWF folder Its path D Work61 C61_0001 10927 TWF is defined in the General section described in Section 2 1 1 above 9 94 is the Envelope index number as defined in the Envelop env file 122 e Instrument Map EM61 ist File EM61000 Series IDE User s Guide p035f DEFAULT p035 twf 0 p040f DEFAULT p040 twf 0 p050f DEFAULT p050 twf 0 Appendix C The percussion instruments Acoustic Bass Drum P035f Electric Snare P040f and High Tom P050f are to be sourced from p035 twf p040 twf and p050 twf
97. ion with the path name p name will be executed If the contents of register Mi do not equal to that of register Mj the path equation with the path name p name will be executed If the contents of register Mi do not equal to data the path equation with the path name p name will be executed Easy Program e 69 Chapter 6 Mi Mj p name Mi gt data p name Mi gt Mj p name Mi data p name Mi Mj p name Mi gt data p name Mi gt Mj p name Mi lt data p name Mi lt Mj p name Mi j 21 0 p name Mi p Ox p 2 Mi k0 p 0 k1 p 1 CARRY p name 70 e Easy Program If the contents of register Mi do not equal to that of register Mj the path equation with the path name p name will be executed If the contents of register Mi are greater than data the path equation with the path name p name will be executed If the contents of register Mi are greater than register Mj the path equation with the path name p name will be executed If the contents of register Mi are less than data the path equation with the path name p name will be executed If the contents of register Mi are less than that of register Mj the path equation with the path name p name will be executed If the contents of register Mi are greater than or equal to data the path equation with the path name p name will be executed If the contents of register Mi are great
98. iting software is set at 1 beat 48 ticks in order to facilitate debugging B 3 Frequency B 3 1 Note Each Note in the MIDI is numbered from 0 to 127 with C 60 as the Mid Note The ability of the current version of EM61000 in recognizing pitch is unstable Refer to 61 tonelib doc for further details 106 e MIDI EM61 mid File EM61000 Series IDE User s Guide En Appendix B B 3 2 Base Octave It is recommended that the setting for Base Octave for pitches is set at C4 60 to facilitate debugging under Cakewalk when Base Octave for Pitches is 1 C4 60 when Base Octave for Pitches is 0 C5 60 General MIDI Folders Drag and Drop Ri SE Iv Show MIDI Activity on Windows Taskbar Iv Display Gradient Backgrounds Display ll Times as SMPTE Allow Only One Open Project at a Time Ask Before Sending System Exclusive When Opening Projects Auto save Every fo Minutes or 0 Changes Base Octave for Pitches _ 1 ZS Base Octave for mon Commands 3 Seconds Pitches value Base Octave for Pitches Setting with CakeWalk Global Options Dialog B 4 Patch and Channel in EM61000 B 4 1 EM61000 Capabilities The General MIDI GM is specified to directly access up to 128 patches of musical instruments numbered 0 127 47 patches of drum and percussion parts numbered 35 81 and 16 channels numbered 1 16 The current version of EM61000 IDE software supports th
99. le e 125 Appendix D Ee D 2 Envelop vs Play MIDI When your MIDI file is played through EM61IDE the codes that defined the tones together with their defined beats and volume variations are read and played in the following sequence EM61IDE reads the assigned MIDI data tone beat volume etc V The IST file is accessed to source for the instrument locations their corresponding volume and the defined Envelope numbers V The TWF file is accessed for the actual sound contents tone instrument percussion instruments voice etc The ENV file is accessed for the full sound characteristics waveform envelope that is required to produce a complete sound feature to be played with your MIDI V Playback sound of the MIDI D 2 1 Summary To summarize MIDI playback sound may be summed up with the following formula Twf x ist 100 x env 127 x midi 127 speaker output The full scale or maximum volume change of TWF ENV and MIDI is 127 while that of IST is 100 Any volume change to any of the files will affect the overall playback output 126 Envelope Data EM61 env File EM61000 Series IDE User s Guide Gan Appendix D Figuratively speaking the playback output may be illustrated as an integration of the basic waveform TWF sound volume change curve or envelope ENV and the MIDI file data as demonstrated in the following figures WAR Waveform from TWF File
100. ll be written with ret as its single instruction EM61000 IDE Series User s Guide Easy Program e 81 Chapter 6 6 9 Application Circuits 6 9 1 EMV60KB Jumpers amp Keyboard Keys Arrangement COLUMN 1 8 Column Setting Jumper 2 Column Setting Jumper 1 HZH DOOO00000000000000000000 D00000000000000000000000 D00000000000000000000000 q DO0000000000000000000000 Row Setting Jumper 2 H Row Setting es Jumper 1 ROW 1 8 ese e e WW ese e e ea 6 9 2 Direct 4 Application Circuit NOTE Ports 3 4 amp 5 not shown 82 e Easy Program EM61000 Series IDE User s Guide Chapter 6 6 9 2 1 EMV60KB Jumper Configuration for Direct 4 Use Port 2 as input key Bridge ROW SETTING JUMPER 1 and COLUMN SETTING JUMPER 2 as follows oo o o o P20 o P10 P30 O R o P40 P21 o P11 P31 o O o P41 P22 o P12 P32 0 o o P42 P23 o P13 P33 0 o o P43 P24 0 o O P14 P34 O o O P44 P25 o o oO P15 P35 O o o P45 P2600 o o P16 P36 O o o P46 P27 Oo o O P17 P37 O o O P47 ROW SETTING JUMPER 1 COLUMN SETTING JUMPER 2 6 9 2 2 Applicable EMV60KB Trigger Keys for Direct 4
101. m state m2 A constant value 0 127 or volume level interval with which the volume levels increases or decreases at each defined tick value n2 during the modulating Sustain Vibration waveform stage n2 the duration number of ticks at 48 ticks beat required to travel between the defined volume level intervals m2 in both up amp down modulation Envelope Data EM61 env File e 129 Appendix D Q the total number of volume L levels between the peak and the lowest volume level in L a Vibration waveform The peak level is the last E volume level of the AD stage e where Sustain level starts EXAMPLE AD last volume level 70 Sustain Vibration 2 3 10 This means the AD stage ends at volume level 70 and where Vibration modulation starts Volume further decreases from Level 70 to Level 60 70 10 at the rate of 2 levels per 3 ticks and increases at the same rate from bottom Level 60 back to peak Level 70 Release X X A constant value 0 127 or a rate with which the volume H levels decreases per tick j during Release final decay stage D 5 Illustrative Examples and Demonstrations D 5 1 Common Envelope The following example shows a common envelope where its envelope Sustain Main 0 0 0 with playback in three stages AD Sustain main Release Example Envelope 0 AD group 1 AD group 0 127 125 114 1 S
102. mplate Template waveform variable name C 3 3 1 Percussion Instrument Example P035 template P035f The percussion instrument P035 is an Acoustic name Acoustic Bass Drum Bass Drum according to MIDI Channel 10 The template P3 5f is linked to percussion instrument name stated in the Template List section where the complete properties of the instruments are defined C 4 Template List Section The Template List section defines the path of your twf file and the corresponding number of your tone instrument in the envelope file env These information are linked by the instrument parameters listed in the Instrument List section C 4 1 Field Contents Field Description Var n Assign a template waveform to this variable name and specify its file path and envelope index The format is var n location file name envelope index EM61000 IDE Series User s Guide Instrument Map EM61 ist File e 121 Appendix C C 4 2 Template Waveform Variable format var location file nam nvelope index Where Var is the name defined by user for template waveform Its length should not exceed over 32 characters and must be unique from others Location indicates the template waveform location in the default directory or otherwise location DEFAULT means template waveform is in the default directory instlib location USER means template waveform is not
103. mpos EM61000 can only accept one tempo in a MIDI If more than one tempo is required chunk the tempo into several parts and place each part into a separate MIDI file Then program them to play continuously B 7 Meter B 7 1 Limitations B EM61000 only accepts one meter within a MIDI If a song contains several meters only the last meter will be recognized as the MIDI s meter The last meter is then utilized as the applicable meter for the whole song E Furthermore only a meter of n 4 is acceptable B 8 Controller Of all the available MIDI Controllers EM61000 can only interpret the No 7 Volume Avoid using the other controller numbers as they will only be ignored Insert Series of Controllers X C Pitch Wheel C RPN CAA Controller C NRPN Help Number Use No 7 Volume RARE Controller only E MIDI E Begin 0 Eom 101000 End p zo Dee oro Tip You may also draw controllers using the Piano Roll view To do so select a track then choose View Piano Roll IR Wl UR IR MIDI Volume Controller Setup EM61000 IDE Series User s Guide MIDI EM61 mid File e 111 Appendix B 112 e MIDI EM61 mid File EM61000 Series IDE User s Guide Gan Appendix C Appendix C Instrument Map EM61 ist File C 1 Introduction The Instrument Map ist file is applicable to EM61000 Series Integrated Development Environment EM61IDE Version 2 0 and supports all series of EM61000
104. n Information Technology Science based Industrial Park Corporation Ltd Group Hsinchu Taiwan R O C 30077 Rm 1005B 10 F Empire Centre 10062 Miller Ave Suite 100 Tel 886 3 563 9977 68 Mody Road Tsimshatsui Cupertino CA 95014 Fax 886 3 563 9966 Kowloon HONG KONG USA http www eme com tw Tel 852 2723 3376 Tel 1 048 366 8223 Fax 852 2723 7780 Fax 1 048 366 8220 http www elanhk com hk Europe Shenzhen Office Shanghai Office Elan Microelectronics Corp Elan Shenzhen Microelectronics Elan Microelectronics Europe Corporation Ltd Shanghai Ltd Dubendorfstrasse 4 Rm 420 4F1 Fuxing Garden 23 Bldg 115 Lane 572 Bibo Road 8051 Zurich SWITZERLAND Fuxing Rd Futian Dist Shenzhen Zhangliang Hi Tech Park Tel 41 43 299 4060 Guandong CHINA 518031 Shanghai CHINA Fax 41 43 299 4079 Tel 86 755 375 0915 6 Tel 86 021 5080 3866 http www elan europe com Fax 86 755 375 0911 Fax 86 021 5080 4600 Gan Contents Contents 1 Introduction 1 LI OVERVIEW fics AE OR RN RR RA DR O RSS EE 1 1 2 Introduction to EM61IDE Program ssssseseeseeeeeneenere nennen enne enne nns 2 1 2 1 Tools under File View and Voice View Modes esee 2 1 2 2 EMOIIDE Main User Interface 3 1 2 2 1 The Child Windows esses 3 1 2 2 2 Menu Bar and its Commandes 7 INA EMISIT 10 1 2 2 4 Document Bar aces iere ra as aapa te eri Danes 11 E E EH 11
105. ncountered 5 6 Reserved Words 5 6 1 Directives Operators 4 Fe H gt gt amp e amp amp lt lt gt gt ELSE ELS F ELSE FDFF ELSE FE ELSE FNDEF ENDIF END ENDM ENDMOD ENDP EQU EXTERN IF FE FDEF FNDEF INCLUDE MACRO MACEXIT MODULE ORG PROC PUBLIC 5 6 2 Instruction Mnemonics ADD AND BC BS CALL CLR COM COMA DAA DEC DECA DJZ DJZA GET INC INCA IOR IOW JBC JBS JMP JZ JZA MOV MPY NOP OR PAGE RET RET RETL RETS RLC RLCA RRC RRCA SLEP SUB SWAP SWAPA WDTC XOR 5 6 3 Register Name A EM61000 Series IDE User s Guide Assembler and Linker e 51 Chapter 5 Pz 5 7 Assembler Linker Error Messages 5 7 1 Assembler Error Messages B Error A001 error A001 Can not find the filename file Cause The file is not found in the folder Solution Check whether the filename is in error or whether the file exits in the corresponding folder B Error A002 error A002 Main and subroutine program can not define label name local label Cause The local label prefixed with label symbol is incorrectly defined in the main and subroutine program Solution Remove the local label from the main or subroutine program a m o gt e e C error A003 The syntax form
106. nd EMV60KB Applicable Trigger Keys 9 16 87 6 9 5 EASY 16 Application Circuit essere 87 6 9 5 1 EMV60KB Jumper Configuration for EASY 16 sss 88 6 9 5 2 Applicable EMV60KB Trigger Keys for EASY 16 s 88 6 9 6 EASY 24 Application Circuit essen 89 6 9 6 1 EMV60KB Jumper Configuration for EASY 24 sss 89 6 9 6 2 Applicable EMV60KB Trigger Keys for EAY 24 sss 90 6 9 7 EASY 32 Application Circuit essere 9 6 9 7 1 EMV60KB Jumper Configuration for EASY 32 sss 91 6 9 7 2 Applicable EMV60KB Trigger Keys for EAY 32 sssssss 92 6 9 8 EASY 40 Application Circuit ereereeeereeeeeeeaeeereeereneran s 93 6 9 8 1 EMV60KB Jumper Configuration for EASY 40 sss 93 6 9 8 2 Applicable EMV60KB Trigger Keys for EASN A0 eaaa aane 94 6 9 9 EASY 48 Application Circuit essere 94 6 9 9 1 EMV60KB Jumper Configuration for BPASYASB 0eenneneneae anane 95 6 9 9 2 Applicable EMV60KB Trigger Keys for EASN AN eaaa nani 95 6 9 10 EASY 56 Application Circuit esses 96 6 9 10 1 EMV60KB Jumper Configuration for EASN ap 96 6 9 10 2 Applicable EMV60KB Trigger Keys for EASY 56 ss 97 vi e Contents EM61000 Series IDE User s Guide Gan Contents 6 9 11 EASY 64 Application Creumt n anane aana n anane aee n ene aen 97 6 9 11 1 EMV60KB Jumper C
107. nnen nennen nennen nennen 63 6 1 1 5 Asm In EASY Assembly sse 64 6 1 1 6 TCCAsm Pm 64 GA AR e EE 65 NE SnuETU OI 65 MN Ms ooo EE 65 6 2 Applicable Registers tre rire eode rie a P e a gawek 66 6 3 Path Equation Parameters and Definitions sse 66 64 Reserved e EE 74 6 5 Limitations ai akan e a giae kag e ede aa a ett e deed 75 6 6 Guidelines to Writing Assembly Code 75 Contents e v Contents E 6 7 eegener o PME T 6 8 Options for Configuring EASY Protect eene T 6 8 1 How to Write a Custom Scankey Routine is nen a ene anaa nenen e anan een 81 6 8 1 1 USER SCAN KEY INI Label 81 6 8 1 2 USER SCAN KEY ET 81 6 8 1 3 USER SCAN KEY END Label ucieiteceio terri Seier 81 6 9 Application Circuits ccccccsscsssesssecssecceeceseceseccesecesecesecesseesceceseeesceseseeeeesesesseesseenses 82 6 9 1 EMV60KB Jumpers amp Keyboard Keys Amrangement een anae 82 6 9 2 Direct 4 Application Circuit essere 82 6 9 2 1 EMV60KB Jumper Configuration for Drect A 83 6 9 2 2 Applicable EMV60KB Trigger Keys for Dmect A 83 6 9 3 Direct 8 Application Circuit essen eene nennen 84 6 9 3 1 EMV60KB Jumper Configuration for Dec 84 6 9 3 2 Applicable EMV60KB Trigger Keys for Dmect 8 85 6 9 4 Direct 9 16 Application Circuit essen eene 85 6 9 4 1 EMV60KB Jumper Configuration for Drect8 Ip 86 6 9 4 2 First EMV60KB Applicable Trigger Keys 1 8 86 6 9 4 3 Seco
108. ntents of register Mj OR data that of register Mk Define the contents of register Mi as the contents of register Mj XOR data that of register Mk Define the contents of register Mi as the result of INVERTing that of register Mj Define the jth bit of register Mi as 1 0 where j can be any value from 0 to 7 Define the jth bit of register Mi as the toggled value of Ith bit of register MK where j and can be any value from O to 7 Define the jth bit of register Mi as Pn x The pin specified in Pn x can be either input or output can be any value from O to 7 Define the output contents of the Port 2 as the content of register Mi or data Only the pin configured as output will be set Define the output contents of Port 3 as the content of Register Mi or data Only the pin configured as output will be set Define the output contents of Port 4 as the content of Register Mi or data Only the pin configured as output will be set Define the output contents of Port 5 as the content of Register Mi or data Only the pin configured as output will be set If the contents of register Mi equal to data the path equation with the path name p name will be executed If the contents of register Mi equal to that of register Mj the path equation with the path name p name will be executed If the contents of register Mi do not equal to data the path equat
109. nts from the Manual node you may return to this dialog and select the instrument you want to delete and click the Remove button Or select the unwanted instruments directly from under the Manual node and press Delete key 38 e Getting Started in Voice View Mode EM60000 Series IDE User s Guide Chapter 4 4 3 6 How to Insert Instrument Files into Percussion Node Manually Percussions can be very helpful when used to augment instruments not available from you MIDI files and provide special effect when required EM60IDE will record and add percussions to the melody table during compilation Project New Open Save Close The procedure of inserting percussions under Manual of Percussion node is practically the same as it Is done under Tone node see Section 4 3 3 Their only difference is use the Insert Inse Insert Files to Project nsert Percussion into Project Percussion into Project command to display its pertinent Insert Percussion dialog as displayed below Assemble Rebuild All Ctrl F ER Project Menu Available tone instruments from percussion library Source EM60000 IDE Series User s Guide Getting Started in Voice View Mode e 39 ACOUSTIC BASS DRUM 4 ACOUSTIC SNARE HAND CLAP ELECTRIC SNARE CLOSED HI HAT HIGH FLOOR TOM LOW TOM OPEN HI HAT LOW MID TOM HI MID TOM Remove button Insert Percussion Dialog Chapter A
110. o Generate Object Pie 26 3 5 2 Assemble and Link Files to Generate Binary File 26 3 6 Debugging Project sse ect e ie Irt e ie palier 27 3 6 1 Defining Breakpoints and Program Counter sees 28 3 6 1 1 Breakpoint Setup 28 3 6 1 2 Breakpoint Loop Counter Semi 29 3 6 1 3 Enable Disable Breakpoint from ROM Dalog 29 3 62 Debugging Tools eee eerte tie e reel eie c d 30 3 0 2 View Trace BOIIGE ss sayogane ag anga e head eda s e iiu EC enda diti 31 3 7 Generate EPROM and Mask Files from Protect nean anana ena anana aana 32 3 8 Save Open and Close Projects ccccccssecssseesceesseeseceseessecesseeeseesecseeeseeeeseeesseeeeeenees 32 4 Getting Started in Voice View Mode 33 ONES 1o P 33 4 2 Creating an Entirely New Voice Project cccccccscccscssscesscesseeeseeeseceeeseseeesseeseeseneeenees 33 4 3 Compiling Project csesviccccslnciis etie tee eiecit A e e Rae eed b nawe 33 4 3 1 Building Voice Data 34 4 3 1 1 Melody Code Header 34 4 3 1 2 How EMOIIDE Translate Your MIDI File 35 4 3 2 How to Insert MIDI files into MIDI Node 36 4 3 3 How to Insert User Data into User Data Node seos eee n eea ene anane 36 4 3 4 How to Insert Instrument Files into Tone Node Manually 37 4 3 5 How to Insert Instrument Files into Percussion Node Manually 38 iv e Contents EM61000 Series IDE User s Guide E 5 Assembler and Linker Contents
111. of three sections as illustrated in the following example USER SCAN KEY INI initialization assembly instructions ret USER SCAN KEY user scankey main program assembly instructions MULT internal register where trigger number are located mov MULT A ret USER SCAN KEY END instructions right before end sleep mode ret 6 8 1 1 USER SCAN KEY INL Label This label will be called during chip s power on initialization Assembly code that requires single initialization may also be written under this label However the label should not include any I O initialization pin parameter If no initialization function is required the label must still be written with ret as its single instruction 6 8 1 2 USER SCAN KEY Label The user main scankey routine is located in this label This label and its instructions are picked up and processed by EASY compiler The resulting scan value should be placed in the MULT register and ret instruction executed The resulting value could be either 0 or one of the Trigger Numbers 0 means trigger is at released position and a Trigger Number means the pertinent trigger is pressed 6 8 1 3 USER SCAN KEY END Label Before EASY lapses into sleep mode it will call the USER SCAN KEY END label and process any instruction contained therein If required you could add your assembly code into this label If no END function is required the label must sti
112. oject menu and the EM60IDE starts to Ga User Data Rebuild m automatically collect the tone and Project Men SERE TERR RS d percussions instruments from MIDI file Voiceview and display them under Auto of Tone Project Window after Auto and Percussion nodes respectively Compilation EM60000 IDE Series User s Guide Getting Started in Voice View Mode e 33 Chapter 4 E You can also manually select your own instrument files from your tone and or percussion library and insert them into Tone and or Percussion nodes in addition to or independent from midi supplied files See Section 4 3 4 and 4 3 5 on how this is done The same Build or Rebuild All command is used to compile the manually inserted instruments 4 3 1 Building Voice Data Whenever the Build or Rebuild All command is executed the EM60IDE will automatically accomplished the following tasks Note that all the generated files will bear the same filename as that of the defined voice project name and are placed in the same folder where your project is located 1 Collect the instruments from the MIDI files or the manually inserted instruments and translate them into melody codes 2 Translate the text data bin and collects the binary CX bi files Create Voice Data File for downloading into the EM60000 ICE The automatically created file is suffixed with vd 4 Generate MIDI data start address information which can be included in your assem
113. onfiguration for EASY 64 sss 98 6 9 11 2 Applicable EMV60KB Trigger Keys for EASY 64 98 Appendix A Voice ROM Data Allocation 99 A T Introdu cti n xi ak aa KAG ONG O ENE KEN E DRIN eH 99 A 2 EM61001 002 100 Voice ROM Confeuratpon ee en nenen a nane n anane nn nee 100 A 3 EM61200 300 400 500 Voice ROM Confeuratnon erros 101 A 4 Data Table Address for Include Pie 102 A 4 1 Por BEMOTODT OO02 TOU o iso aite UR NIHU Erden 102 AAD EREECHEN 103 B MIDI EM61 mid File 105 B 1 Compatible MIDI File Format 105 B2 MIDI hl 105 B 2 1 Acceptable Minimum Beat 105 B 2 2 Quantization and Resoluton nennen 106 B23 Tie ase MR egene RSA RR 106 B 3 FrequetiCy inii eere e ee e HERO vere e E re aa a FERE UE erre ee eu Orge da ode ts 106 AXE 106 B 3 2 Base Octave iscritte Eee e ee Ced En a Ree dass 107 B 4 Patch and Channel in EM61000 sss nennen 107 B 4 1 EM61000 Capabilities esses nnne 107 B 4 2 Maximum Tones in Channel and Looping esee 108 B43 Patch Change onere ne e RETE 108 B 4 3 General MIDI vs EM61000 Patches erraram 109 him diwIeC 110 B 5 1 EM61000 Playing Volume nennen enne 110 B5 2 Volume Range d entere reete E REUNIR EIE Ye sai 110 EM61000 Series IDE User s Guide Contents e vii Contents E B 6 Temp E E YANA 110
114. or project Save current all active document s Save the active document with new filename Open Save Close the active project Print preview printed format of the active document define printer settings View record of the recently closed source files projects Exit from EM60IDE Program See Chapter 3 for details on how to create a new project as well as manipulate existing ones Undo Redo Cut Copy Paste Select AII Go to Line Find Find in Files Replace Undo last edit action Cancel last undo Same as standard clipboard functions Select all contents of the active window Move cursor to the defined line number within the active window Find strings in the active window Find strings within one or more files Same as standard find amp replace editing functions EM60000 Series IDE User s Guide View Menu Toolbars View Toolbars Status Bar Status Bar Control Bar Captions d diend Captions Control Bar Captions m ecial Register Gradient Captions Control Register RAM Bank BS Output Project v Document Bar Special Register Trace Buffer Control Register RAM Bank Output Document Bar Trace Buffer Project Menu New Project Open New Save Close Open Save Ska Insert Files to Project Insert Files to Project Insert Tones into Project Insert Percussion into Project Insert Tones to Project 8 Assemble CuhF7 Insert Percussion into ES Build F7 Project Rebuild
115. own exclusive track In the MIDI edit tool use a track to place the percussion and set the channel parameter to 10 Do not insert any other instrument The translator will look for the tracks that have its channel parameter set to 10 All the notes in these tracks will be recognized as percussion instruments e The MIDI events such as Program Change Volume etc will be omitted EM60000 IDE Series User s Guide Getting Started in Voice View Mode e 35 Chapter 4 Pz 4 3 2 How to Insert MIDI files into MIDI Node To insert one or more MIDI files to your voice proj ect Insert Files into Project 2 x click the Insert Files to Look in Cu 600 FLAYMELODY amp Al ol M s WEASEL J bi harmo i2 BELL sor ja DEMOMIDI mit jo BABY D BOAT 2 LAMB o bi 5 bell D canon piano61 2 LoveMe 3 b1_1 BELL DECK D CAR D MICE Zilpi 3 D tel mpi3 al 2 Deck 1 2 ok M bi 2s bell quan 2 demomidi 9 OLDman Project command from the Project menu From the resulting Insert Files into Project dialog browse for Midi File mid file folder and select the one peres you want to insert into the EE Ceci voice project and click OK Insert Files into Project Dialog Showing MIDI Files button The selected MIDI file will show under the Midi Files node of the Project window Midi Files md rit To remove MIDI file s from the node select the file
116. playmdy asm 140 0X17 0X17 D EM61Test 0903_1656 playmdy asm 141 0X3 0X2 D EM61Test 0903_1656 playmdy asm 142 0X69 D EM61Test 0903_1656 playmdy asm 143 D EM61Test 0903_1656 playmdy asm 140 0X17 0X17 D EM61Test 0903_1656 playmdy asm 141 0X3 0X2 D EM61Test 0903_1656 playmdy asm 142 0X69 D EM61Test 0903_1656 playmdy asm 143 D EM61Test 0903_1656 playmdy asm 140 0X17 0X17 D EM61Test 0903_1656 playmdy asm 141 0X3 0X2 D EM61Test 0903_1656 playmdy asm 142 0X69 D EM61Test 0903_1656 playmdy asm 143 D EM61Test 0903_1656 playmdy asm 140 0X17 0X17 D EM61Test 0903_1656 playmdy asm 141 0X3 0X2 D EM61Test 0903_1656 playmdy asm 142 0X69 D EM61Test 0903_1656 playmdy asm 143 D EM61Test 0903_1656 playmdy asm 140 0X17 0X17 D EM61Test 0903_1656 playmdy asm 141 0X3 0X2 D EM61Test 0903_1656 playmdy asm 142 0X69 D EM61Test 0903_1656 playmdy asm 143 Trace Buffer Display To close trace buffer click the Trace buffer command again EM60000 IDE Series User s Guide Getting Started in File View Mode e 31 Chapter 3 dim 3 7 Generate EPROM and Mask Files from Project EM60IDE Program allows you to generate EPROM M Tool Mask files f ficat lication and Mask files for demo board verification application ESRC To generate EPROM epm and Mask msk Generate Mask File Clear Trace Memory program files from your active project go to the Tool menu Tool Menu B Click G
117. pointer is 2 bytes Midi file0 userdata file0 is the filename of the MIDI file or of the user data you have added inst number n inst block 0x1234 inst block L 0x34 inst block H 0x12 env number m env block 0x5678 env block L 0x78 env block H 0x56 melody number melody code OxABCD melody code L 0xCD melody code H 0xAB midi file0 OxBBCD midi fileO L OxCD midi file0 H OxBB userdata number 1 userdata 0xCF12 userdata L 0x12 userdata H OxCF userdata file0 OxDF34 userdata file0 L 0x34 userdata file0 H OxDF 102 e Voice ROM Data Allocation EM61000 Series IDE User s Guide A 4 2 For EM61200 300 400 500 The length of each pointer is 2 bytes Midi file0 userdata file0 is the filename of MIDI file or of the user data you have added inst number n inst block 0x123456 inst block L 0x56 inst block M 0x34 inst block H 0x12 env number env block 0x56789A env block L 0x9A env block M 0x78 env block H 0x56 melody number melody code OxABCD12 melody code L 0x12 melody code M 0xCD melody code H 0xAB midi file0 0xBBCD34 midi fileO L 0x34 midi fileO M 0xCD midi file0 H OxBB userdata number userdata 0xEF1234 userdata L 0x34 userdata M 0x12 userdata H 0xEF userdata file0 OxEF1234 userdata file0 L 0x34 userdata file0 M 0x12 userdata file0 H OxEF
118. port instrument playback function of the EM60000 series sound processors B Converter that converts MIDI files speech files and other text binary data into voice data files for downloading into your applications Voice View Mode functions are discussed separately in Chapter 4 EM60000 Series IDE User s Guide Chapter 1 1 2 2 EM60IDE Main User Interface Menu Bar Document Bar Project Window File or Voice View Mode FileViews amp 1 VoiceViews Tabs Output Window Status Bar 1 2 2 1 The Child Windows Project Window File View Mode Project Filename prj Target Microcontroller FileView Mode Tab Selected EM60600S playmelody files 43 Source Files LE playmelody asm Object Files Header Files EM60600S DEF EI VOICE DEF EMBOLADR EMBO CLRRAM ASM EM60_READSKEY ASM EMBO HEADTAIL ASM MELODY ASM FREG_TBL DEF XZEMBO MTB List Files NOP LST PLAYMELODY LST LE playmelody Ist Map Files E playmelody map EI VoiceView EM60000 IDE Series User s Guide Editor Window A ELAN EM6O IDE playmelody vig PA x Ele Edit View Project Debug Tool Option Window Help Toolbar Bgm c mimia amp t pgtioo 9m S i Standard amp Build E PLAYMELODY ASM gt EM60_READBKEY ASM A
119. quation with path name p name2 is executed X disable the corresponding trigger no action 6 1 1 2 OutputState OutputName Pn 07 O6 O5 O4 O3 O2 O1 00 Pn stands for Port 2 3 4 and 5 i e P2 means Port 2 and P3 means Port 3 etc The output symbol 00 O1 O2 etc stand for Pin 0 Pin 1 and Pin 2 etc respectively Each output pin status may be specified with one of the following output symbols 1 set the corresponding I O pin as H 0 set the corresponding I O pin as L P senda pulse train beginning from H to the corresponding I O pin P senda pulse train beginning from L to the corresponding I O pin S send a positive pulse to the corresponding I O pin S send a negative pulse to the corresponding I O pin F set the designated I O pins as tri state X keep the current state of the corresponding output pin unchanged or used as not used pin 62 e Easy Program EM61000 Series IDE User s Guide En Chapter 6 6 1 1 3 Path PathName parameter0 parameter1 parameterN Users can define as many path equations as needed and assign each with different path names i e p namel p name2 etc The path name path0 must exist in an EASY program as the starting point of the program Each path equation line should contain less than 255 characters If a line is inadequate to define a path equation additional lines may be added But the additional lines must
120. r program code SRAMs power switch safety fuse connectors for power and host PC etc B An EM60000 ICE to host PC Interface Cable with 25 pin printer port D type connectors at both ends B A 5VDC power adapter EM60000 IDE Series User s Guide Introduction e 13 Chapter 1 1 3 1 EM60000 ICE Top Board 14 e Introduction 1 2 A Voice SRAM 1 gt i u2 CIE i Voice SRAM 2 ua J4 seif seca EM60000 4 CRTSTAL Kernel chip S ge bebe za I Voice SRAM 3 EE optional Eas 05C1 J2 Ca a 30 x 2 Connector R301 R1 re 3 L Voice SRAM 4 ICE RESET S optional Ai DINA RUN Browa R2 054 1 2 EM60000 ICE Top Board Schematic JP3 The Top Board major components are as follows U1 EM60000 ROMlIess kernel chip U2 U5 SRAM for voice code only SRAM 1 amp 2 1M bytes are currently installed as standard provision SRAM 3 amp 4 are provided only when target chip is EM60600S or when specifically requested by user JP3 30x2 connector for VCC GND I O ports reset pin and voice output see pin assignment next Section J1 Crystal connection pin J2 Resistor connection pin for RC oscillator J3 SPK1 and J4 SPK2 Speaker connectors for VO1 amp VO2 after driving BJTs J5 and J6 BJT socket for VOI amp VO2 J7 and J8 By pass resistor for BJT of VO1 amp VO2 J9 Jumper pins to wire or two current D A output pins VOI amp VO2 S1 Push button reset switch to reset the ICE hardware
121. r segment is assigned with a single tone instrument variable T010 0 T010_1 and T010 2 respectively These variables are linked to tone instrument names stated in the Template List section where the complete properties of the instruments are defined Hence A2 F 4 becomes A2 F 4 T010_0 NORMAL 100 Where A2 FH4 is the defined pitch scale segment T010 0 is the tone instrument variable to be sourced from Template List NORMAL is the waveform delta frequency value 0 Normal or no frequency compensation required specified when converting WAV file into TWF file with Wav2Twf tool see figure in Page 6 26100 is the required percentage 100 of the original volume to be executed when the specified tone instrument 1s played EM61000 IDE Series User s Guide Instrument Map EM61 ist File e 119 Appendix C T046 name Harp scale A2 F 4 G4 F 5 G5 B6 This particular instrument name T046 is the Harp tone type instrument according to MIDI 42 B6 is the defined full Scale range gamut It consisted of three pitch scales or segments namely A2 F 4 G4 F 5 and G5 B6 A2 F 4 T046 0 NORMAL 100 DT046 0 amp DETUNE 60 G4 F 5 T046 1 NORMAL 100 DT046 1 amp DETUNE 60 G5 B6 T046 2 SNORMAL 100 DT046 2 SDETUNE 60 120 e Instrument Map EM61 ist File Each of the 3 pitch scale or segment is assigned with two ton
122. rmation following the equal sign 7 states the corresponding properties of the particular segment ex A2 F 4 T010_0 NORMAL 96100 EM61000 IDE Series User s Guide Instrument Map EM61 ist File e 117 Appendix C C 3 2 1 Pitch Scale Format pitch scale Where pitch scale var 0 var 1 var 0 type weight var 1 type weight is the name of the individual segment for the full pitch range gamut as defined in the Scale field Example A2 F 4 G4 F 5 G5 B are the instruments template waveform variables for each pitch scale segment These variables serves as indexes that link to the corresponding tone instruments properties defined in the Template List section Example T046 0 DT046 0 T046 1 DTO046 1 T046 2 DT046 2 type 118 e Instrument Map EM61 ist File is either NORMAL or YDETUNE always in upper case It specifies whether the waveform delta frequency compensation is required or not type NORMAL when the tone instrument is played waveform delta frequency is NORMAL Delta value 0 as set during conversion of WAV file into TWF file in the Wav2Twf tool See figure below Hence no frequency compensation is required type DETUNE frequency difference exists and frequency compensation is required when the tone instrument is played Delta value 0 but is any number between 999 to 999 as defined in the Wav2Twf um With Elan Group ELAN The
123. rs All defined breakpoints are ignored during free run Ctrl F5 mm Step Into Execute instructions step by step with register contents updated at FM the same time mm Step Over Execute instructions as in Step Into command except for Call FIO instruction which is executed as in Go command subroutine skipped By Run to Cursor Run program starting from the cur rent program counter up to the location where the cursor is anchored applies to ICE debug mode only Break Execution Stop running program without ICE reset program will resume running from the location where it was last stopped el Reset Perform hardware reset register contents are displayed with initial LJ values ICE will return to its initial condition E Exit Debugging Set Debug in normal editable mode and ICE reset is carried out Debug in debugging mode sets the Editor window to read only 3 6 2 1 View Trace Buffer To view the debugging history in the trace buffer click the Trace buffer command from the View menu All the available debugging history will be displayed in the Editor window as shown below Note that only the executions of the Go Free Run and Run to Cursor commands are recorded trace dat n x 0X17 0X17 D EM61Test 0903_1656 playmdy asm 141 0X3 0X2 D EM61Test 0903_1656 playmdy asm 142 0X69 D EM61Test 0903_1656 playmdy asm 143 D EM61Test 0903_1656
124. rted in File View Mode e 25 Chapter 3 Dz 3 5 Assemble and Link the Project With your source file s inserted into the project Project you are now ready to compile your project E pen Save 3 5 1 Assemble Files to Generate Object File 2 Insert Files to Project Be sure you have your source asm file s inserted Insert Tones into Project in the Project window Then click Assemble EE Ctrl F7 from the Project menu The EM60IDE pui will then assemble the source files and generate an object file obj with your project name as filename The object file is automatically saved in the same folder where your source files are located Status of the assembly operation can be monitored from the Output window as shown below Rebuild All Project Menu V PS i PTT REESE em 1mdyclO ob O error s or warning s Build 4 Debug N Find in Files 4 Output Window Showing Successful Assembly Compilation If error is detected during compilation pertinent error message will also display in the Output window Double click on the error message to link to the source of error from corresponding program text line in the Editor window 3 5 2 Assemble and Link Files to Generate Binary File With the source file s shown in the Project e Project window New B Click Rebuild All command to assemble and Mn link all inserted files regardless of having been Close recently modified or not B Click Bu
125. s to Project command from the resulting pull down menu and the Insert Files into Project dialog will display Project New Look in a 600sPLAYMELODY f A cl Open Save a EMG headtail asm Close a EM readSkey asm a melody asm nsert Files to Proje a nop asm Insert Tones into Project a PLAYMELODY ASM Insert Percussion into Project eS Assemble Ctrl F File name EM BO clam E Build F Files of type assembly Files asm Cancel L CA Rebuild All Project Menu Insert File into Project Dialog 2 Browse and select the file or multiple select the files you wish to insert into the new project 3 Click OK button after confirming your choice 3 3 3 Open Source File or Display its Path You can open source file into Editor window CA S for editing from Project FileView window ir aaa To do this double click on the source file and Gier E H Object Files Open the file is automatically opened You can also fe Header Files ae open source file by right clicking on the file you 3 Ei Ger t want to open Then click the Open command E habi ce d from the resulting shortcut menu Ei 3 Map Files LE playmelody map Clicking the Properties command of the shortcut menu will provide the path to the source file location e g Filename C BCG464 BCGDevStudioExample464 AsmSrciplaymelody asm m Voiceview 8 Fileview Opening Source
126. size TCC ISR BC INTC TCIF TCC ISR MOV A RSR BUF restore RSR 1 E n VC B Multiple files can be opened MOV A SF BUF restore SF 1 1 eA and displayed at the same time 4 E Insert and overstrike modes for editing E Insert and overstrike modes for editing B Unlimited Undo Redo E Auto indentation B Clipboard support with find and replace B Drag and drop text manipulation EM60000 IDE Series User s Guide Introduction e 5 Chapter 1 When value changes it is shown in red When value changes it is shown in red 6 Introduction Special Register Window The Special Register window provides the accumulator control register a program counter and general register To update register values click on the existing value and key in the new value To toggle between hex 0x and binary 0b register values click right mouse button while pointing on the particular register value Control Register 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Gg m 0x0000 0x0000 0x0000 0x0000 040000 0x0000 000 00000 The Control Register window incorporates the content of the I O mapped control registers comprising of the following groups SC1 amp SC2 show the banked control registers for speech Channels 1 and 2 VROM displays the Voice ROM access control registers MCI to MC4 show the banked control registers for melody Channels 1 to 4 DAT and DA2
127. t operators x Multiplication Division Modulo lt lt Logical shift left gt gt Logical shift right 4 Addition arithmetic operators t Addition Subtraction Bit AND amp BitOR Bit XOR Logical AND amp amp Logical OR Comparison operators equal double not equal gt greater than lessthan gt greater than or equal lt less than or equal O OO N Os tA 44 e Assembler and Linker EM61000 Series IDE User s Guide Chapter 5 5 4 Program Directives EH ORG Set program absolute address ORG expression Example ORG 0x100 B EQU or Double define a constant in assembler time label EQU expression label expression Example RO EQU 0x0 R10 0x10 E Line Comment Use semicolon characters Example This is a line comment E Block Comment Use and F characters Example This is a multi line block comment B EOP End of program ROM page Examples ORG 0x20 MOV A Q0 MOV 0x10 A EOP CLR 0x10 Above program source will be allocated as follows Address Source Program ORG 0x20 0x0020 MOV A 0 0x0021 MOV 0x10 A EOP 0x0400 CLR 0x10 EM61000 Series IDE User s Guide Assembler and Linker e 45 Chapter 5 B END End of the program END All codes after the END directive will be discarded EH PROC ENDP Procedure definition keywords label PROC
128. ther binary data click the VoiceView tab ofthe Project window to enter into Voice View Mode of the EM60IDE Program Voice View Mode is explained in details in Chapter 4 of this manual 20 e System Installation EM60000 Series IDE User s Guide Pz Chapter 3 Chapter 3 Getting Started in File View Mode 3 1 Overview This chapter provides a step by step description on E How to create a new project under File View Mode B How to add remove existing source file in a project B How to edit assemble and link projects B How to debug the project when errors occur B How to generate EPROM and Mask Files from project 3 2 Create a New Project To create a new project you need to configure your project by following these steps Open Save 1 From the Menu bar of the EM60IDE main window Close click on File or Project menu and choose New Insert Files to Project command from the resulting Pull down menu rcc d Insert Percussion into Project 2 The New dialog shown below will then display E pise an Ej Build F7 Rebuild All Files Projects Project Menu Micro Controller Project Name gt Type Asm Location C Easy CAD ocuments and Settings sal C EMB6O0600S I Browse Icon r Frequency gt EPROM C 1MHz C 358M 4MB C 2MHz 4MHz B bes C BMHz Cancel New Dialog Showing Project Tab for Creating New Project
129. tine to be automatically executed at every TCC2 timer underflow Only the EM61 series have this function This is a special arrangement within the In EASY assembly whereby you need not bother to take any action at every timer overflow The time interval is specified by the TCC2 Resolution Option Only one piece of assembly code is written in this block Unlike the format used under In EASY assembly block AsmName and y are not required for block definition The programming rule is the same as Asm section 6 1 1 8 Macro MacroName parameter0 parameter1 parameterN The macro section specifies the macro equations 6 1 1 9 Symbol SymbolName data SymbolName Mi SymbolName EQU data SymbolName EQU Mi The symbol section defines the symbol or names for data registers or constant data Example Define registers MO as X M1 as RESULT and symbol TRUE as 1 X MO RESULT EQU M1 TRUE 1 EM61000 IDE Series User s Guide Easy Program e 65 Chapter 6 Pz 6 2 Applicable Registers The registers are the data RAM Each register is 8 bit in width and has the following format mI l Mi where i is the valid register number 0 44 shown in the table below The registers are useful in storing data or in performing arithmetic logical conditional branch operation You can assign symbol names for these registers in the Symbol section see
130. uld now display 60 Assembler and Linker EM61000 Series IDE User s Guide En Chapter 6 Chapter 6 Easy Program 6 1 Writing an EASY Format ESY Program 6 1 1 File Format InputState OutputState Path Path0 Background Asm TCCAsm Macro Symbol The EASY program does not support multifile An EASY format source file consisted of several blocks 1 e InputState OutputState Path etc The blocks can be written in different order and all words are case insensitive EM61000 IDE Series User s Guide Easy Program e 61 Chapter 6 E 6 1 1 1 InputState StateName PathName1 PathName2 PathNameN InputState is defined for each input trigger state assignment You can define up to 256 states with different input state names The state name must be followed by the N trigger of selection options where N is the option selected in the project for EASY N setting The trigger selection options can be one of the following p name when the corresponding trigger is invoked or pressed in case of keypad the path equation with path name p name is executed Ip name when the corresponding trigger is released the path equation with path name p name is executed p name1 p name2 when the corresponding trigger 1s invoked or pressed in case of keypad the path equation with path name p namel is executed When the corresponding trigger is released the path e
131. ustain main 5 1 54 Sustain Vibration 0 0 0 Release 2 Meaning AD Stage starts at Volume Levels 127 first level in AD Group 0 then at each tick it decays decreases to Level 125 and ends at Level 114 where Sustain Stage begins 130 e Envelope Data EM61 env File EM61000 Series IDE User s Guide Appendix D Sustain Stage starts at Volume Level 114 then continues to decay at 5 levels interval at each tick 109 gt 104 gt 99 2 until the volume level reaches Level 54 or below where Sustain Stage ends and Release Stage starts Release Stage starts at Volume Level 54 then continues further to decay at 2 levels interval per tick 52 gt 50 gt 48 2 until the volume level reaches Level 0 where Release stage and the whole envelope ends The corresponding Sound Curve Envelope of the above envelope data is illustrated below Envelope 19 21 23 25 27 29 31 33 35 37 39 41 Tick Sustain Release D 5 2 AD Sustained Without Vibration Envelope The following example shows a unique envelope where its Sustain Main 0 0 O and its Sustain Vibration is also 0 0 0 The Release stage of this type of envelope will not function in accordance with the beat The program will have the control when to release the Sustain stage before the end of a beat Hence the envelope will play in the following manner AD Sustain AD last level Programmed release Example Env
132. w f Cascade Tile Arrange Icons Close All KC windows Help Menu Help About ELAN IDE 1 2 2 3 Toolbar 12 3 4 5 6 7 8 9 Font New Window Cascade Tile Arrange Icons Close All Windows About ELAN IDE 10 11 12 13 Chapter 1 Define printer port connection with ICE default is 378H Define ICE code setting for the selected microcontroller Body type dynamic setting Define an EASY project custom setting Define font for Editor windows fonts for other windows are fixed amp can t be changed Open another window of the same file you are currently editing for split window viewing Arrange all open files in cascade formation Arrange all open files editing in tile formation Arrange the minimized multiple file icons or minimize buttons at the bottom of the Editor window Close all open files Active file windows display manipulation See information on version of the current EM60IDE Program 14 15 16 17 18 19 20 21 22 23 24 25 c E BO o c mpm AA Gg MA oP at A View hide either Standard or Build toolbar or both from View menu The following are the designated function for each of the icons Standard Toolbar Copy Ctrl C Paste Ctrl V Redo Workspace 9 Output 10 Find Ctrl F 11 Print Ctrl P 12 About COSY Oe a s EM60000 IDE Series User s Guide Open file Ctrl O Save file Ctrl 5 Cut Shift Del Undo
133. with the path name p name will be executed N can be any number from 1 to 3 If the contents of register RandN are less than or equal to data register Mj contents the path equation with the path name p name will be executed N can be any number from 1 to 3 If the contents of register RandN are equal to 0 the path equation with path name p 0 will be executed If the contents of register RandN are equal to 1 and the corresponding path encounters X don t care the equation will execute the next parameter If the contents of register RandN are equal to 2 the path equation with path name p 2 will be executed so on and so forth The maximum number of path names that can be accommodated in the bracket is 128 N can be any number from 1 to 3 Define the contents of register Mi as data or that of register Mj where data can be any value from 0 to 255 Define the contents of register Mi as the result of right rotation of the contents of register Mj with carry flag The carry flag will be changed Define the contents of register Mi as the result of left rotation of the contents of register Mj with carry flag The carry flag will be changed Define the contents of register Mi as the result of right rotation of the contents of register Mj The carry flag will be changed Define the contents of register Mi as the result of left rotation of the contents of
134. y language described in Chapter 5 but without assembly directives In EASY assembly can use local label in its definition block The In EASY assembly definition starts from an open brace symbol 1 and ends with a close brace 1 The symbol is used in Path or Background section to execute the assembly block The following instructions should not be used in the In EASY assembly to avoid influencing the EASY Format internal routine MOV 0x02 A change TCC timer value MOV 0x07 A change TCC2 timer reload value CALL RET SLEP Refer to Section 6 6 Guidelines to Writing Assembly Code for more helpful hints 6 1 1 6 TCCAsm TCCAsm block provides an entry point for user defined routine to be automatically executed at every TCC timer overflow This is a special arrangement within the In EASY assembly whereby you need not bother to take any action at every timer overflow The time interval is specified by the TCC Resolution Option Only one piece of assembly code is written in this block Unlike the format used under In EASY assembly block the AsmName and are not required for block definition The programming rule is the same as Asm section Refer to Section 6 6 Guidelines to Writing Assembly Code for more helpful hints 64 Easy Program EM61000 Series IDE User s Guide En Chapter 6 6 1 1 7 TCC2Asm TCC2Asm block provides an entry point for user defined rou
135. ymbol symbol name is not defined Cause The pertinent symbol is not found undefined Solution Define the proper symbol B Error A011 error A011 The macro name macro name is redefined Cause The macro name already exists Solution Change the macro name to make it unique from existing ones EM61000 Series IDE User s Guide Assembler and Linker e 53 Chapter 5 Pz E Error A012 error A012 The parameters name parameter name is the same as label Cause The parameter name and label are identical Solution Redefine the parameter name to differ with label B Error A013 error A013 The parameter name parameter name is the same as another one Cause The parameter name already exists Solution Redefine the macro definition parameter with unique parameter name B Error A014 error A014 The number of actual parameter dose not match with formal parameter Cause The ordinal number of actual parameter does not match with the number in the formal parameter or vise versa Solution Change the ordinal number of either actual or formal parameter to make them match with each other E Error A015 error A015 The parameter number k does not exist Cause The ordinal number in the actual parameter is incomplete i e not defined Solution Provide the missing ordinal number or change it with the correct number B Error A016 error A016 The external symbol symbol name

Download Pdf Manuals

image

Related Search

Related Contents

NetDVR User Manual  Istruzioni per uso  a owner`s manual dehler 32  Android版SmarTrip Ver.4(Ntripデータ受信ソフトウェア)  Valueline VLVP31850B05 video switch  User`s Manual - Webcollage Content Publisher  Les belles pages de l`Eclaireur  

Copyright © All rights reserved.
Failed to retrieve file