Nick,
how are you getting on with the project?
Nick,
how are you getting on with the project?
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Hello All,
I have the hardware set up using an LM393 (0v to -1.55v) to shift to standard TTL/CMOS. I am able to see the data by setting the calipers to 1" and analyzing the waveform to get 20480 (which is the resolution per inch) . It is being clocked out LSB to MSB. I have the PIC packing 3bytes but like I said it is backwards.
I have most of the supporting readout code done and tested with dummy variables. The only thing holding me up is flipping the data around and scaling it (scaling factor already worked out). I will fiddle around with your suggestion.
Thanks again!!!
Best Regards,
Nick
Nick, here is a ready to run Code Snippet that does the conversion:
Code:InBuffer VAR BYTE[3] CounterA VAR BYTE Main: ' Bits are shifted into an Array of Byte (InBuffer) here (LSB first) ' ' Place your Code to shift the bits in here... FOR CounterA = 0 TO 2 'Revert the Bit order InBuffer[CounterA] = Inbuffer[CounterA] REV 8 'Invert captured Data (if not required comment this line out) InBuffer[CounterA] = InBuffer[CounterA]^$FF NEXT CounterA 'Output Raw Data to LCD (24 Bits, MSB first) LCDOUT BIN8 InBuffer[2],Bin8 InBuffer[1],Bin8 InBuffer[0] GOTO Main
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Thanks Ralph !!!! I will try it out this week.....geez, right now I have an urgent request for a speed controller FETs'n all ....hehehe.
Best Regards,
Nick
Hi Nick,
RE: your PM
I haven't found time yet to work on this project.
It certailny is possible in PBP,
a 70-90 kHz clock is not that fast, so a tight loop could do.
Another option is to use the MSSP Module.
I'll have a look into it when I find time.
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Bookmarks