PDA

View Full Version : SPC to PIC



Macgman2000
- 23rd July 2005, 22:56
Hello ALL,

I am trying to find information on decoding SPC serial format of a Chinese made digital caliper. I want to interface it to a PIC and display the measurements of the calipers on at large LCD. Does anyone have any helpful info, it would be very much appreciated.

Best Regards,
Nick

NavMicroSystems
- 24th July 2005, 14:10
Nick,

THIS (http://www.pcmx.net/gauge/) could help you to get started

Macgman2000
- 24th July 2005, 18:03
Thanks! The information is enlightening....but Now I have more questions than when I started...hahaha.

Like..

1). PBPro SHIFTIN does not work for > 50khz clock. The digital calipers output a clock of 90khz. How do I set up a synchronous serial input given those requirements?

2). I am confused as to the actual output data rate of the calipers. The project deals with interfacing to a PC so my conclusion is that the 9600bps is to the PC? or am I incorrect?

HELP!!!!!

Best Regards,
Nick

NavMicroSystems
- 24th July 2005, 20:19
Nick,

PBPro SHIFTIN does not work for > 50khz clock. The digital calipers output a clock of 90khz. How do I set up a synchronous serial input given those requirements?

as of the information I have gathered so far the caliper interface operates @ 90kHz.

And it atcs as SPI-Master, so SHIFTIN wouldn't work, as it claims to be Master, not Slave
(The Caliper provides the clock, not the PIC)

You will have to write your own SPI-Slave Routines.


I am confused as to the actual output data rate of the calipers. The project deals with interfacing to a PC so my conclusion is that the 9600bps is to the PC? or am I incorrect?
That is absolutely correct!


[qoute]

arniepj
- 11th August 2005, 12:35
Nick,
I had a project a few years ago interfacing four Mitutoyo dial indicators with a basic stamp uc ,outputing the results on a lcd.The indicators used the SPC data output,which I understand does not have a standard protocol.Basically the uc pulls the request line low on the indicator,after a period of time it sends a clock pulse and data stream to the uc.The uc must shift in the data on the clock.This was not reliable using the basic stamp,it required an external shift register to work properly.Using a pic is easier,it needs only to use the interrupt input for the clock pulses.If you think this is what you need ,I can gather the info for you.The demo program I wrote in Picbasic pro inputs one indicator and outputs to the pic serial port.I have a document that describes the Mitutoyo output stream as well.

I didn't use the shiftin instruction,if I remember correctly it would it would not work because of the interrupt requirment.

Later
Paul