In SX Microcontrollers, SX/B Compiler and SX-Key Tool, infoseeker34 wrote: DEVICE SX28, OSCHS3, TURBO, STACKX, OPTIONX FREQ 50000000 PROGRAM START_POINT '============================================================================================================== 'Constants '============================================================================================================== XAxis CON 0 YAxis CON 1 ZAxis CON 2 VRef CON 3 Cnt2Mv CON $CE4C Gfcnv CON $3852 '============================================================================================================== 'Variables '============================================================================================================== axis VAR BYTE rvCount VAR BYTE rvCount2 VAR BYTE axCount VAR BYTE axCount2 VAR BYTE CLK VAR RB.0 DIO VAR RB.1 CS VAR RB.2 '============================================================================================================= 'SUBROUTINES '============================================================================================================ Get_H48C: RB = 0 CS = 0 SHIFTOUT DIO, CLK, MSBFIRST, VRef\3 INPUT RB.1 SHIFTIN DIO, CLK, MSBPOST, rvCount\8 SHIFTIN DIO, CLK, MSBPOST, rvCount2\5 CS = 1 PAUSE 1 RB = 0 CS = 0 SHIFTOUT DIO, CLK, MSBFIRST, axis\3 INPUT RB.1 SHIFTIN DIO, CLK, MSBPOST, axCount\8 SHIFTIN DIO, CLK, MSBPOST, axCount2\5 CS = 1 RETURN '============================================================================================================= '============================================================================================================= 'Main '============================================================================================================= START_POINT: FOR axis = XAxis TO Zaxis GOSUB Get_H48C OUTPUT RC.2 SEROUT RC.2, T9600, rvCount NEXT GOTO START_POINT E.O.P.... So all I'm trying to do is gather the info and send it. Actually at this point I'm just checking to see if I have successfully placed the info into a variable. I haven't even begun to try and format the data. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=151297#m151405 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)