background image

 

 

 

Q-Code User Manual 

 

 

Ver.  7.0    2021/11/30 

230 

4.19.5  [Rl, Rk, Rj, Ri] = SC_RX 

Write the received SC code to RAM. Ri=bit0 ~ 3, Rj=bit4 ~ 7, Rk=bit8 ~ 11, Rl=bit12 ~ 15. 

Note:   

1.  NY9T / NX1 do not support this command. 
2.  Using this command before receiving SC data will get unknown data. 

Ex.

 

 

[R0] = SC_RX 

; Write Bit[3:0] of SC code to R0. 

[R1, R0] = SC_RX 

; Write Bit[3:0] of SC code to R0, Bit[7:4] to R1. 

[R2, R1, R0] = SC_RX 

; Write Bit[3:0] of SC code to R0, Bit[7:4] to R1, 
; Bit[11:8] to R2. 

 

4.19.6  [Xj, Xi] = SC_RX 

Write the received IR code to RAM. Xi=bit0~7, Xj=bit8~15. 

Note:   
1.  NY9T / NX1 do not support this command. 
2.  Using this command before receiving SC data will get unknown data. 

Ex.

   

[X0] = SC_RX 

; Write Bit[7:0] of SC code to X0. 

[X1, X0] = SC_RX 

; Bit[7:0] of SC code will be written to X0. 

 

; Bit[15:8] of SC code will be written to X1. 

 

4.20  PWMIO Command 

PWMIO Command 

PWMOut 

PWMOutS

 

PlayPWM

 

PlayPMWS

 

WaitPN

 

StopPWM

 

PausePWM

 

ResumePWM

 

HoldPWM

 

PWMCtrl

 

 

4.20.1  PWMOut / PWMOutS 

4.20.1.1  PWMOut / PWMOutS(Px.n, Duty, Time, Type) 

This command is provided for user to output PWM-IO. The format of command is as following. 

PWMOut: 

After the time of the PWM-IO output is finished, the next command will be executed.

 

PWMOutS: 

After PWM-IO output, the

 following command

 will be executed immediately

.

 

Px.n: 

Specify output pin.

 

Duty: 

User can designate the output percentage and levels via an immediate value, or designate 

levels via variables.

 

Summary of Contents for Q-Code

Page 1: ...btain the latest version of device specifications before placing your orders No responsibility is assumed by NYQUEST for any infringement of patent or other rights of third parties which may result fr...

Page 2: ...de 22 2 4 1 Watch Window 22 2 4 2 Register Window 23 2 5 Message Window 23 2 5 1 Error List 23 2 5 2 Build Message 24 2 6 Information 24 2 7 Q Code Status Bar 24 2 7 1 Build Result and ICE Status 24 2...

Page 3: ...te On 99 3 9 18 IR Receive Infrared Receive 99 3 9 19 Symbol 100 3 9 20 Variable 101 3 9 21 Table 101 3 9 22 ASM 102 3 9 23 C Code 103 3 9 24 Macro 104 3 9 25 Sentence 105 3 9 26 Subroutine 107 3 9 27...

Page 4: ...brate Path 139 4 2 31 CheckSum Path 139 4 2 32 SPI_CheckSum Path 139 4 2 33 MixCtrl data Path 140 4 2 34 MixCtrl data Path 140 4 2 35 RandomL data Path 140 4 2 36 RandomH data Path 140 4 2 37 RandomL...

Page 5: ...3 24 Ri Px Rj 148 4 3 25 Ri Px Rj 148 4 3 26 Ri Px Rj 148 4 3 27 Px Py data 148 4 3 28 Px Py data 148 4 3 29 Px Py data 148 4 3 30 Px Py data 148 4 3 31 Px Py data 149 4 3 32 Ri Px data 149 4 3 33 Ri...

Page 6: ...Ch Parameter1 Parameter2 158 4 5 2 WaitVN Ch 162 4 5 3 PauseV Ch 162 4 5 4 ResumeV Ch 163 4 5 5 StopV Ch 164 4 5 6 FreqCH nK 164 4 5 7 V_Chx_Vol n V_Chx_Vol Xi 164 4 5 8 Xi V_Chx_Vol 165 4 5 9 SBC_Loo...

Page 7: ...P SPIGroup 181 4 9 12 SPI_RDP Result SPIGroup 181 4 9 13 SPI_WRSR Data SPIGroup 182 4 9 14 SPI_RDSR Result SPIGroup 182 4 9 15 SPI_WRD Addr Data SPIGroup 183 4 9 16 SPI_RDD Addr Result SPIGroup 184 4...

Page 8: ...6 Mask_On Ch 200 4 12 27 Mask_Off Ch 200 4 13 Keyboard Command 201 4 13 1 InstNoteOn Index Note Vol InstNoteOff Note 201 4 13 2 InstNoteAllOff 201 4 13 3 DrumNoteOn Index Vol DrumNoteOff Index 202 4 1...

Page 9: ...9 AutoJudge_Calibrate 216 4 15 10 Enforce_Calibrate_Normal 217 4 15 11 Enforce_Calibrate_Sleep 217 4 15 12 Ri TouchKey Px 218 4 15 13 Var Touchkey_Count TouchKey 218 4 15 14 Var Touchkey_BGCount Touch...

Page 10: ..._TX Mode Xi Xj 228 4 19 Serial Control Command 229 4 19 1 SC_RX_ON 229 4 19 2 SC_RX_OFF 229 4 19 3 SC_RX data Path 229 4 19 4 SC_RX data Path 229 4 19 5 Rl Rk Rj Ri SC_RX 230 4 19 6 Xj Xi SC_RX 230 4...

Page 11: ...25 1 QFID_GroupID Ri 243 4 25 2 QFID_TagId GroupID Rl Rk Rj Ri 243 4 25 3 QFID_TagInput ID Ri 243 4 25 4 QFID_On 244 4 25 5 QFID_Off 244 4 25 6 QFID_SlowOn 244 4 25 7 QFID_SlowOff 244 4 26 WaveID Comm...

Page 12: ...29 13 Echo 256 4 29 14 Echo_Off 256 4 29 15 Reverb 256 4 29 16 Reverb_Off 257 4 30 Real Time Play Command 257 4 30 1 RT_Play 257 4 30 2 RT_Play_Off 257 4 30 3 RT_PitchChange 258 4 30 4 RT_PitchChange_...

Page 13: ...0 4 31 22 AGC_Off 270 4 31 23 RampUp 270 4 31 24 RampDown 271 4 31 25 AutoSleep_On 271 4 31 26 AutoSleep_Off 271 4 31 27 WDT_CLR 272 4 31 28 Repeat 272 4 31 29 Slow 272 4 31 30 SlowOff 272 4 31 31 END...

Page 14: ...for NY5 RAM Resources 316 5 6 3 NY5 Memory Allocation 318 5 6 4 NY6 Memory Allocation 319 5 6 5 NY7 Memory Allocation 319 5 6 6 NY9T Memory Allocation 319 5 7 Corresponding Table of Ri and Xi 323 5 8...

Page 15: ...er is for introducing the function and basic operation of Q Code interface to gain preliminary knowledge of Q Code interface 3 Q Code Architecture User will understand the basic steps of development b...

Page 16: ...Q Code User Manual Ver 7 0 2021 11 30 16 2 Q Code Interface Text Edit Area Message Window Function Menu Shortcut Sections Status Bar Section Indicator...

Page 17: ...ed qc file When a file is closed it will automatically be added to the Recent Files list Exit Exit Q Code 2 1 2 Edit Menu The following menu will appear by clicking Edit Undo Recover the previous step...

Page 18: ...ng the backward matching string Find Next This feature is for finding the next string Replace This button is for replacing current matching string Replace All This button is for replacing all matching...

Page 19: ...his function Full Download Download the full program and data to ICE and SPI Flash It needs computer to connect the NX_Programmer User can choose download to ROM SPI Flash or both This function only s...

Page 20: ...ing the signals of output pin It must be used together with WAV file and the extension name of the generated file is nyq Q Visio This software is for drawing the signals of output pin and the extensio...

Page 21: ...or Updates Check for the latest version of Q Code NYASM NYC_NX1 The function needs Internet connection About Q Code Show current Q Code version and the contact information for technical support 2 2 Se...

Page 22: ...it Q Code program using Section For detailed information of developing Q Code application please refer to Q Code structure Filename Shows filename Column Indication The icon of program operation or br...

Page 23: ...This window is divided into two pages Error List and Build Message User can left click the mouse to switch between two pages 2 5 1 Error List Error List is for showing all messages delivered to user...

Page 24: ...l display Recommended Flash This is based on the SPI Flash capacity of SPI_Encoder project setting and displays the suitable N25Q series IC body For other IC series the Information window will display...

Page 25: ...e emulator is running Show Emulator is sleeping while emulator enters sleeping mode 2 7 2 ICE Connect Status Show ICE has connected as the following figure Show ICE has disconnected as the following f...

Page 26: ...ollowing table illustrates the supportness of sections for each IC series Sections NY4 NY5 NY5 NY6 NY7 NY9T NX1 Option Voice File Action File Melody Database TouchKey File SPI Flash Record LED String...

Page 27: ...4 Q Code program consists of following sections Option ICBody NY4B105A Client Nyquest Voltage 3 0V Voice File Action File I O Input State Output State Action Mark Wave Mark IR Receive Symbol Table ASM...

Page 28: ...onsists of following sections Option ICBody NY5B085A Client Nyquest Voltage 3 0V Voice File Action File Melody Database I O Input State Output State Action Mark Wave Mark Melody Mark Note On IR Receiv...

Page 29: ...ram consists of following sections Option ICBody NY5Q172A Client Nyquest Voltage 3 0V Voice File Action File Melody Database I O Input State Output State Wave Mark Melody Mark Note On Action Mark IR R...

Page 30: ...ram consists of following sections Option ICBody NY6C345A Client Nyquest Voltage 3 0V Voice File Action File Melody Database SPI Flash I O Input State Output State Action Mark Melody Mark Note On IR R...

Page 31: ...rogram consists of following sections Option ICBody NY7C170A Client Nyquest Voltage 3 0V Voice File Action File Melody Database I O Input State Output State QFID Action Mark Melody Mark Note On IR Rec...

Page 32: ...NY9T Q Code program consists of following sections Option ICBody NY9T004A Client Nyquest Voltage 3 0V Action File Touchkey File I O Input State Output State Action Mark Symbol Table ASM Macro Sentence...

Page 33: ...TP Q Code program consists of following sections Option ICBody NX11P22A Client Nyquest Voltage 4 5V Voice File Action File Melody Database SPI Flash Record QFID I O Input State Output State VR Melody...

Page 34: ...Q Code User Manual Ver 7 0 2021 11 30 34 Sentence Subroutine Path PowerOn Background1 Background2 Background3...

Page 35: ...rogram consists of following sections Option ICBody NX12FS51A Client Nyquest Voltage 4 5V Reset_Pin PA 8 Voice File Action File Melody Database SPI Flash Record LED String QFID I O Input State Output...

