Shop OBEX P1 Docs P2 Docs Learn Events
DS1620 to PC using VB6 — Parallax Forums

DS1620 to PC using VB6

edited 2012-02-01 09:43 in BASIC Stamp
Hi,

Does anyone have a VB6 code for DS1620 code via a serial port?
I have read the volts and nuts article (Col- 42) but I couldn’t understand the serial Comm1 part?
I have attached what I want to do for my project.
My problem with this projects how I can send the following 2 lines in the stamp code to VB6 comm1??

DEBUG CRSRXY, 0, 2, (tC.BIT15 * 13 + " "), DEC (ABS tC / 10), ".", DEC1 (ABS tC), DegSym, " C", CLREOL
DEBUG CRSRXY, 0, 3, (tF.BIT15 * 13 + " "),DEC (ABS tF / 10), ".", DEC1 (ABS tF),DegSym, " F", CLREOL

I did try to send the following but it is not working:

SEROUT 16, 16780, [ (tC.BIT15 * 13 ), (ABS tC / 10)]

Attached is also the stamp code from Stamp works.

Cheers,
karabet

Comments

  • edited 2012-01-22 22:38
    Hi,

    Does anyone have a VB6 code for DS1620 code via a serial port?
    I have read the volts and nuts article (Col- 42) but I couldn’t understand the serial Comm1 part?
    I have attached what I want to do for my project.
    My problem with this projects how I can send the following 2 lines in the stamp code to VB6 comm1??

    DEBUG CRSRXY, 0, 2, (tC.BIT15 * 13 + " "), DEC (ABS tC / 10), ".", DEC1 (ABS tC), DegSym, " C", CLREOL
    DEBUG CRSRXY, 0, 3, (tF.BIT15 * 13 + " "),DEC (ABS tF / 10), ".", DEC1 (ABS tF),DegSym, " F", CLREOL

    I did try to send the following but it is not working:

    SEROUT 16, 16780, [ (tC.BIT15 * 13 ), (ABS tC / 10)]

    Attached is also the stamp code from Stamp works.

    Cheers,
    karabet
  • edited 2012-01-22 22:40
    Hi,

    I have found this VB6 code example for the project i did post erlyare on Basic stam fourms.
    Please can some one help me to read 2 difrent tempratures from 2 different stamps ( both stams are BS2).
    And they will be connected via serial port to USB hub and then USB port on the PC.
    If some one can tell me how i can the sending charicters that i can defrenciate between the 2 Stamps and reading it in 2 difrent Text boxs or Labels?
    I have attached the VB code, the Stamp DS1620 code and the main connection document( what actualy i’m trying to do)

    The big question is how I can differentiate between the 2 stamps serials in the VB code and controller the input for both stamps temperatures ( Inside Tem C/F and Outside Tem C/F)??

    Cheers,
  • edited 2012-01-24 00:33
    Hi,

    I have updated the post with more information can someone please help??

    Cheers,
  • softconsoftcon Posts: 217
    edited 2012-02-01 09:43
    Well, the first thing you need to do is get each ds1620 working with it's particular basic stamp. (there's code for this in the object exchange) After that, it's a simple matter of using your serout routines to ship the temp readings to the pc (which you're already doing) with the additional caveat that you'll probably need to send an id byte first, so the computer knows which stamp the info came from.
    I.E. instead of just sending temp,
    you'd send
    1,temp
    on stamp 1, and
    2,temp
    on stamp 2.
    Of course, the pc would need to read both values, but that shouldn't be a problem.
    That's all there is to it.
    If you need more specific help, I'm sure an additional post will get you the help you need.
Sign In or Register to comment.