Shop OBEX P1 Docs P2 Docs Learn Events
PINK — Parallax Forums

PINK

jabezsdavidjabezsdavid Posts: 11
edited 2010-07-06 13:34 in Propeller 1
hi, last week I brought a parallax internet netburner kit. I want to display the temperature reading from DS1620 onto a web page. could please help me, how to proceed with the programming.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-07-05 14:49
    The PINK uses serial I/O, so you'll need to use something like the FullDuplexSerial object from the Object Exchange to communicate with it. This also comes with the Propeller Tool. Have you been able to read the temperature from the DS1620? There is a DS1620 object in the Object Exchange as well. Look at the "PinkV2" object in the Object Exchange as well. It includes a variety of examples.

    Once you have the pieces working (DS1620 readings using the included demo program(s) and basic communications with the PINK), you should be able to start experimenting with the examples in the PINK documentation to the point where you understand how to send the data from the DS1620 to PINK variables. Then you'll have to do the web page design to make that look the way you want. The web page design is something we can't help you with. There are plenty of book and tools out there for that.

    If you have specific questions along the way, do ask. The more information you provide when you ask, the more useful you'll find the answers.

    Note: The PINK operates at 5V while the Propeller operates at 3.3V. You need resistors in the signal lines between them to protect the Propeller (or some other voltage translation circuitry). 2.2K resistors will do.

    Post Edited (Mike Green) : 7/5/2010 2:57:21 PM GMT
  • jabezsdavidjabezsdavid Posts: 11
    edited 2010-07-05 20:28
    yes I am able to read the temperature from DS1620. Thank you
  • jabezsdavidjabezsdavid Posts: 11
    edited 2010-07-06 12:30
    Is it possible for me to replace SHIFTOUT 15, 14, LSBFIRST, [noparse][[/noparse]238] by the command OWOUT 15, lsbfirst, [noparse][[/noparse]238] & owout 14, lsbfirst,[noparse][[/noparse]238]. What is difference between these to commands? SINCE I am using BS2p24.
  • jabezsdavidjabezsdavid Posts: 11
    edited 2010-07-06 13:34
    this just practice program can I write like this


    ' {$STAMP BS2p}
    ' {$PBASIC 2.5}

    x VAR Word


    TempC VAR Word
    TempF VAR Word

    DQ PIN 13
    CLK PIN 12
    RST PIN 11

    TX PIN 15
    RX PIN 14

    SETUP:

    HIGH RST
    OWOUT DQ ,LSBFIRST,[noparse][[/noparse]$0C,%10]
    OWOUT CLK,LSBFIRST,[noparse][[/noparse]$0C,%10]
    LOW RST

    PAUSE 10

    HIGH RST
    OWOUT DQ ,LSBFIRST,[noparse][[/noparse]$EE]
    OWOUT CLK,LSBFIRST,[noparse][[/noparse]$EE]
    LOW RST

    MAIN:

    DO
    GOSUB READ_DS1620
    SEROUT 15, 386,[noparse][[/noparse]"!NB0W20:", DEC TempC, CLS]
    SEROUT 15, 386,[noparse][[/noparse]"!NB0W21:", DEC TempF, CLS]
    PAUSE 1000
    LOOP

    READ_DS1620:

    HIGH RST

    OWOUT DQ ,LSBFIRST,[noparse][[/noparse]$AA]
    OWOUT CLK,LSBFIRST,[noparse][[/noparse]$AA]

    OWIN DQ,LSBPRE,[noparse][[/noparse]X]
    OWIN CLK,LSBPRE,[noparse][[/noparse]X]

    LOW RST

    X.BYTE1=-X.BIT15
    TempC=X*5

    IF (TempC.BIT15=0)THEN
    TempF=TempC+2732*9/5-4598
    ELSE
    TempF=TempC-2732*9/5-4598
    ENDIF
    RETURN
Sign In or Register to comment.