Page 36: ...r Manual Ver 7 0 2021 11 30 36 Macro Sentence Subroutine Path PowerOn Background1 Background2 Background3 3 9 Section 3 9 1 Option 3 9 1 1 IC Body The IC body is selected here ICBody ChipName Ex ICBod...

Page 37: ...the SPI0 pin PB 0 PB 3 There are options of 1 8V 2 5V or 3 3V SPI Flash power will be provided by the internal LDO Note NY5 NY5 NY6 NY7 NY9T NX1 EF do not support SPI0_VDD Voltage option 3 9 1 4 Packa...

Page 38: ...rix Output 3 9 1 5 Oscillator NY5 NY5 Source INT indicates using internal resistor for OSC and INT EXT indicates that OSC can utilize either internal resistor or external resistor Default Oscillator I...

Page 39: ...timebase counter occupies more CPU loading 2 Timebase counter is shared with Action counter When user changes Time Base setting the Action time counter is also affected 3 When user changes Time Base...

Page 40: ...n t affect the Melody time counter NX1 Oscillator options of NX1 are divided into two groups High_Clock and Low_Clock High_Clock and Low_Clock can be used with an external oscillator However There is...

Page 41: ...setting it doesn t affect the Melody time counter LVR Voltage Threshold of LVR Voltage Available value varies according to High Clock Frequency Note NY1 EF series does not support LVR Voltage option S...

Page 42: ...Normal PWM Sound Quality Sound quality of PWM output Supports Normal High Ex PWM_Sound_Quality Normal Note NY5 does not support PWM Sound Quality option RampUp Down User can turn off RampUp RampDown...

Page 43: ...ion means PWM output can be connected with speakers directly The DAC voice output needs to be connected with transistor and bias resistor Push Pull is push pull output NY7A series provides the PWM DAC...

Page 44: ...in 83 NX1 OTP Voice Output Set the driver type of the speaker The DAC voice output needs to be connected with transistor and bias resistor Push Pullis the push pull output NX1 OTP supports the DAC and...

Page 45: ...for NY9T 1ms 2ms Default 2ms NX1 only supports 1ms Frame Rate Number of samples to be scanned in a frame in other words the period of time to scan all Touch Keys The more the number of samples the le...

Page 46: ...he actual detecting time may be shorter The formula for calculating a Touch Key detecting time is shown below Normal Mode SampleTime x FrameRate x Debounce Slow Mode SampleTime x FrameRate x 3 Debounc...

Page 47: ...uch Key function is disabled the AutoJudge_Calibrate function is also disabled Enforce_Calibrate Enforce the Touch Keys to calibrate To avoid Touch Keys are touched inadvertently and cause unexpected...

Page 48: ...actually use the product to decide which one to set 2 NY9T004A does not support Hysteresis Level function Idle To Sleep The period for entering the sleep mode This option can adjust the idle time for...

Page 49: ...Y5 user can select the target pin as Reset pin but for NY6 NY7 the pin of Reset pin is fixed Ex Reset_Pin PC 0 NY9T This feature is for configuring pin for externally resetting IC User can select Pull...

Page 50: ...t TX or RX mode IR Data Length select the length of IR coded data IR CRC select the bit length of IR CRC Cyclic Redundancy Check the default is No IR Frequency select the IR carrier frequency IR Carri...

Page 51: ...provided by IC internal when IC enters Sleep mode the LDO will be off LDO Always Disable EXT_Power PB power is provided by other external power If the external power is larger than IC VDD it may cause...

Page 52: ...Set the Data Access Mode Code Access Mode XIP and optimzed options of SPI Flash There are 3 selections for Access Mode and Code Access Mode Single Dual Quad User can tick Optimze For Performance to pl...

Page 53: ...ons for Access Mode and Code Access Mode Single Dual Quad For Performance to place partial programs and data in SPI Flash The Optimize For Size options can place more programs to SPI Flash but resulti...

Page 54: ...3 Auto detect communication protocol Note When using Auto mode 3 pins must use the same port SPI_Like Use 2 pins to achieve a SPI like communication protocol Ex SerialControl SPI_Like SerialControl_SP...

Page 55: ...ata from external source Q Code supports SPI_Like and IR_Trigger protocol Note NY9T NX1 do not support the Serial Control RX function SPI_Like uses 2 pins use protocol similar to standard SPI Ex Seria...

Page 56: ...NX1 does not support the Action Compresss option 3 The higher Frame Rate the larger Data ROM Size consumption 4 The lower refresh rate the more glitter LED will display 5 In NY9T the resolution of Act...

Page 57: ...re glitter LED will display 3 9 1 15 Random Random means the range of randomly generated numbers Default value is Disable For NY4 NY5 NY5 NY6 NY7 NY9T the value of the randomly generated number can be...

Page 58: ...debounce time of Direct Key and Matrix Key via the Direct_Debounce and Matrix_Debounce command NY4 NY5 NY9T series cannot set the debounce time separately only support the Debounce command Note Actua...

Page 59: ...nce time within the range of 0 to 1ms Doesn t support Matrix Key Note 1 NX1 does not support this option 2 Due to Q Code processes time via polling the actual time will have deviation For more precise...

Page 60: ...Ex InterruptService QIO Using interrupt for QIO function Ex InterruptService Melody Using interrupt for Melody function 3 9 1 18 PWM IO PWMIO_Step Set the step of PWM IO output There are three steps o...

Page 61: ...ariety of functions simultaneously According to this setting the memory space occupied during the execution period can be estimated Users have to set the functional combination when two channel are us...

Page 62: ...rhythm Note 1 NY4 NY5 NY5 NY9T NX1 do not support this option 2 The recommended capacitor and potentiometer value is 0 1uF and 100K users have to maintain the same charging time constant as possible i...

Page 63: ...unt The system frequency 32MHz supports the LED amount up to 399 the system frequency 24MHz is up to 380 and the system frequency 16MHz is up to 180 This selection doesn t support the system frequency...

Page 64: ...le The variable compatible provides the compatibility of 4 bit variable operations for NX1 series If user needs to use the 4 bit data format for NX1 series please set the minimum length of variables a...

Page 65: ...e file to be removed and then click Remove to remove the selected file Note 1 NY9T does not support the Voice File section 2 User can change voice file label 3 If added file path is not absolute Q Cod...

Page 66: ...ly via ADPCM then compounds as raw signals NX1 series can complete Sub Band Coding and achieve lower bit rate to save ROM size The higher simple rate and wider bandwidth can represent high frequency r...

Page 67: ...d quality is normal but file size is smaller Noise Filter NY4 NY6 NY7 NX1 Only User can choose whether or not to enable noise filter function to lower background noise Split User can choose whether or...

Page 68: ...he Split feature Step2 Click and configure the voice source to be split Step3 Issue the PlayV command in Q Code Ex Voice File V01 C MyQ CodeProjects Prj1 voice1 nyw s Parameter s is attached to the vo...

Page 69: ...enerate a md2 sound file so that these sound files can be added to Q Code program For details please refer to user manuals of Q MIDI Melody database used in NY6 NY7 NX1 is qmd file generated by Q MIDI...

Page 70: ...file Step Touch Key File Add File Open File Open the steps are shown below 3 9 6 SPI Flash The filename extension spiprj is the project filename of SPI_Encoder which will be built as a _SPI bin file a...

Page 71: ...file will be copied to Q Code 3 9 7 Record Section NX1 provides this function to record voice and save recorded data to SPI Flash To save recorded voice spaces must be reserved on SPI Flash Thus no m...

Page 72: ...Q Code will start timing and detect the nonverbal if speech cannot be detected and the nonverbal duration exceeds Timeout the program re detect Mute Time Detect the duration of nonverbal If the speech...

Page 73: ...ecoding function needs wo work with SPI_Encoder 1 53 or above version 7 Keyboard recording function is not available if Realtime Erasing is enabled Record blocks are defined in Record Recording Erasin...

Page 74: ...D_TX is fixed to particular pin where TX pin is assigned to PB 2 of NY7A PD 2 of NY7B PF 2 of NY7C and PA 5 of NX1 RX Pin Pin to receive data from Tag RX pin should be connected to the SOUT pin of NY9...

Page 75: ...state on Tag QFID_GroupX_Tags The available numbers of tag 1 to 16 tags are applicable if QFID_GroupX_Mode is ID and the corresponding tag IDs are Tag0 Tag15 1 to 8 tags are applicable if QFID_GroupX_...

Page 76: ...en Tag is left executing Path2 Ex QFID Group0 TR1R X TR3F TR4R TR4F Step QFID QFID State Add State Name Add PathName OK the operations are below Click QFID State and the following dialog box will appe...

Page 77: ...s by default user can modify the corresponding path if necessary If user wants to set the entry when Tag is left just select the Leave button on the 2nd action as the picture shown below Click Rename...

Page 78: ...ed bin file After setting click the OK button the Tag bin file and circuit diagram applied by Tag will be generated in the path that specified by user Filename format VID_ PID_ TagID bin and Tag_Schem...

Page 79: ...be switched on or off by the IO Register d IO Pull High NY5 Only I O mode with Pull High resistor e IO Open Drain NY5 Only I O Input mode without Pull High resistor and with Open Drain Trigger Set the...

Page 80: ...InputType Register_PH and Trigger Low mode IC can only be awaked by low level signal Output pin setting Connect Type Current Type Current Initial Busy CMOS Sink Normal Default 100 Low Default High Def...

Page 81: ...must be set as Normal current output and Initial Low and only support Sink output 2 NY4 NY5 NY5 NY6 NY7 do not support Output Type Connect Type Current options 3 NX1 does not support Output Type Conne...

Page 82: ...InputType Pull High Trigger Low PA 1 Direction Output Current Normal Initial Low Busy High PA 2 Direction Output Current Normal Initial Low Busy High PA 3 Direction Input InputType Pull High Trigger L...

Page 83: ...supported by NX1 is different from NY9T Click the Touch Key of I O user can set the pins and the count of Touch Key and in the window shown below Return to the main window by clicking OK Ex TouchKey 3...

Page 84: ...o return to the main window as shown below NY4 NY5 NY9T NX1 Ex Input_Resistor PA 0 weak PA 1 weak PA 2 weak PA 3 weak NY5 NY6 NY7 Ex Input_Resistor strong Input Voltage Select the input voltage Click...

Page 85: ...d from high to low electric potential Path2 Rising edge Execute Path2 as input pin changed from low to high electric potential Path1 Path2 Falling edge Rising edge Execute Path1 as input pin changed f...

Page 86: ...Input State Step 2 Add modify the name of path as shown in the following figure Click on New Input State icon New added Input State Corresponding Path Name generated automatically The new added path...

Page 87: ...ame user might want to change the path name according to their needs If user wants to select trigger type as Rising just tick the Rising icon after selecting the desired key Return to the program as s...

Page 88: ...utput FD Indicating the output will change along with volume Flash with Dynamic NY4 NY5 NY5 NY6 NY7 Q Indicating each pin will follow the variation of the QIO signal of Quick IO NY4 NY5 NY5 NX1 An Ind...

