Main function list for TwoPot  (TP_M8_V4.asm  version 4.7) AVR assembly code.  
-------------------------------------------------------------------------------
This version has only 32 parameters available for editing, but they are the params that have the most affect on the sound.
There are lot more tables than the version 2.  V2 puts all the params received from VCED,ACED, and EFEDS dumps into the CurrentVoice 
table in the order that they are received from the synth.  Then the Param Pot selects every one of these params regardless of whether they are
rarely or commonly used in the voice. 
  
  

    16x2 LCD display      0123456789abcdef
                       ---------------------
    name, voice#, alg# |  Voice_Name V#  A | First line: GetVCEDdata
    param txt,new,org  |  Parameter  n# o# | Second line: NewParameterSelected
                       ---------------------
    
    Frequency display     0123456789abcdef                                                                                                                                                                       
                       ---------------------                                                                                                                                                                     
    name, voice#, alg# |  Voice_Name V#  A | First line: GetVCEDdata                                                                                                                                             
    frq#, ratio        |  Frq_1 1.00       | Second line: NewParameterSelected                                                                                                                                   
                       ---------------------                                                                                                                                                                     
                                                                                                                                                                                                                 
                       
line#
302	Reset: ; stack pointer; internal RC system clock;  fill SRAM with 0xaa
  	INT0; Timer1 ADCcount, USART, set global interrupts; clear vars
              
491	Main:   	code spends most time spent in this loop, waiting for events
	Checks for PS2 keypress (KeyFlags, NewScanCode flag set)
	ADC timeOut (GeneralFlags, Time4ADC flag set) @ 1/3 second
	
508	DoNewScanCode:	a new keypress arrived
	check DecodeValue - ignore if 0xff, else Valid value

525	Valid_key:	keypress' scancode requires an action

593	ADCtimeout: Timer 1 flag set.  Do action if any change from last ADC read

638	NewParameterSelected:  Parameter ADC value changed
	; DisplayParamText and value for the parameter on second line
	; if New_Param_Pot < 4, Get_CV_FreqRatio and                                               	
	;    DisplayFreqRatio ; FreqOffset used as offset into FreqText table

700	DisplayParamText ; display text for parameter on  LCD second line
	
721	Get_CV_FreqRatio:  ;determine Freq_Ratio number (0-255) from the Coarse/Fine values in Current_Voice table	

812	DisplayFreqRatio - found the offset value for both current coarse and fine frequencies, so print ratio string
	   {verify that the coarse and fine values are correctly updated on LCD display}

878	DoNewValuePot: Value ADC changed
 	; Param=freq?  doNewFrequencyValue -- get value from table using Operator and New_Value_Pot
 	; Param<>freq? - get Param_Max, scale New_Value_Pot
 	   New_Value in the same range as Prev_Value? - do nothing
 	   New_Value in the different range as Prev_Value? - 
 	      send New_Value to synth, 
 	      [put New_Value into Current_Voice table]
 	      display New_value at LCD2nd line, column 14, 3 digits
 	      
1028	FindRange:	determine if Value ADC change requires sys-ex message

1063	doNewFrequencyValue :  - arrives here when New_Param is on <4 and Value_pot is changed
	   Determine freq ratio table offset from coarse and fine parameter values.
	   Display on LCD the freq ratio string and C/F values.
	   Send new coarse freq value using VCED single-new-param sys-ex message
	   Send new fine freq value using ACED single-new-param sys-ex message
	   [put new coarse and fine values into Current_Voice table]
	   {verify that the coarse and fine values are correctly updated on LCD display}
	

1163	GetNewADCvalues:  read pots and div/2. New_Param_Pot,New_Value_Pot

1211	doADC:	do AVR ADC conversion

1231	DoSustainMsg: change synth SUSTAIN status

1260	TimesTen:       multiply routine used for ICE200 debug older AVR 	

1283	Get_VCED_Data:  get data from synth into SysEx buffer.  
	Put selected param values into CurrentVoice SRAM table
	Display voice name, voice number and algorythm on LCD display first line..
	
1345	Get_ACED_Data:  Get ACED values from synth.  Put Freq Fine and Osc Wave into Current_Voice SRAM table

1381	Get_EFEDS_Data: get data from synth- used for TQ5 effects

1409	Do_MIDI_input:  send MIDI request ; send dump request message

1459	DoFunctionKey:  ; if F1:F8, change Alg with call to New_Value_toTQ

1498	Send_SysEx:  send sys-ex messages to synth

1524	PrintParams:  - Send ASCII of voice parameters to RS232 serial port soft_UART  38.4Kbaud

1624	StoreVoiceToSynth - send the altered parameters to the Yamaha TX/TQ synth

1852	GetChecksum

1874	playMIDInote:  calls PutMIDIbyte with [SRAM]MIDIout

1922	TurnOffMIDInote:

1963	DoDigit:	parse key-pad section of keyboard	

2012	AllNotesOff:

2027	DoProgramChange: change voice on synth

2056	ClearNoteTable:  keep track of which note keys are pressed

2091	Decode_Data:   parse the incoming keyboard scancodes

2221	ParseExtKey:    handle keyboard's extended-key scancodes

2356	PutMIDIbyte:    put output data into transmit queue

	~~~ interrupt routines
2445	UDRE_IRQ: UART transmit buffer empty
2487	T1OVF_IRQ:  timer1 overflow
2591	GetScan_IRQ: INT0 falling edge - keyboard clock 
2545	RxC_IRQ:	byte received from synth
2587	T2OVF_IRQ:
		
	~~~~~~~~ LCD routines
2644	LCD_init:
2723	SendLCDcommand: ; transmitting char is in Temp register
2727	SendLCDdata:
2769	LCDmsgFlash - put message text from Flash on LCD
2791	LCD1msWait:
2820	LCDdigits - display numbers on LCD
2849	LCDdisplayParam: convert numbers to ASCII and display
	
	~~~~~ Math routines
2885	Bin2ToAsc5:   convert 16-bit binary to ASCII
2920	Bin2ToBcd5:
2962	Bin2ToDigit: