![]() |
|
|||||||
| Proton Plus Compiler v3 Coding problems and general discussion related to the Development Suite |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Licensed User
![]() |
Hello,
I am trying to make a terminal for controlling my Lathe and i have install 2 digital scales and i want to comunicate them with my terminal(pic 18f452) on the calipers has data and clk connections but i dont know how to communicate with the pic i am trying to connect with the serial port from my pc and nothing is happen . If anybody has the experience to help me i will appriciate that at least to know how to use the clk pin for rs 232...!!!! Thanks everybody read this....!!! David http://www.zietlowdesign.com/product...O-2_manual.htm |
|
|
|
|
|
#2 |
|
Licensed User
![]() Join Date: Mar 2002
Location: Ilkley, West Yorks
Posts: 313
![]() |
Hi David
I don't think this is RS232. it's probably a proprietory protocol. I was thinking i2c but that's got SCL and SDA where the SCL pin is the clock pin, and SDA is the data pin. Have you tried a scope on the connections to see what is there? john |
|
|
|
|
|
#3 |
|
Licensed User
![]() |
Thanks for the responce...!!!
On the databases on web says that is rs232c with 9600 or 19200 baud this is the point that i am trying to do by serial |
|
|
|
|
|
#4 |
|
Proton Compiler Developer
Join Date: Feb 2002
Posts: 1,580
![]() |
A quick search on Google came up with quite a few answers to your question.
http://en.wikipedia.org/wiki/Caliper#Digital_caliper And this one has A PICmicro to convert the synchronous serial data that the calipers use to standard RS232 asynchronous data. http://www.compendiumarcana.com/caliper/ There's more than enough information on the internet to complete your project.
__________________
Regards Les |
|
|
|
|
|
#5 |
|
Licensed User
![]() |
on the instructions says:
working way to interface:Synchronous series data:binary code,24bits.the cycle is 300ms transmiting time is 0.5ms three wires: D data CP clock pulse + positive pulse range of data: <0.2v level "1" >1,3v clock pulse:90khz effective for high electrical level |
|
|
|
|
|
#6 |
|
Licensed User
![]() |
thanks Les but how i will send the clk??? maby is a stupid question but the serial datas for me is only
SerIn SERIALIN, 16468, [DEC3 FIRST] how i can send the clock of 90khz??? sorry but i dont have the experience |
|
|
|
|
|
#7 |
|
Licensed User
![]() Join Date: Aug 2005
Location: Kent.
Posts: 1,477
![]() |
Hi David,
I do not know it this will work but you could try software SPI and just use the serial in? The other thing is, have you had a scope on the lines to see what the data is like? By the looks of what you have posted, you will need some sort of level shifter as well. Regards, Bob |
|
|
|
|
|
#8 |
|
Licensed User
![]() Join Date: Mar 2002
Location: Birmingham, Alabama USA
Posts: 943
![]() |
|
|
|
|
|
|
#9 |
|
Licensed User
![]() |
i have the signal because i am using the LM2901 with very good resoults and i have fount some good convertion routines incide the forum but i havent the real data on lcd has anybody the idea how to make good convertion with the 48 bits of bin code?? i need bin to bcd and bcd to ascii for finalising...!!!
Device = 18F452 XTAL 20 ALL_DIGITAL = TRUE Symbol CLK = PORTC.7 Symbol DTA = PORTC.6 LCD_DTPIN = PORTB.0 LCD_RSPIN = PORTB.4 LCD_ENPIN = PORTB.5 LCD_INTERFACE = 4 ' 4-bit Interface LCD_LINES = 2 LCD_TYPE = 0 Dim Convert As Byte ' value to be converted from BCD to BIN or BIN to BCD Dim Tconvert As Byte ' temp storage for the conversion process, used in both bcd_bin and bin_bcd Dim bcd As Byte Dim decimal As Byte Dim VAR1 As Byte Dim VAR2 As Byte Dim VAR3 As Byte Dim VAR4 As Byte Dim VAR5 As Byte Dim VAR6 As Byte Cls start: SHIn DTA ,CLK ,msbpre , [Convert,VAR1,VAR2,VAR3,VAR4,VAR5] ' Shiftin msb-first, pre-clock. GoSub BIN_BCD Print At 1,1,BIN VAR4, BIN VAR5 Print At 2,1,DEC8 decimal 'Print At 1,1,"test" GoTo start BIN_BCD: Tconvert = Convert//10 ' Tconvert has the remainder of the divide by 10 in the low nibble Convert = Convert / 10 ' Convert has the integer value of the divide by 10 in the low nibble swapf Convert,1 ' Swap the high and low nibbles of Tconvert and place result back into Tconvert Convert = Convert ^ Tconvert ' Bitwise XOR the two results to form the BCD decimal = Tconvert /16 *10 decimal = Tconvert // 16 + decimal Return Return Include "FONT.INC" |
|
|
|
|
|
#10 |
|
Licensed User
![]() Join Date: Jan 2006
Location: Michigan
Posts: 294
![]() |
Check out the link below. They offer DRO's (digital read outs) for Milling machines and lathes. They sell kits containing bare PCB's and PIC executables, that you can solder together yourself.
http://www.shumatech.com/web/products/dro-350 |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| USB RS232 18f4550 Problem | Alex_C | Proton Plus Compiler v3 | 7 | 18th January 2010 10:25 |
| rs232 max232, schmitt trigger PIC input, voltage threshold problem | Hans Chr | The Lounge | 1 | 11th October 2008 01:07 |
| Problem RS232 | Ledinblue | Proton Plus v2.1.5.3 General Discussion | 5 | 13th June 2007 06:25 |
| Major Port problem with 18F252/18F2420 | Pkklause | Proton User Site | 1 | 30th November 2006 16:33 |