Page 89: ...Q15 Q16 PA 8 PA 9 PA 10 PA 11 PA 12 PA 13 PA 14 PA 15 Q17 Q18 Q19 Q20 Q21 Q22 Q23 Q24 PB 6 PB 7 PB 8 PB 9 PB 10 PB 11 PB 12 PB 13 Q25 Q26 Q28 Q28 Q29 Q30 Q31 Q32 PB 14 PB 15 PC 0 PC 1 PC 2 PC 3 PC 4 P...

Page 90: ...ut to PB 3 OState1 A2 X 1 A1 Set A1 of VIO1 output to PB 3 and A2 output to PB 0 3 9 13 VR VR stands for Voice Recognition User can include the cvr file generated by Cyberon CSpotter Modeling Tool and...

Page 91: ...to three groups at the same time for example if a VRGC state specifies to enable two VR groups all voice commands in these two groups will be identified and each command in VRGC has a corresponding p...

Page 92: ...Select to use Voice Tag or Password Tag Count Set the tag count of voice command which corresponds to the used Voice Tag Password The Voice Tag can set up to 8 tags Password up to 1 tag 2 Press VR Com...

Page 93: ...for timeout until the VRGC_Timeout_CLR command is called If the counting time is up and VRGC_Timeout_CLR is still not called jump to timeout path 3 Groups Combo When the command of the 1st VR Group i...

Page 94: ...he actual voice command can be triggered only after a specific voice command or trigger word is recognized For example Hi Siri what time is it Hi Siri is the voice command of VRG1 after it is recogniz...

Page 95: ...ng example the three voice commands in VRG1 correspond to the VR1 VR2 and VR3 path seperately 3 9 14 Action Mark User can insert marks anywhere in the action file to manage the background actions whil...

Page 96: ...Mark This feature is for user to add the background path action according to the BGP mark in Quick IO file during the playback of voice file User can insert Wave Mark anywhere in the voice file to ma...

Page 97: ...0x2 System will execute WM2 when wave mark is read and the number is 2 WM3 PB 0x3 System will execute WM3 when wave mark is read and the number is 3 WM4 PB 0x0 System will execute WM4 when wave mark...

Page 98: ...nding states up to maximum 255 sets Note 1 NY4 NY9T do not support the Melody Mark section 2 To switch Melody Mark state is similar to Input State 3 The mark numbers must be M1 M255 Ex Insert M1 M4 in...

Page 99: ...urrent playback 5 There will be no action for the rest note Ex Note On CH1 CH2 CH3 CH4 NoteOn1 BG1 X X X NoteOn2 X BG2 X X Path TR1 PlayM M0 Play melody TR2 SWITCH R0 NO1 NO2 R0 0 TR2 Choose Note On s...

Page 100: ...ction can be composed as the following form Note 1 NY9T does not support the IR Receive section 2 For IR transmission select Enable IR TX mode in Option menu and send TX data command in Path section 3...

Page 101: ...clared in Variable section and also the data size must be defined Note NY4 NY5 NY5 NY6 NY7 NY9T do not support Variable section Ex Buf0 Buf1 are 8 bit variables Buf2 is 16 bit variable Variable VAR8 B...

Page 102: ...read if address exceeds the size of array 3 9 22 ASM Sometimes during the development of certain project the accuracy and efficiency of timing control of Q Code might not meet user s demand because i...

Page 103: ...not case sensitivity If there are two functions with the same name but cases are different Q Code will always find the first C function in the Path section It is recommended that do not define the sam...

Page 104: ...n it is applied each time and it does take ROM size As the following example programs in the Macro section can be called in Path Background1 or Background2 sections and it can be called at different s...

Page 105: ...owerOn KEY1 TR1 PlayS S1 Play Sentence S1 Background1 BG1 PlayS S1 PlayS S3 Play Sentence S1 and S3 Background2 BG3 PlayS S1 PlayS S2 Play Sentence S1 and S2 Note For NY5 NY6 NY7 NX1 the function of S...

Page 106: ...indow as shown below The Sentence is also written Ex Sentence L1 PlayPWMS 000 VIO0 1 PA A5 A4 0 0 PE 0 0 0 A6 PlayA Ch1 VIO0 4 WaitPN L2 PlayPWMS 000 VIO0 4 PA A5 A4 0 0 PE 0 0 0 A6 PlayA Ch1 VIO0 1 W...

Page 107: ...and Background2 sections Each subroutine consists of one path name a and one or more steps Note For NY4 NY5 the subroutine called in another subroutine will be expanded in the caller subroutine Ex Sub...

Page 108: ...RO 1 Read QIO data 3 0 and QIO Table address 1 mpg pa_page Set RAM page of PA state register mvam pa_state Save QIO data 3 0 to PA state register mvam pa Output QIO data 3 0 to PA mvma rod1 Read QIO d...

Page 109: ...QIO data 7 4 to PB state register mvat pb Output QIO data 7 4 to PB endif if QIO_Custom_Signal 16 Judge QIO file signal channel 16or not rbro 1 Read QIO data 3 0 and QIO Table address 1 mpg pc_page Sa...

Page 110: ...cooperate with the Foreground Path for background output Each Foreground Path consists of the path name and Steps The path name is a symbol which leads a line prior to a colon The paths can be linked...

Page 111: ...executed before PowerOn When XIP Execute in place function is enabled PowerOn path program will be stored in SPI Flash while the Before_PowerOn path will be stored in the IC s internal ROM If the SPI...

Page 112: ...Y5 NY6 NY9T NX1 do not support this path 2 Do not use too many commands in this path or it may lower the performance of system 3 It may not be exact 512us since system may be busy on other functions 4...

Page 113: ...other functions 4 Please refer 5 9 Unusable Commands for Special Path for commands that cannot be used Ex Path PowerOn 2ms PA PA output inverted every 2ms 3 9 28 7 4ms The path 4ms can only be applied...

Page 114: ...can be applied in Path section When 500ms is applied system will execute the path every 500ms Ex Path PowerOn 500ms R0 R0 2 Timer_1sec R0 counts every 500ms 2 times means 1 sec Timer_1sec R0 0 User P...

Page 115: ...On 4sec R0 R0 15 Timer_1min R0 counts every 4sec 15 times means 1 minute Timer_1min R0 0 User Program Note 1 NY4 NY5 NY5 NY6 NY7 NX1 do not support the option 2 In NY9T user can acquire the better pow...

Page 116: ...annot be used Ex Path PowerOn Int_512us PA PA output inverts when 512us interrupts 3 9 28 14 Int_1ms The path Int_1ms only can be applied in Path section When Int_1ms applied system will execute this...

Page 117: ...ommands in this path or it may lower the performance of system 3 Please refer 5 9 Unusable Commands for Special Path for commands that cannot be used 4 If Sleep RTC_Only even IC enters sleep mode Int_...

Page 118: ...al via program system will execute this path when Timer0 interrupt occurred Note 1 NY4 NY5 NY6 NY7 NY9T NX1 do not support this path 2 Do not use too many commands in this path or it may lower the per...

Page 119: ...or Delay commands in this path but conditional jump is allowed 4 Timer range 128us 256us Ex Path PowerOn TMR_On 2 128uS Int_TMR2 PA In every 128us PA output inverts when TMR2 interrupts 3 9 28 22 Int...

Page 120: ...LVD_3V4 3 2V 3 4V LVD_3V6 3 4V 3 6V LVD_3V6 LVD_3V6 3 6V LVD_Max LVD_Max Note 1 NY4 NY5 NY6 NY7 NY9T do not support this path 2 Execution of PowerOn may be interrupted if this is path is triggered wh...

Page 121: ...VDD is between 2 7V 2 4V system will execute this path once Note NY4 NY5 NY5 NY6A NY7 NY9T NX1 do not support this path Ex Path PowerOn LVD_LV2 PA 2 PA output 2 when voltage is between 2 7V 2 4V 3 9 2...

Page 122: ...ute the path once after IC being woken up Ex Path PowerOn KEY1 After power on execute KEY1 and enter sleep WakeUp PB 0xF Every time IC is waked up set PB 0xF 3 9 28 32 IR_RX The path IR_RX can only be...

Page 123: ...interrupted Note 1 NY4 NY6 NY9T NX1 do not support interrupt path 2 There is only one level stack for interrupt function PlayA PlayAS PlayM PlayMS and QIO of Q Code language are implemented with inte...

Page 124: ...very Enforce_Calibrate clear Touch Key Status Ex It needs to retain setting or mode and clear IO status after Enforce_Calibrate is done If Touch Key status does not clear after Enforce_Calibrate is do...

Page 125: ...his path Ex Path PowerOn VRGC_Timeout PlayV ch0 V0 When the voice command is not recognized the user is prompted to speak again 3 9 28 39 VR_Unknown The path VR_Unknown can only be applied in Path sec...

Page 126: ...PlayA SpiPlay SDelay 4 When this path is executing other paths will be paused Ex Path VT_BeforeTraining SpiPlay ch0 0 Call this path before Voice Tag records 3 9 28 42 VT_AddTagFail The path VT_AddTag...

Page 127: ...or the direct call from other background paths Ex Path P0 R0 0 PlayV Ch0 Indian 8K BG1 X PlayV Ch0 ABC 7K BG3 X Background1 BG1 output1 delay 200ms output2 delay 200ms BG1 BG3 output3 delay 200ms outp...

Page 128: ...ne Ri Xi variables user should declare needed variables in Variable section 4 1 Arithmetic Logic Command Arithmetic Logic Command Var1 Var2 Var1 Var2 Var3 Var1 Var2 Var3 Var1 Var2 Var3 Var1 Var2 Var3...

Page 129: ...Var Invert operation R0 R0 3 Note 1 Supported system variables are listed below No Variables Note Example 1 Vol Volume Vol R1 2 2 Px IO port PA R0 0x9 3 V_Chx_Vol The channel volume of voice V_Ch0_Vol...

Page 130: ...Path0 Path1 Path15 Switch RandomH Path0 Path1 Path15 Switch Px d x d x Path0 Path1 Path2 Path15 Switch Xi Path0 Path1 Path2 Path255 Switch Random Path0 Path1 Path2 Path255 Syntax R op T True_Branch F...

Page 131: ...les Note The available system variables are listed below No Name Descriptions Example 1 Vol Volume Vol R1 2 2 V_Chx_Vol The channel volume of voice V_Ch0_Vol X0 3 M_Chx_Vol The individual channel volu...

Page 132: ...f the nth pin of Px is 1 Ex PA 0 1 Path Jump to Path if the value of PA 0 is 1 4 2 7 Px n 1 Path Jump to Path when the value of the nth pin of Px is not 1 Ex PA 0 1 Path Jump to Path if the value of P...

Page 133: ...on the designated voice channel Ch voice channel If Ch is not designated it is regarded as all voice channels NY4 does not support Ch parameter NY5 NY5 Ch 0 3 or Ch0 Ch3 NY6 Ch 0 5 or Ch0 Ch5 NY7 Ch...

