CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Reading Chinese Scales output

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
sadlpx



Joined: 19 Feb 2004
Posts: 23

View user's profile Send private message

Reading Chinese Scales output
PostPosted: Fri Sep 30, 2005 2:12 pm     Reply with quote

I'm trying to read the output from some chinese calipers. The output stream is 2 - 24bit words back to back (total time about <1 ms), repeating at 50hz or every 20ms. Signal clock starts out with a 15-19 ms low then high for 55us, 24 bit word, high 110us, 24 bit word, high 55us then low for 15-19ms, repeat. Reading seems simple just a shift in routine reading on the falling edge. My problem is I'm having trouble filtering to the first falling edge. how could i set up to use the long (19ms) low to start my read cycle.

More data and scope images on the scales electronics are at this link.

http://www.shumatech.com/support/chinese_scales.htm

As always thanks in advance.


Last edited by sadlpx on Sat Oct 01, 2005 6:12 am; edited 1 time in total
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

Re: Reading Chinese Scales output
PostPosted: Fri Sep 30, 2005 10:13 pm     Reply with quote

sadlpx wrote:
I'm trying to read the output from some chinese calipers. The output stream is 2 - 24bit words back to back (total time about 1 ms), repeating at 50hz or every 20ms. Signal clock starts out with a 15-19 ms low then high for 55ms, 24 bit word, high 110ms, 24 bit word, high 55ms then low for 15-19ms, repeat. Reading seems simple just a shift in routine reading on the falling edge. My problem is I'm having trouble filtering to the first falling edge. how could i set up to use the long (19ms) low to start my read cycle.

More data and scope images on the scales electronics are at this link.

http://www.shumatech.com/support/chinese_scales.htm

As always thanks in advance.


You might want to edit your post and correct the timings because they are very confusing. You have used ms for all timings but most of the timings are in microseconds not milliseconds.

From the link you have published there is a long time between readings during which time the clock is held high. I would start by detecting this idle condition specifically detect the clock is high and remains high for 10ms. Once you have found this condition now wait for the clock to go low (possible start condition) validate the clock is still low after about 1/2 of the estimated low pulse width. Here you have found a valid start condition and the rest is up to you :-)
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group