<h1>THE FORUM HAS MOVED,  VISIT US AT OUR NEW SITE www.picbasic.org. Access to this Archive is restricted. Visit the NEW site at www.picbasic.org.  Unless you use the url http://www.picbasic.org you will not gain access to the support forum, wiki and knowledge base. Visit WWW.PICBASIC.ORG  Do not try to log in or register here, use your keyboard and enter the url http://www.picbasic.org directly into your browser. </h1>  

Go Back  

THE FORUM HAS MOVED, VISIT US AT OUR NEW SITE www.picbasic.org. Access to this Archive is restricted. Visit the NEW site at www.picbasic.org. Unless you use the url http://www.picbasic.org you will not gain access to the support forum, wiki and knowledge base. Visit WWW.PICBASIC.ORG Do not try to log in or register here, use your keyboard and enter the url http://www.picbasic.org directly into your browser.

> Proton Development Suite > Proton Plus Compiler v3

Proton Plus Compiler v3 Coding problems and general discussion related to the Development Suite

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 26th January 2010, 18:14   #1
davidsgr
Licensed User
 
Join Date: Jul 2009
Location: athens
Posts: 74
davidsgr is on a distinguished road
Send a message via MSN to davidsgr Send a message via Skype™ to davidsgr
Default digital caliper/scale rs232 problem

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
davidsgr is offline   Reply With Quote
Old 26th January 2010, 18:28   #2
johntabb
Licensed User
 
Join Date: Mar 2002
Location: Ilkley, West Yorks
Posts: 313
johntabb is on a distinguished road
Default

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
johntabb is offline   Reply With Quote
Old 26th January 2010, 18:34   #3
davidsgr
Licensed User
 
Join Date: Jul 2009
Location: athens
Posts: 74
davidsgr is on a distinguished road
Send a message via MSN to davidsgr Send a message via Skype™ to davidsgr
Default

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
davidsgr is offline   Reply With Quote
Old 26th January 2010, 18:42   #4
Les
Proton Compiler Developer
 
Les's Avatar
 
Join Date: Feb 2002
Posts: 1,580
Les is on a distinguished road
Default

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
Les is offline   Reply With Quote
Old 26th January 2010, 18:46   #5
davidsgr
Licensed User
 
Join Date: Jul 2009
Location: athens
Posts: 74
davidsgr is on a distinguished road
Send a message via MSN to davidsgr Send a message via Skype™ to davidsgr
Default

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
davidsgr is offline   Reply With Quote
Old 26th January 2010, 18:50   #6
davidsgr
Licensed User
 
Join Date: Jul 2009
Location: athens
Posts: 74
davidsgr is on a distinguished road
Send a message via MSN to davidsgr Send a message via Skype™ to davidsgr
Default

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
davidsgr is offline   Reply With Quote
Old 26th January 2010, 19:55   #7
RGV250
Licensed User
 
Join Date: Aug 2005
Location: Kent.
Posts: 1,477
RGV250 is on a distinguished road
Default

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
RGV250 is offline   Reply With Quote
Old 26th January 2010, 20:39   #8
rcurl
Licensed User
 
rcurl's Avatar
 
Join Date: Mar 2002
Location: Birmingham, Alabama USA
Posts: 943
rcurl is on a distinguished road
Default

Take a look here: http://www.yadro.de/dro/using-interface.html

-Rick
rcurl is offline   Reply With Quote
Old 2nd February 2010, 05:46   #9
davidsgr
Licensed User
 
Join Date: Jul 2009
Location: athens
Posts: 74
davidsgr is on a distinguished road
Send a message via MSN to davidsgr Send a message via Skype™ to davidsgr
Default

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"
davidsgr is offline   Reply With Quote
Old 3rd February 2010, 13:37   #10
J. Mark Wolf
Licensed User
 
Join Date: Jan 2006
Location: Michigan
Posts: 294
J. Mark Wolf is on a distinguished road
Default

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
J. Mark Wolf is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On


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


All times are GMT +1. The time now is 22:00.



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright © Crownhill Associates Limited 2002 - 2009