Page 134: ...oicePause path when any playing voice is paused TR3 PauseV 0 Ch0_Pause Jump to CH0_Pause path when playing voice on channel 0 is paused TR4 PauseV 1 Ch1_Pause Jump to CH1_Pause path when playing voice...

Page 135: ...ump to True_Path Path when executing pause in foreground Ex PauseD True_Path Jump to True_Path Path when executing pause in all foreground and background 4 2 18 Action Ch Path Jump to Path if specifie...

Page 136: ...ion on channel 3 is paused TR6 PauseA ch4 Ch4_Pause Jump to CH4_Pause path when playing action on channel 4 is paused 4 2 20 PWMIO Path Jump to Path if the designated foreground or background is execu...

Page 137: ...n 0 foreground 1 background1 and 2 background2 If n is not designated it is regards all HoldPWM Note NY4 NY5 NY5 NY6 NY7 NX1 do not support this command Ex HoldPWM 0 True_Path Jump to True_Path Path...

Page 138: ...when the playback of keyboard is executing Note NY4 NY5 NY5 NY6 NY7 NY9T do not support this command Ex PlayK True_Path Jump to True_Path Path when recording 4 2 27 EraseR Path Jump to Path when the...

Page 139: ...ed It will take some time to execute Checksum function and the system will not response before the completion of execution 2 If NX1 EF uses Embedded Flash to recording ROM Date will be rewrote and cau...

Page 140: ...o Set_MixCtrl if MixCtrl value is not equal to 0xE Set_MixCtrl MixCtrl 1 1 2 1 4 volume on Ch0 Ch1 respectively and 2 4 volume on Ch2 4 2 35 RandomL data Path The random number is generated by random...

Page 141: ...number generator is not equal to data Data 0 15 Ex RandomH 0x3 True Jump to True path if the high nibble of Random is not equal to 0x3 4 2 39 Random data Path The random number is generated by random...

Page 142: ...the value of Px Jump to Path0 if the content of Px is 0 and jump to Path1 if it is 1 and so on Ex PB 3 Switch PB Path1 Path2 X Path3 Path4 PB 3 so jump to Path3 Ex PB 4 Switch PB Path1 Path2 X Path3 P...

Page 143: ...witch Random Path1 Path2 X Path3 Path4 Random 3 so jump th Path3 Ex Random 4 Switch Random Path1 Path2 X Path3 Path4 Random 4 exceeds the range defined by Switch so switch command is skipped The next...

Page 144: ...y data Ri Px data Ri Px data Ri Px data Ri Px data Ri Px data Px 1 x 0 FD An Px n 1KHz time 8 bit I O Command XiL Px XiH Px XiL n Px n XiH n Px n Xi n Px n Xi Px Py Px XiL Px XiH Px n XiL n Px n XiH n...

Page 145: ...the value of nth pin of Px to the nth bit of Ri Ex PB 0x3 R0 0x0 R0 PB R0 0x3 4 3 4 PxM data Set the input and output mode of I O Port with data Note NY5 does not support this command Ex PBM 0x5 PB 0...

Page 146: ...4 3 9 Px Ri Assign Ri to Px as output value Ex R0 0x3 PB R0 PB 0x3 4 3 10 Px Py Assign the value of Py to Px as output value Ex PB 0x3 PA PB PA 0x3 4 3 11 Px Invert to value of Px Ex PB 0x3 PB PB 0xC...

Page 147: ...e to Px Ex PB 0x3 R0 0x4 PB PB R0 PB 0x7 4 3 18 Px Py Ri Subtract Rj from Py and then assign output value to Px Ex PB 0x3 R0 0x2 PB PB R0 PB 0x1 4 3 19 Px Py Ri Py OR Ri and then assign output value t...

Page 148: ...3 R0 0x4 R1 PB R0 R1 0x7 4 3 26 Ri Px Rj Px AND Rj and keep the result in Ri Ex PB 0x3 R0 0x4 R1 PB R0 R1 0x0 4 3 27 Px Py data Sum up the values of Py and data and then assign output value to Px Ex P...

Page 149: ...3 35 Ri Px data Px XOR data and keep the result in Ri Ex PB 0x3 R1 PB 0x4 R1 0x7 4 3 36 Ri Px data Px AND data and keep the result in Ri Ex PB 0x3 R1 PB 0x4 R1 0x0 4 3 37 Px 1 X 0 FD An Q This comman...

Page 150: ...D Action2 vio Action Label A1 A10 Path PowerOn Path1 PA A4 A3 A2 A1 PB A5 A6 A7 A8 PlayA 4 VIO0 Play Label VIO0 in channel 4 4 3 38 Px n 1 0 X Q This command is used to control output of each specifi...

Page 151: ...th pin value of Px to the nth bit of XiH Ex PB 0x5 X0 0x0 X0H 2 PB 0 XiH 0x4 4 3 44 Xi n Px n Assign the nth pin value of Px to the nth bit of Xi Ex PB 0x5 X0 0x0 X0 2 PB 0 X0 0x4 4 3 45 Xi Px Py Keep...

Page 152: ...PB 0x4 4 3 51 Px Py Xi Assign the output value of Px to be the high nibble of Xi Assign the output value of Py to be the low nibble of Xi Note NX1 does not support this command Ex X0H 0x3 X0L 0x1 PB P...

Page 153: ...ction is enabled the C Code can also specify that some programs are stored in the XIP section And add XIP attribute to the function prototype declaration Ex Specify that the function is stored in the...

Page 154: ...und and user can start a background thread in another one Note 1 NY4 NY5 NY5 NY6 NY7 NY9T only support BG1 BG2 2 NX1 supports BG1 BG2 BG3 3 BG1 can only call the paths defined in Background1 and vice...

Page 155: ...seconds in background1 4 4 6 StopBG Stop currently executing background threads background1 thread background2 thread and background3 thread Ex Stop steps executing in background using StopBG command...

Page 156: ...NY9T do not support this command Ex Stop executing background3 step by using StopBg3 command the actions of background1 and Background2 continue Path PowerOn BG OUT1 OUT2 OUT3 TR1 StopBG3 Background1...

Page 157: ...PlayV Ch1 V1 Label_Loop Play V1 repeatedly 4 4 12 Macro User can name and define a snippet of Q Code command in Macro A named snippet of commands is a macro User can place macro name in Q Code program...

Page 158: ...oice Command Voice Command PlayV PlayVS Voicename WaitVN Ch PauseV Ch ResumeV Ch StopV Ch FreqCH nK V_Chx_Vol n V_Chx_Vol Xi Xi V_Chx_Vol SBC_Loop_On SBC_Loop_Off ADPCM_Loop_On ADPCM_Loop_Off 4 5 1 Pl...

Page 159: ...is 10k NX1 does not support PlaySpeed parameter n numbers of repeated playback NY4 NY5 NY5 NY6 NY7 support constant 1 15 NX1 supports constant 1 255 BG1 BG2 BG3 Background path Background path name X...

Page 160: ...XF R0 0x1 then play no V1009 voice file P7 PlayVS ch0 X1 X0 10k PB 3 1 Play the specified voice file by Register content value in voice channel 0 the playback frequency is 10k and simultaneously execu...

Page 161: ...no V5 voice file TR3 TableL Tab 1 1 X0 PlayV ch0 V0 X0 PB 3 1 Store the specified address value by Table to X0 execute PB 3 1 after playing voice file specified by V0 in voice channel 0 X0 0x05 the pl...

Page 162: ...the voice channel Ch0 Ch7 NX1 supports the audio channel Ch0 Ch3 Note 1 NY9T does not support this command 2 PlayV PlayVS WaitVN Ex Path TR1 PlayV CH1 V0 TR2 PlayVS CH1 V0 WaitVN 1 The result is the...

Page 163: ...rt the voice channel Ch0 Ch3 NY6 supports the voice channel Ch0 Ch5 NY7 supports the voice channel Ch0 Ch7 NX1 supports the audio channel Ch0 Ch3 Note NY9T does not support this command This command h...

Page 164: ...ce file playing in all channels 4 5 6 FreqCH nK This command can only be used during direct voice playback with voice label or filename and it cannot be used with PlayV command To use this command the...

Page 165: ...NY6 supports Ch0 Ch5 NY7 supports Ch0 Ch7 Note NY4 NY5 NY9T NX1 do not support the command Ex X0 V_Ch0_Vol Read the volume of voice channel 0 and save the result to X0 4 5 9 SBC_Loop_On Turn on the SB...

Page 166: ...Note NY4 NY5 NY5 NY6 NY7 NY9T do not support this command 4 6 Record Command Sentence Command Record RecordS WaitRN StopR EraseR EraseRS WaitEN 4 6 1 Record RecordS This command is to record voice an...

Page 167: ...e 1 NY4 NY5 NY5 NY6 NY7 NY9T do not support this command 2 Record RecordS WaitRN Ex Path TR1 Record Rec0 TR2 RecordS Rec0 WaitRN The result is the same as TR1 4 6 3 StopR The command is to stop record...

Page 168: ...seRS Rec0 WaitEN The result is the same as TR1 4 7 Sentence Command Sentence Command PlayS WaitSN n PauseS n ResumeS n StopS n 4 7 1 PlayS Parameter This command enables the program to play a sequence...

Page 169: ...background2 3 background3 If n is not designated the system will execute the next command after all sentences finish playing Note NY4 NY5 NY5 NY9T do not support this command Ex Path TR1 PlayS S1 TR2...

Page 170: ...9T do not support this command Ex PowerOn InputState TR1 PlayS S1 TR2 PauseS Pause all the playing sentences TR3 ResumeS Resume all the sentences TR4 PauseS 0 Pause the playing sentence of foreground...

Page 171: ...user to play data stored on SPI Flash There are 2 SPI channels but cannot use both at the same time The format of command is as following SPIPlay Ch Index SPIGroup n BG1 BG2 BG3 SPIPlayS Ch Index SPI...

Page 172: ...ct 8 In NY6 when playing both the voice and action data from SPI flash at the same time if the voice factor is 1 9 and the sampling rate exceeds 16kHz or the factor is 10 PCM and sampling rate exceeds...

Page 173: ...3 Note NY4 NY5 NY5 NY6A NY9T do not support this command 4 8 4 SPIPause Ch Stop the playback of SPI data Ch SPI playback channel audio channel only to pause wait all playing in all channels if omitted...

Page 174: ...r 2 8 bit registers Xj Xi Ri bit0 3 Rj bit4 7 Rk bit8 11 Rl bit12 15 Xi bit0 7 Xj bit8 15 NY6 NY7 Only 16 bit variable NX1 Only SPIGroup specify the accessed interface of SPI NY6 NX1 do not support th...

Page 175: ...corresponding SPI channel NY6 does not support SPIGroup parameter NY7 supports SPI1 or SPI2 default is SPI1 if omitted Note 1 NY4 NY5 NY5 NY6A NY9T NX1 do not support this command 2 When any one of t...

