In SX Microcontrollers, SX/B Compiler and SX-Key Tool, infoseeker34 wrote: Hello! Question: I am attempting to aquire data from an H48C using the SX28AC/DP and coding in SX/B. This is my first time using the controller/language and I'm having a bit of trouble. I've been using the sample code given on the site using BS2, but have had to modify it some... I call to subroutine "get_h48c" from my main statement. Subroutine "get_h48c" looks like this: 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 I've verified with my scope that there is data flying around everywhere on my DIO line, but variables rvCount, rvCount2, axCount, axCount2 all stay zero. I'm using SEROUT to send the data to an XBee, and I've verified that that operation is working correctly. It seems that I'm not accessing the information correctly. So here's the question... Does anyone see anything obviously wrong with what I'm doing here? any help would be greatly appreciated. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=151297 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)