Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Reading Digital Calipers
Author | Message | ||||
Martrogers Newbie Joined: 03/07/2016 Location: AustraliaPosts: 4 |
I would like to be able to read the digital output from cheap Chinese digital calipers in order to build a cheap CNC machine. The protocol is two 24 bit numbers giving absolute and relative readings, the protocol can be found here http://www.shumatech.com/support/chinese_scales.htm Th problem as regards the MM is that the clock pulses are only approx 4 microseconds duration with about 10 microseconds between pulses which I believe is too fast for the MM running Basic. I am wondering what is the best way to be able to collect this data in order to work on it with the MM using Basic. Some solutions I am considering are: - write a CFunction. This would be ideal but is complicated for me as I would have to learn C and its MM environment. - use another Pic chip running at say 20MHz and write an assembly routine with the Pic outputting 3 times a second to the MM -Use a shift register/memory to read the data and output to the MM Can anyone recommend any other smart/easy solutions? Thanks Martin |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1133 |
Hi, maybe the CFunction readADCtoArray can do the job (part of it)? Just a idea ... Regards Michael |
||||
Warpspeed Guru Joined: 09/08/2007 Location: AustraliaPosts: 4406 |
How about a one bit serial ram such as Maxim DS1200 run in burst mode ? https://datasheets.maximintegrated.com/en/ds/DS1200.pdf That will store 1024 serial bits clocked in at 4 Mhz. You can then read that back out at your leisure. Cheers, Tony. |
||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5024 |
I remember playing around with old serial mice years ago. They type with the ball and rollers, plugged in to the D9 serial port on your PC. They were pretty clever, the chip in the mouse would track the roller X and Y optocouplers, basically keeping a tally of each rollers count. When the serial port was ready, the mouse would send out the current roller tally. This meant even if the PC was too busy, the mouse would continue to track the rollers, therefore not loosing its position on the desk. Glenn The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
Print this page |