Page 176: ...e refer to the description of SPI_WRD command for writing method Ex SPI_CS_On SPI_TX 0xB9 SPI_CS_Off Transmit 0xB9 command to SPI Flash via SPI1 R0 0xB R1 0xA SPI_CS_On SPI2 SPI_TX R1 R0 SPI2 SPI_CS_O...

Page 177: ...support SPIGroup parameter NY7 supports SPI1 or SPI2 default is SPI1 if omitted Note 1 NY4 NY5 NY5 NY6A NY9T NX1 do not support this command 2 This command is applicable to the SPI Flash of N25Q seri...

Page 178: ...city SPIGroup Select the corresponding SPI channel NY6 does not support SPIGroup parameter NY7 supports SPI1 or SPI2 default is SPI1 if omitted Note 1 NY4 NY5 NY5 NY6A NY9T NX1 do not support this com...

Page 179: ...ase is in progress set R0 as 1 When the erase is completed set R0 as 0 4 9 9 SPI_SE Addr Count SPIGroup Transmit Sector Erase command to SPI Flash and erasr sector s The size of a sector is 4KB users...

Page 180: ...to SPI Flash and erase block s The size of a block is 64KB Users can specify the amount of block to be erased once The system will not enter sleep mode when the erase action is executing After the era...

Page 181: ...down command to SPI Flash to enter deep power down mode It is recommended to execute this command before entering the sleep mode to save SPI Flash power consumption SPIGroup Select the corresponding...

Page 182: ...or a combination of Ri or Xi SPIGroup Select the corresponding SPI channel NY6 does not support SPIGroup parameter NY7 supports SPI1 or SPI2 default is SPI1 if omitted Note 1 NY4 NY5 NY5 NY6A NY9T NX...

Page 183: ...rresponding SPI channel NY6 does not support SPIGroup parameter NY7 supports SPI1 or SPI2 default is SPI1 if omitted Note 1 NY4 NY5 NY5 NY6A NY9T NX1 do not support this command 2 This command is appl...

Page 184: ...sh of N25Q series the instruction is 0x03 3 While the command executes it is automatically set CS pin as low level After the data finished reading it needs to issue SPI_CS_Off command to end the read...

Page 185: ...it 15 8 into X1 Bit 7 4 into R1 Bit 3 0 into R0 R0 0x3 R1 0x2 SPI_GetAddr R1 R0 X2 X1 SPI2 Read the block address of index value 0x23 through SPI2 and save Bit 15 8 into X2 Bit 7 0 into X1 X0 0x12 SPI...

Page 186: ...F Close Comparator function 4 10 3 CMP_Read Rj Ri CMP_Read Xi Read the count of Capture Note NY4 NY5 NY5 NY6A NY7 NY9T NX1 do not support this function Ex Save the count of Capture to X0 INT_CMP CMP_R...

Page 187: ...NY6 does not support Ch parameter 3 In NY6 the smallest unit of 1 00ms 2 00ms is 64us and 2 01ms 4 00ms is 256us If they re not divisible by each time every interrupt time will have errors 4 In NY5 ti...

Page 188: ...auseM ResumeM StopM Instrument Ch i M_Chx_Vol n M_Chx_Vol Ri Ri M_Chx_Vol Tempo n Tempo n Tempo Tempo TempoRst Tempo Ri Rj Tempo Xi ReadTempo Ri Rj ReadTempo Xi Mute_On Ch Mute_Off Ch OKON_On OKON_Off...

Page 189: ...FF stop the execution of current Background3 path Note NY4 NY9T do not support this command Ex P1 PlayM M0 PB 3 1 Execute PB 3 1 after playing Melody file P2 PlayM R3 R2 R1 R0 PB 3 1 Execute PB 3 1 af...

Page 190: ...xecute PB 3 1 after playing the music file specified by X0 X0 0x05 plays no M5 music file TR4 TableL Tab 1 1 R0 PlayMS R0 PB 3 1 Store the specified address value by Table to R0 play the music file sp...

Page 191: ...f the Melody file 3 times TR3 PlayM M0 BG1 BG2 Play number M0 while calling Background1 and Background2 Background1 BG1 Background2 BG2 4 12 2 WaitMN If Melody is being played it will execute next com...

Page 192: ...lody 4 12 6 Instrument Ch i Instrument command is to change the timbre of the playing Melody Ch MIDI channel to change instrument NY5 supports 1 4 10 NY6 supports 1 6 10 NY7 supports 1 16 NX1 supports...

Page 193: ...ng the level of each MIDI channel volume is default as 15 Ex M_Ch1_Vol 10 Set the volume of Ch1 as 10 67 to the original Ex M_Ch1_Vol R0 Set the volume of Ch1 by the value of R0 4 12 8 Ri M_Chx_Vol Ac...

Page 194: ...the number to the nearest Note 1 NY4 NY5 NY9T do not support this command 2 This command only takes effect when Melody is playing Ex Tempo 100 Path PowerOn PlayMS M0 Tempo 5 Slow down 5 of Temp speed...

Page 195: ...mpoRst TempoRst command can reset the play speed of Melody Note 1 NY4 NY5 NY9T do not support this command 2 This command only takes effect when Melody is playing Ex Tempo 100 PowerOn PlayMS M0 Tempo...

Page 196: ...X0 Output the tempo value to PD and PC 4 12 17 Mute_On Ch This command activates the mute function Mute_On can be used to mute specific channel during the playback of melody Ch MIDI channel to mute If...

Page 197: ...1 Mute_on 1 Activate mute function on MIDI Ch1 during melody playback TR2 Mute_on 3 Activate mute function on MIDI Ch3 during melody playback TR3 Mute_off 1 Stop the mute function on MIDI Ch1 TR4 Mute...

Page 198: ...hannel 0 3 NY6 NY7 OKON channel is fixed on MIDI channel 1 This command only takes effect when Melody is playing 4 NX1 OKON channel is fixed on MIDI channel 1 Ex Path PowerOn TR1 PlayM M0 Play melody...

Page 199: ...hannel 3 NY5 channel 5 NY6 channel 7 NY7 Ex PowerOn PlayMS M0 TR1 DynamicOff Close the dynamic allocation function 4 12 24 StopMNote Stop the playing note but it will not stop the MIDI playing That is...

Page 200: ...the Mask function of MIDI channel 3 4 12 27 Mask_Off Ch Turn off the Mask function on the specified MIDI channels When the Mask_On command is executed user can revert the MIDI channels by using the M...

Page 201: ...immediate value or variables Note C1 C 1 D1 D 1 E1 F1 F 1 G1 G 1 A2 A 2 B2 B8 Vol The velocity of single tone its range is 0 127 User can designate the value via an immediate value or variables Note N...

Page 202: ...NY9T NX1 do not support this command Ex Path1 DrumNoteOn 0 127 Falling Edge Play the percussion number 0 intensity 127 Path2 DrumNoteOff 0 Rising Edge Release the percussion number 0 Ex Path1 DrumNot...

Page 203: ...ffect 3 The command is available only when the note is playing and corresponding to the designated pitch According to different conditions there will be about 10 deviation of time 4 User needs to add...

Page 204: ...16 seconds Path2 LongInst_HoldTime 0 Set the instrument holds for unlimite time 4 13 8 ShortInst_HoldTime This commands is for instruments which doesn t contain Sustain When the instrument id NoteOff...

Page 205: ...ommand Ex Path TR1 EraseR Rec0 KRecord Rec0 Earse Rec0 and than use KRecord to recording TR2 PlayK Rec0 Use PlayK to playback the recording TR3 InstNoteOn 0 C4 127 Falling Edge Play No 0 pitch C4 dyna...

Page 206: ...ext command PlayKS After the playback of keyboard starts executing the next command immediately Label the recording section defined in Record Note NY4 NY5 NY5 NY6 NY7 NY9T do not support this command...

Page 207: ...A_Gain Ri MixCtrl Px MixCtrl MixCtrl 4 14 1 Vol_Max Vol_Max can tune the volume to the maximum value Vol 15 Note 1 NY4 NY9T do not support this command 2 If user doesn t specify the volume value the d...

Page 208: ...l of current volume setting with the minimum volume as 0 Note 1 NY4 NY9T do not support this command 2 In NY5 NX1 volume 0 does not mean mute Ex Vol 8 Vol Volume will be 7 4 14 7 Ri Vol Keeps the curr...

Page 209: ...l is the original VOL level multiplied by 2 Note 1 NY4 NY5 NY5 NY7 NY9T NX1 do not support this command 2 This command can increase volume but it might cause burst sound please pay attention to use Ex...

Page 210: ...NY5 NY6 NY7 NY9T NX1 EF do not support this command Ex PP_Gain 9 Set PP_Gain as the 9th level 4 14 15 PP_Gain Ri User can adjust Push Pull gain by PP_Gain command Ri 0 16 Note NY4 NY5 NY5 NY6 NY7 NY9T...

Page 211: ...lease refer to the table below for PGA_Gain s setting value and the amplified gain to input signal The user can adjust the value of PGA_Gain according to the application For voice recognition the gain...

Page 212: ...Ex PGA_Gain 10 Set PGA_Gain as the 10th level 4 14 20 PGA_Gain Ri Set PGA_Gain by register Note NY4 NY5 NY5 NY6 NY7 NY9T do not support this command Ex R1 10 PGA_Gain R1 Set PGA_Gain as the 10th leve...

Page 213: ...0 0 0 Full volume for CH0 and mute the other channels 0x9 MixCtrl 2 2 0 0 Half volume for CH0 and CH1 respectively 0x8 MixCtrl 0 0 4 0 Full volume for CH2 and mute the other channels 0xE MixCtrl 0 0 2...

Page 214: ...NX1 do not support this command Ex Input State KEY1 Path PowerOn TouchKey_OFF Delay 0 3 KEY1 TouchKey_ON When PowerOn is issued closing the Touch Key scanning function then rescan Touch Keys after de...

Page 215: ...Y6 NY7 NX1 do not support this command 2 When executing the TouchKey_Scan_Normal command the reaction time of Touch Key is faster than TouchKey_Scan_Slow Ex Path PowerOn TouchKey_ON Sleep TouchKey_Sca...

Page 216: ...owerOn TouchKey_Sensitivity Radj Adjust sensitivity by the level of the external resistor Note When the external resistor is not mounted or the resistor value exceeds the table range the sensitivity w...

Page 217: ...ear Touch Key status after Enforce_Calibrate_Normal is done Ex Long press key for 40 seconds to enforce calibration on Touch Key once Symbol KeyPress R0 Count R1 Path 4Sec KeyPress 1 Check40sec AutoJu...

Page 218: ...ccess the designated 4 pins of Port everytime NY9T001A 004A x PA NY9T008A x PA PB NY9T016A x PA PD Note NY4 NY5 NY5 NY6 NY7 NX1 do not support this command Ex R0 TouchKey PA Save the status of PA 0 PA...

Page 219: ...nt of Rx represents the address of X axis User can use 4 bit or 8 bit variable addressing Ry Xy the content of Ry represents the address of Y axis User can use 4 bit or 8 bit variable addressing Ri sa...

Page 220: ...fined in Table section Table TableName Rx Xx Ry Xy Rh Rm Rl only supports NY4 NY5 NY5 NY6 NY7 NY9T Table TableName Rx Xx Ry Xy Ri only supports NX1 TableName name of table defined in Table Rx Xx the c...

Page 221: ...the Middle Nibble of obtained data to Ri Note NX1 does not support this command 4 16 7 TableH TableName X Y Ri TableH TableName X Y Ri command is for direct data addressing and it can be used to read...

Page 222: ...x Xx the content of Xx represents the address of X axis User can use 4 bit or 8 bit variable addressing Ry Xy the content of Xy represents the address of Y axis User can use 4 bit or 8 bit variable ad...

Page 223: ...s command Ex Table Trans 0x001 0x003 0x005 0x007 0x009 0x004 0x005 0x3F6 0x008 0x010 0x000 0x001 0x002 0x003 0x0F4 Path P1 X0 2 X1 1 TableL trans X0 X1 X2 X2 0xF6 P2 X0 2 X1 1 TableH trans X0 X1 X2 X2...

Page 224: ...on TableName name of table defined in Table X represents the address of X axis Y represents the address of Y axis Xh save the High Byte of obtained data to Xh Xl save the Low Byte of obtained data to...

Page 225: ...ng Ri Rj Rk and Rl Ri bit0 3 Rj bit4 7 Rk bit8 11 Rl bit12 15 Note NY9T does not support this command Ex R0 0xF for 4 bit mode TR1 IR_TX R0 IR Code 0xF Ex R0 0xF R1 0x3 for 8 bit mode TR1 IR_TX R1 R0...

Page 226: ...en received IR code equals to data Note NY9T does not support this command Ex IR_RX 0 Path Jump to Path if received code is 0 4 17 7 IR_RX data Path Jump to Path if received IR code not equal to data...

Page 227: ...fer protocols SPI_Like NY3 Serial_Trigger and IR_Trigger Only supports 16 bit mode SPI_Like Use 2 pins to achieve a SPI like communication protocol NY3 Serial_Trigger User can connect NY3 via the seri...

Page 228: ...1 R0 Use SPI_Like communication protocol and output signal of R3 R2 R1 R0 register value Ex NY3 Serial_Trigger Mode R3 0x0 R2 0 R1 0 R0 0 SC_TX NY3 R3 R2 R1 R0 Use NY3 Serial_Trigger communication pro...

Page 229: ...C_RX Xj Xi SC_RX 4 19 1 SC_RX_ON Activate SC receiving function SC code cannot be received if this function is not activated Note NY9T NX1 do not support this command Ex SC_RX_ON Activate the SC recep...

Page 230: ...mand before receiving SC data will get unknown data Ex X0 SC_RX Write Bit 7 0 of SC code to X0 X1 X0 SC_RX Bit 7 0 of SC code will be written to X0 Bit 15 8 of SC code will be written to X1 4 20 PWMIO...

Page 231: ...et the serial number Set the percentage of output directly 0 100 Ex PWMOut 30 50 70 5 Set the levels of output 0 255 Ex PWMOut 30 50 70 5 Time User can set the output time of PWM IO the default is 16m...

Page 232: ...parameter of percentage is decided by register it will occupy the space that DATA ROM stores PWM IO signals DATA Size calculation pin number 1 256 4 20 2 PlayPWM PlayPWMS PWMEn VIOLabel Extension Use...

Page 233: ...not PWM IO A1 will correspond to PE 1 and so forth 5 When user plays VIO file and outputs multiple of signals simultaneously the time lengths of signals have to be the same If they are different Q Cod...

Page 234: ...6 NY7 NY9T do not support Px n parameter 4 20 5 PausePWM Pause the playback of PWM IO data This command will stop time counter of the PWMOut PWMOutS command but the PWM IO pin will still continue to o...

Page 235: ...utput of PWM IO during playing PWM IO PE 0 PE 3 Path PowerOn PWMCtrl 1111 1 Default PWMIO as1111 Extension 1 TR1 PlayPWM X VIO0 Play VIO0 and output to PE TR2 PWMCtrl 0011 X Close the output of PE 2 a...

Page 236: ...t Note NY4 NY6 NY7 NY9T NX1 do not support this command Ex Path PowerOn KEY1 INT_OFF Disable interrupt 4 21 3 INT_RET Return to interrupt service vector Note 1 NY4 NY6 NY7 NY9T NX1 do not support this...

Page 237: ...sec Less than 4ms will be rounded up Note 1 Due to deviation between RTC_1024Hz and 1ms 0 9765625ms 1ms 1ms 2 34 there is 2 34 delay time deviation in Q Code 6 51 or older versions This deviation wil...

Page 238: ...nd1 BG1 Delay 5 Delay 5 seconds at background1 4 22 4 StopD n Stop delay n 0 foreground 1 background1 2 background2 and 3 background3 If n is omitted all Delay will be stopped Ex Path TR1 BG1 Call BG1...

Page 239: ...r step can be conducted during the delay The next step can only be executed after the delay is finished 2 For NY4 NY5 NY5 NY9T time range is 50us 12500us increased by 50us 3 For NY6 NY7 time range is...

Page 240: ...x StopA This parameter is optional Note 1 NX1 does not support play by whole action file only supports single signal in action file 2 NY4 NY5 NY5 NY6 NY7 NX1 do not support Extension parameter 3 When...

Page 241: ...h1 Ch8 NX1 supports Ch1 Ch20 4 23 4 ResumeA Ch This command can be used to resume Action file on the designated channel Ch Action channel to resume resume all action if omitted NY4 NY5 NY5 NY6 NY7 NY9...

Page 242: ...LEDStr_PlayS When the LED string playback starts executing the next command immediately LEDLabel Specify the target LED file to play Index Play the index value of file it could be immediate value or...

Page 243: ...his command 4 25 2 QFID_TagId GroupID Rl Rk Rj Ri Scan all the Tag states GroupID specify Group ID Ri is the state of Tag0 Tag3 When the corresponding bit shows 1 it means the corresponding Tag is det...

Page 244: ...excute in scanning once and resting several times and the rest times is determined by the value of option QFID Scan Interval Please refer to QFID section for details It can also reduce the current co...

Page 245: ...NY6 NY7 NY9T NX1 EF do not support this command Ex Path TR1 WaveID_RX_OFF Turn off the receiving function 4 26 3 WaveID_RX User can store the received WaveID code in the specified variable through thi...

Page 246: ...n value 3 Before executing this command users must connect a resistor and a capacitor to the RFC pin Please refer to the RFC Application Circuit of RFC Opton 4 28 VR Command VR Command VR State VR_ON...

Page 247: ...won t automatically resume until the end of the voice playback Remember to set the VR State before enabling the voice recognition function User can switch VR State at any time when the function is ena...

Page 248: ...ed 1 0 46 150 Suitable for very quiet enclosed room 2 0 61 200 Suitable for closed room with a little background noise but no talk 3 0 76 250 Suitable for room with background noise or music but not n...

Page 249: ...When all the voice commands in VR groups have been recognized user can use this command to clear the Timeout timer Note NY4 NY5 NY5 NY6 NY7 NY9T do not support this command Ex VRGC_Timeout_CLR Clear...

Page 250: ...aining 1 Train the first group of voice command 4 28 12 VT_Delete Delete the successfully trained voice command Note NY4 NY5 NY5 NY6 NY7 NY9T do not support this command Ex VT_Delete 1 Delete the firs...

Page 251: ...command is used to change the pitch of the voice file The maximum can be adjusted to two times of the normal pitch the minimum can be adjusted to half of the normal pitch PitchChange channel number Ch...

Page 252: ...les no effect on MIDI files 6 This command is only useful to the Voice file that is less than 16K of the sampling rate Ex PitchChange ch1 1 4 29 2 PitchChange_Off Close PitchChange effect Note 1 NY4 N...

Page 253: ...an use 1 channel 2 channels for the command at the same time is not allowed 4 The channel specified by PitchChange and the channel specified by SpeedChange must operate on the same channel at the same...

Page 254: ...o generate the effect of robot speech Robot2 Channel Type Thres Channel voice channels Type The range is 0 2 means different scales Thres The noise threshold range is 0 7 The normal voice playback can...

Page 255: ...s not allowed 3 This command is only available for Voice files no effect on MIDI files Ex Robot3 ch0 2 0 4 29 10 Robot3_Off Turn of the Robot3 effect Note 1 NY4 NY5 NY5 NY6 NY7 NY9T do not support thi...

Page 256: ...2 If the program uses 2 channels the Echo only can use 1 channel 2 channels for the command at the same time is not allowed 3 For a better effect it s recommended to apply the Echo command by selectin...

Page 257: ...me Play Command Real Time Play Command RT_Play RT_Play_Off RT_PitchChange RT_PitchChange_Off RT_Robot1 RT_Robot1_Off RT_Robot2 RT_Robot2_Off RT_Robot3 RT_Robot3_Off RT_Robot4 RT_Robot4_Off RT_Echo RT_...

Page 258: ...can be adjusted to half of the normal pitch RT_PitchChange Number Number Constant or variable the range must be between 12 12 Value Description 12 0 5X 11 0 53X 10 0 56X 9 0 59X 8 0 63X 7 0 67X 6 0 7...

Page 259: ...ack of robot sound Note 1 NY4 NY5 NY5 NY6 NY7 NY9T do not support this command 2 The RT_ Robot1_Off command is available only when RT_Robot1 command is used 4 30 7 RT_Robot2 To generate the real time...

Page 260: ...f command is available only when RT_Robot3 command is used 4 30 11 RT_Robot4 To generate the real time robot sound Note NY4 NY5 NY5 NY6 NY7 NY9T do not support this command Ex RT_Robot4 4 30 12 RT_Rob...

Page 261: ...yback of Reverb Note 1 NY4 NY5 NY5 NY6 NY7 NY9T do not support this command 2 The RT_Reverb_Off command is available only when RT_Reverb command is used 4 30 17 RT_Ghost To generate the real time effe...

Page 262: ...to control requirements of different key triggered Ex Input State KEY1 TR1 TR2 X TR4 Path PowerOn KEY1 Set Input State as KEY1 4 31 2 Action Mark State User can insert marks in action files while edi...

Page 263: ...On WaveMark1 PlayV V0 Background1 WM1 PB 0x1 When Wave Mark M1 is reached WM1 is executed WM2 PB 0x2 When Wave Mark M2 is reached WM2 is executed WM3 PB 0x3 When Wave Mark M3 is reached WM3 is execute...

Page 264: ...10 NY7 supports MIDI channel Ch1 Ch16 NX1 supports MIDI channel Ch1 Ch16 Note NY4 NY9T do not support NoteOn State Ex Note On CH1 CH2 CH3 CH4 CH1 CH1_ON X X X CH2 X CH2_ON X X Path TR1 PlayM M0 Play M...

