In SX Microcontrollers, SX/B Compiler and SX-Key Tool, skynugget wrote: hey all, im trying to populate a 4 bytes of a 12 byte array from a data table as follows. my current method doenst seem to be indexing proper. it seems straight forward, am i doing this write? thanks in advance. [code] ' ------------------------------------------------------------------------- ' Use: DTMF_OUT number (10 = *, 11 = #) ' SUB DTMF_OUT tmpB1 = __PARAM1 tmpb1 = tmpb1 * 4 '0 = 0 ,1 = 4, 2 = 8 etc... FOR idx = 1 to 4 READ DTMF_Table + tmpB1, ToneGen(idx) ' populatte byets 1 thru 4 INC tmpb1 NEXT DTMFen = yes ' go tone DELAY_MS ToneDelay ' hold for tones timing DTMF_OFF ' stop the tones ENDSUB [/code] [code] DTMF_Table: ' LO '' HI ' DATA $1E, $92, $2B, $67 '0 DATA $16, $A4, $27, $46 '1 DATA $16, $A4, $2B, $67 '2 DATA $16, $A4, $2F, $FB '3 DATA $19, $03, $27, $46 '4 DATA $19, $03, $2B, $67 '5 DATA $19, $03, $2F, $FB '6 DATA $1B, $AD, $27, $46 '7 DATA $1B, $AD, $2B, $67 '8 DATA $1B, $AD, $2F, $FB '9 DATA $1E, $92, $27, $46 '* DATA $1E, $92, $2F, $FB '# [/code] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=452531 Need assistance? Send an email to the Forum Administrator at sysadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2010 (http://www.dotNetBB.com)