Page 265: ...is finished the program will continue the execution of PLAYV ch0 V0 if TR1 is being held If TR1 is not held the program will enter sleep mode 4 31 8 Key_ON This command is for activating scan key func...

Page 266: ...layA PlayM Delay PlayPWM PlayPWMS and PWMOut PWMOutS n 0 foreground 1 background1 2 background2 and 3 background3 If n is not designated the system will pause all execution Ex Path TR1 Pause 1 Pause a...

Page 267: ...l2 Note 1 NY4 NY5 NY6 NY7 NY9T NX1 do not support this command 2 PauseDown command is only valid on Channel2 and system can t pause playbacks while data merely is played on Channel0 Channel1 If PauseD...

Page 268: ...1 NY4 NY9T NX1 do not support this command 2 For voice output again please use Audio_ON 3 If user uses DAC Push Pull output then turns off Audio output it might give out pop sound 4 Using PWM DAC out...

Page 269: ...ote 1 NY4 NY5 NY5 NY9T do not support this command 2 If opens the noise filter function it stays open until closedown 3 The NoiseFilter_OFF function can t work when user plays any voice 4 The default...

Page 270: ...ognition rate of VR and reduce the Record noises Note 1 NY4 NY5 NY5 NY6 NY7 NY9T do not support this command 2 If the project contains VR and the IC body is not NX12P44 the default is Enable Ex If the...

Page 271: ...electricity consumption or noise Q Code language provides RampDown command for user to stop Audio Output to solve the issues of electricity consumption and pop sound noise 3 No other step can be condu...

Page 272: ...de the will be executed for 3 times 4 31 29 Slow Switch the Sleep mode to Slow mode The Slow mode can be applied to count for a long time or check signals in the fixed period of time After executing t...

Page 273: ...umber is automatically incremented after each write thus each OTP has a unique number The command allows OTP serial number to be read and saved to registers The saved content is Ri bit16 19 Rj bit12 1...

Page 274: ...resistor to adjust sensitivity user needs to connect Radj pad to VDD Ex Path PowerOn ReadRadj R0 Switch R0 Sens0 Sens1 Sens2 Sens3 Read the value of external resistor Sens0 TouchKey_Sensitivity 0 Set...

Page 275: ...d the Matrix buttons 3 For NY9T Debounce Option or of Debounce Time are exclusive Ex Path PowerOn KEY1 KEY_ON TR1 Debounce 16ms Set the Debounce times of Direct and Matrix buttons as 16ms TR2 Debounce...

Page 276: ...nce time of Matrix button as 16ms TR2 Matrix_Debounce 0 06 Set the Debounce time of Matrix button as 60ms 4 31 39 Ri LVD This command reads the current level of LVD LVD level is save to the specified...

Page 277: ...on of generated file is t9x Q Writer This software is for programming the BIN file into Flash Demo Board Romter or OTP for verification Note When installing the Q Code it is recommended to install rel...

Page 278: ...Flash Demo Board or Romter Also user can burn directly to OTP for verification More details about the installation and usage of Q Writer s software and hardware please check the Q Writer user manual F...

Page 279: ...ting control code User can insert control code at any position for Q Code program to read When Q Code program read Wave Mark the corresponding path in Wave Mark section will be executed After a WAV fi...

Page 280: ...ode To use Q Sound functions in Q Code please operate by following steps Step 1 How to Open Q Sound Window Step 2 How to Open Split Window Step 3 Set Noise Gate Step 4 Set Minimum Mute Length Step 5 U...

Page 281: ...User Manual Ver 7 0 2021 11 30 281 Click on button to evoke Q Sound Note Q Sound supports wav nyw formats only Step 2 How to Open Split Window Select the Splitter in menu Click Split for opening Split...

Page 282: ...number Mute section length shorter than minimum length will be ignored by Q Sound Step 5 Process Auto Mark Function After function settings Q Sound will automatically insert marks according to the se...

Page 283: ...option for selected file is not checked Q Sound works including splitting and mark will be ignored Click OK button to close Voice File dialog And generated code for voice file process will be added r...

Page 284: ...Path PWMIO Path PausePWM Path CheckSum Path RandomL data Path RandomH data Path RandomL data Path RandomH data Path Random data Path Random data Path Switch Ri Path0 Path1 Path2 Path15 Switch Px Path...

Page 285: ...4 1 6 Sentence Command Sentence Command PlayS 5 4 1 7 Table Command Table Command TableL TableName Rx Ry Ri TableM TableName Rx Ry Ri TableH TableName Rx Ry Ri Table TableName Rx Ry Rh Rm Rl TableL Ta...

Page 286: ...auseD n ResumeD n SDelay time 5 4 1 12 Action Command Action Command PlayA PlayAS WaitAN Ch PauseA Ch ResumeA Ch StopA Ch 5 4 1 13 MISC Command MISC Command Action Mark State Input State Wave Mark Sta...

Page 287: ...Random data Path Switch Ri Path0 Path1 Path2 Path15 Switch Px Path0 Path1 Path2 Path15 Switch RandomL Path0 Path1 Path15 Switch RandomH Path0 Path1 Path15 Switch Px d x d x Path0 Path1 Path2 Path15 S...

Page 288: ...Command MIDI Command PlayM PlayMS WaitMN PauseM ResumeM StopM Tempo n Tempo Tempo Tempo Ri Rj Tempo Xi ReadTempo Mute_On Ch Mute_Off Ch OKON_On OKON_Off OKON_Play 5 4 2 8 Volume Command Volume Comman...

Page 289: ...Rj Ri IR_RX Xj Xi IR_RX 5 4 2 11 Serial Control Command Serial Control Command SC_RX_ON SC_RX_OFF Rl Rk Rj Ri SC_RX Xj Xi IR_RX SC_RX data Path IR_RX data Path 5 4 2 12 PWMIO Command PWMIO Command PW...

Page 290: ...Jump Condition Jump Command Var Var Path Var Var Path Var Var Path Var Var Path Var Var Path Var Var Path Px data Path Px data Path Px n 0 Path Px n 0 Path Px n 1 Path Px n 1 Path Px 1 X 0 X Path Vol...

Page 291: ...XiH Px XiL n Px n XiH n Px n Xi n Px n Xi Px Py Px XiL Px XiH Px n XiL n Px n XiH n Px n Xi n Px Py Xi 5 4 3 4 Path Command Path Command ASM BG BG1 BG2 Break StopFG StopBG StopBG1 StopBG2 Subroutine...

Page 292: ...e Rx Ry Ri TableM TableName Rx Ry Ri TableH TableName Rx Ry Ri Table TableName Rx Ry Rh Rm Rl TableL TableName X Y Ri TableM TableName X Y Ri TableH TableName X Y Ri Table TableName X Y Rh Rm Rl Table...

Page 293: ...StopA Ch 5 4 3 18 MISC Command MISC Command Action Mark State Input State Wave Mark State Melody Mark State NoteOn State Key_CLR Key_ON Key_OFF Stop Pause n Resume n ReadChannel PauseDown ResumeUp Aud...

Page 294: ...tch RandomL Path0 Path1 Path15 Switch RandomH Path0 Path1 Path15 Switch Px d x d x Path0 Path1 Path2 Path15 Switch Xi Path0 Path1 Path2 Path255 Switch Random Path0 Path1 Path2 Path255 5 4 4 3 I O Comm...

Page 295: ...IPlayS SPIWaitN SPIStop SPIPause SPIResume SPIVol n SPIVol Ri Ri SPIVol SPIGetIndex Result SPIGroup 5 4 4 8 SPI Flash Command SPI Flash Command SPI_CS_On SPI_CS_Off SPI_TX SPI_RX SPI_WREN SPI_WRDIS SP...

Page 296: ...me Command Vol_Max Vol_Min Vol n Vol Ri Vol Vol Ri Vol Px Vol VolX1 VolX2 5 4 4 14 Table Command Table Command TableL TableName Rx Xx Ry Xy Ri TableM TableName Rx Xx Ry Xy Ri TableH TableName Rx Xx Ry...

Page 297: ...useD n ResumeD n SDelay time 5 4 4 19 Action Command Action Command PlayA PlayAS WaitAN Ch PauseA Ch ResumeA Ch StopA Ch 5 4 4 20 RFC Command RFC Command RFC_On RFC_Off RFC_Level Ri 5 4 4 21 MISC Comm...

Page 298: ...Path Delay n Path Action Ch Path PauseA Ch Path PWMIO n Path PausePWM n Path CheckSum Path RandomL data Path RandomH data Path RandomL data Path RandomH data Path Random data Path Random data Path Sw...

Page 299: ...ce Command Voice Command PlayV PlayVS WaitVN Ch PauseV Ch ResumeV Ch StopV Ch V_Chx_Vol n V_Chx_Vol Xi Xi V_Chx_Vol 5 4 5 6 Sentence Command Sentence Command PlayS WaitSN n PauseS n ResumeS n StopS n...

Page 300: ...d Volume Command Vol_Max Vol_Min Vol n Vol Ri Vol Vol Ri Vol Px Vol 5 4 5 12 Table Command Table Command TableL TableName Rx Xx Ry Xy Ri TableM TableName Rx Xx Ry Xy Ri TableH TableName Rx Xx Ry Xy Ri...

Page 301: ...5 16 Delay Command Delay Command Delay time Delay Ri Rj Rk WaitDN n StopD n PauseD n ResumeD n SDelay time 5 4 5 17 Action Command Action Command PlayA PlayAS WaitAN Ch PauseA Ch ResumeA Ch StopA Ch 5...

Page 302: ...Var1 Var2 Var3 Var 5 4 6 2 Condition Jump Command Condition Jump Command Var Var Path Var Var Path Var Var Path Var Var Path Var Var Path Var Var Path Px data Path Px data Path Px n 0 Path Px n 0 Pat...

Page 303: ...a Px 1 x 0 FD An Px n 1KHz time 8 bit I O Command XiL Px XiH Px XiL n Px n XiH n Px n Xi n Px n Xi Px Py Px XiL Px XiH Px n XiL n Px n XiH n Px n Xi n Px Py Xi 5 4 6 4 Path Command Path Command ASM BG...

Page 304: ...ame X Y Xi Table TableName X Y Xh Xl 5 4 6 8 Serial Control TX Command Serial Control TX Command SC_TX Mode data SC_TX Mode Ri Rj Rl Rk SC_TX Mode Xi Xj 5 4 6 9 PWMIO Command PWMIO Command PWMOut PWMO...

Page 305: ...Voice Ch Path PaueV Ch Path Melody Path PauseM Path Delay n Path Action Ch Path PauseA Ch Path Record Path KRecord Path PlayK Path EraseR Path VR_VAD Path LEDStr Path CheckSum Path SPI_CheckSum Path R...

Page 306: ...Sentence Command Record RecordS WaitRN StopR EraseR EraseRS WaitEN 5 4 7 7 Sentence Command Sentence Command PlayS WaitSN PauseS n ResumeS n StopS n 5 4 7 8 SPIPlay Command SPIPlay Command SPIPlay SPI...

Page 307: ...ol Vol n Vol n CHx_Vol n PP_Gain n PP_Gain Ri PP_Gain PP_Gain Ri PP_Gain PGA_Gain n PGA_Gain Ri Ri PGA_Gain MixCtrl 5 4 7 12 TouchKey Command TouchKey Command TouchKey_Sensitivity Touchkey_Count Touch...

Page 308: ...Command WaveID_RX_ON WaveID_RX_OFF WaveID_RX WaveID_TX 5 4 7 20 VR Command VR Command VR State VR_ON VR_OFF VR_VAD n VR_VAD_On VR_VAD_Off VRGC_Timeout_CLR Ri VR_HitScore Ri VR_HitID VR_Loading VT_Tra...

Page 309: ...Command Var1 Var2 Var1 Var2 Var3 Var1 Var2 Var3 Var1 Var2 Var3 Var1 Var2 Var3 Var1 Var2 Var3 Var Var Var1 Var2 Var3 Var1 Var2 Var3 Var1 Var2 Var3 Var1 Var2 Var3 Var1 Var2 Var3 Var 5 4 8 2 Condition Ju...

Page 310: ...Py data Px Py data Px Py data Px Py data Px Py data Ri Px data Ri Px data Ri Px data Ri Px data Ri Px data Px 1 x 0 FD An 5 4 8 4 Path Command Path Command C Code BG StopFG StopBG StopBG1 StopBG2 Sto...

Page 311: ...N_On OKON_Off OKON_Play MIDI_Pitch Mask_On Mask_Off 5 4 8 10 Keyboard Command Instrument Command InstNoteOn InstNoteOff InstNoteAllOff DrumNoteOn DrumNoteOff NoteVibrato LongInst_HoldTime ShortInst_Ho...

Page 312: ...aitDN n StopD n PauseD n ResumeD n SDelay time 5 4 8 16 Action Command Action Command PlayA PlayAS WaitAN Ch PauseA Ch ResumeA Ch StopA Ch 5 4 8 17 LED String Command QFID Command LedStr_Play LedStr_P...

Page 313: ...gCode Ri LVD 5 5 NX1 Audio Channel NX1 uses C_Module as its kernel supports four Audio Channels Audio Channel 0 Audio Channel 1 Audio Channel 2 and Audio Channel 3 the kernel program will correspond t...

Page 314: ...el 3 ADPCM Decoder HW Mixer DAC Ex 3 channels ADPCM with 3 types of sample rate cannot be played at the same time TR1 PlayVS Ch0 v0 PlayVS Ch1 v1 PlayV Ch2 v2 Voice 8k ADPCM Voice 12k ADPCM Voice 16k...

Page 315: ...20 22 Action When PlayA PlayAS function is used 9 RAMs will be used in each action channel If user executes Action Compression function each action channel will use one more RAM 9 n ch Action Mark Sta...

Page 316: ...d and system will occupy 5 RAMs 1 n 5 Wait When WaitVN function is used 1 RAM will be used and system will occupy 1 RAM 1 1 When WaitDN function is used 1 RAM will be used and system will occupy 1 RAM...

Page 317: ...will occupy 1 RAM 1 6 Input State 2 RAMs will be used when the setting is more than 16 States 1 2 IR When IR Tx function is used 1 RAM will be occupied if DATA Length increases by 4 bit 1 4 When IR R...

Page 318: ...eat function is used in foreground 1 Repeat function is used in background1 1 Repeat function is used in background2 1 Single Play Single Playfunction is used 2 Subroutine Provides nested stacking fea...

Page 319: ...vailable number of RAM After executing Build the used number of RAM will be listed in the window for Build Message 5 6 6 NY9T Memory Allocation For NY9T001A NY9T004A there is one page of Page0 There a...

Page 320: ...t State 2 RAMs will be occupied when the setting is more than 15 States 1 2 Key Each Input Port up to 4 corresponding keys in principle each 4 keys will occupy 1 RAM Direct and Matrix Keys are calcula...

Page 321: ...hen Enforce_Calibrate function is used 1 RAM will be occupied 1 Process When Process function is used in foreground 4 RAMs will be occupied 4 When Process function is used in background1 4 RAMs will b...

Page 322: ...Keys are calculated separately Key 4 2 When Debounce is more than 60ms it will occupy 2 RAMs 1 2 Touch Key Each Input Port corresponds to 4 keys as most For every 4keys 1 RAM will be occupied Key 4 3...

Page 323: ...57H R116 X58L R117 X58H R118 X59L R119 X59H R120 X60L R121 X60H R122 X61L R123 X61H R124 X62L R125 X62H R126 X63L R127 X63H R128 X64L R129 X64H R130 X65L R131 X65H R132 X66L R133 X66H R134 X67L R135 X...

Page 324: ...0 X175L R351 X175H R352 X176L R353 X176H R354 X177L R355 X177H R356 X178L R357 X178H R358 X179L R359 X179H R360 X180L R361 X180H R362 X181L R363 X181H R364 X182L R365 X182H R366 X183L R367 X183H R368...

Page 325: ...8130 0 E1 4424 7 C7 5000 0 AD 5747 1 93 6756 7 79 8196 7 E0 4444 4 C6 5025 1 AC 5780 3 92 6802 7 78 8264 4 TM HEX SR Hz TM HEX SR Hz TM HEX SR Hz TM HEX SR Hz TM HEX SR Hz 77 8333 3 63 10000 4F 12500...

Page 326: ...mmand StopFG BG BG1 BG2 StopBG StopBG1 StopBG2 Macro Subroutine Break Voice Command All Voice commands Sentence Command All Sentence commands SPI Command All SPI commands Melody Command All Melody com...

Page 327: ...series specification for the detailed connection usage IR_Trigger Use a pin to simulate IR transmission signal and can be directly used to connect current NY4 5 7 series with IR communication AutoDet...

Page 328: ...Trigger Timing Pulse1 Pulse2 Pulse3 PulseN 100us 100us 100us 100us 100us 100us Pulse Number 1 200us Reset Pin 3 Pin 1 Pulse Pin 2 IR_Trigger Active Low 500us 6000us Header Data1 1500us 500us Data0 150...

Page 329: ...Ot th he er rs s Q Q S So ou un nd d wav nyw bin v4x nyq wav vio qc htm qio N NY Y4 4_ _F FD DB B R Ro om mt te er r Q Q C Co od de e Q Qu ui ic ck k I IO O V Vo oi ic ce e_ _ E En nc co od de er r Q...

Page 330: ...Walk Sonar Others mid qmd SPI_Encoder spiprj vio Q Qu ui ic ck k I IO O nyq qio Q Q C Co od de e V Vo oi ic ce e_ _ E En nc co od de er r Q Q V Vi is si io o Q Q W Wr ri it te er r C Co oo ol l E Ed d...

Page 331: ...E Ed di it t S So ou un nd d F Fo or rg ge e O Ot th he er rs s Q Q S So ou un nd d wav nyw bin v7x wav vio qc htm N NY Y7 7_ _F FD DB B R Ro om mt te er r Q Q M MI ID DI I C Ca ak ke eW Wa al lk k S...

Page 332: ...11 30 332 5 11 7 NX1 Flowchart wav SPI_Encoder spiprj NX1_FDB Q Visio bin qc htm Q Code Q Writer Voice_ Encoder Q Sound vio _spi bin Cool Edit Sound Forge Others wav nyw vnx Q MIDI CakeWalk Sonar Othe...

Page 333: ...in number and ROM Size is similar to avoid functional errors after conversion Meldoy Database Choose which IDB to use to convert md2 to qmd user can use the current IDB of md2 or choose to use the IDB...

Page 334: ...Command Add Ri n Rj n Command Add Ri data Rj Command Add Ri data Rj Command Add Ri n Rj n Command Add Ri Rj Rk Rl Command Add Ri Rj Rk data Command Add Ri Rj data Rk Command Add Ri Rj Rk Rl Command Ad...

Page 335: ...Add Px Py data Command Add Px Py Ri Command Add Px Py data Command Add Px Py Ri Command Add Px Py data Command Add Px Py Ri Command Add Px Py Rata Command Add Px Py Ri Command Add Px Py data Command...

Page 336: ...ayA Command Add PlayAS Command Add WaitAN Ch Command Add PauseA Ch Command Add ResumeA Ch Command Add StopA Ch Command 9 MISC Command Add Wave Mark State Command Add Key_CLR Command Add Key_ON Command...

Page 337: ...mand Add Ri n XjL n Command Add Ri n XjH n Command Add Ri n Xj n Command Add XiL n Rj n Command Add XiH n Rj n Command Add Xi n Xj n Command Add Xi data Xj Command Add Xi data Xj Command Add Xi Xj Xk...

Page 338: ...nd Add Px Py Ri Command Add Px Py data Command Add Ri Py data Command Add Ri Py data Command Add Ri Py Rj Command Add Ri Py data Command Add Ri Py Rj Command Add Ri Py data Command Add Ri Py Rj Comman...

Page 339: ...Add PauseA Ch Command Add ResumeA Ch Command Add StopA Ch Command 10 MISC Command Add Wave Mark State Command Add Melody Mark State Command Add Note ON State Command Add Key_CLR Command Add Key_ON Com...

Page 340: ...er Command for PlayMS 4 Add examples of Table PlayV PlayVS 5 Add examples of Table PlayT PlayTS 6 Add examples of Table PlayM PlayMS 7 Replace IC Body illustration 8 Modify the description of Voice Fi...

Page 341: ...meRate to Action_FrameRate 104 105 35 107 2 6 2012 11 30 1 NY4 Option 1 Add Action Compression Setting 2 NY4 Section 1 Modify Action File interface 2 Add Action output parameter setting 3 NY4 Command...

Page 342: ...dd IR Command Ri Rj Rk Rl RX and Xi Xj RX 27 56 137 58 59 139 140 60 142 92 191 4 0 2015 08 28 1 Merge NY7 2 Add Serial Control Command 3 Remove StopDelay Command 4 Modify RX TX Command to IR_RX IR_Tx...

Page 343: ...x Rl Rk Rj Ri and SPIReadIndex Xj Xi command 7 Modify the description of Table Command 8 Add PWMIO Command 9 Add Direct_Debounce Time Matrix_Debounce Time and Debounce Time command 10 Update the Comma...

Page 344: ...QFID_SlowOn and QFID_SlowOff command 8 Add the RFC_On and RFC_Off command 9 Update the description of Audio_OFF 43 50 51 56 150 166 177 177 184 5 5 2018 02 27 1 Update QFID Section 2 Add SPI_EraseEnd...

Page 345: ...dd Debug mode 3 Update the description of Message Window 4 Update the description of Random option 5 Update the description of Debounce PowerOnTrigger 6 Update the description of Before_PowerOn path 7...

Page 346: ...eleteAll VT_TrainingNum commands 63 38 43 68 80 111 113 114 221 184 188 185 186 199 200 224 229 300 6 6 2020 11 30 1 Update UI pictures 2 the descriptions of Record 3 Add ADPCM_Loop_On ADPCM_Loop_Off...

Reviews: