Shop OBEX P1 Docs P2 Docs Learn Events
Please Heee..lllpppp !!!! — Parallax Forums

Please Heee..lllpppp !!!!

JohnsonJohnson Posts: 2
edited 2005-09-20 14:27 in BASIC Stamp
I have difficulties in compiling using BS2sx by using the sample program for heat sensor TPA81 I downloaded from the internet.

Below is the sample program but this program only successfully compile for BS2p···· ~NOT!!!!·BS2sx~


'{$STAMP BS2sx}
SDA····· CON 8·········· ' SDA on pin13, SCL on pin14
Ver···· VAR Byte
Ambient VAR Byte
Pix1··· VAR Byte
Pix2··· VAR Byte
Pix3··· VAR Byte
Pix4··· VAR Byte
Pix5··· VAR Byte
Pix6··· VAR Byte
Pix7··· VAR Byte
Pix8··· VAR Byte
Loop:
· I2CIN SDA, $d1, 0, [noparse][[/noparse]Ver, Ambient, Pix1, Pix2, Pix3, Pix4, Pix5, Pix6, Pix7, Pix8 ]
· DEBUG 2,0,1, "BS2p - TPA81 Demonstration "
· DEBUG 2,0,2, "Firmware Version ", DEC Ver, "··· "
· DEBUG 2,0,3, "Ambient ", DEC Ambient, "··· "
· DEBUG 2,0,4, "Pix1 Pix2 Pix3 Pix4 Pix5 Pix6 Pix7 Pix8"
· DEBUG 2,0,5, DEC3 Pix1, "· ", DEC3 Pix2, "· ", DEC3 Pix3, "· ", DEC3 Pix4, "· ", DEC3 Pix5, "· ", DEC3 Pix6, "· ", DEC3 Pix7, "· ", DEC3 Pix8
GOTO Loop


I hope "gurus" in the parallax forum able to provide me with some help, possible provide the solution for me.
Thank you very much and appreciate to everyone to take the time to read my problem.

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-20 14:04
    Johnson,

    ·· The problem is that the command you are using I2CIN, is not supported by the BS2sx...Only the BS2p series have that command.· Please try to use a more descriptive subject line in future posts.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-09-20 14:27
    You can do I2C on the BS2sx, albeit manually -- which means you need to understand the command sequence for the device you want to use.· I've attached a demo program for a common I2C memory.· The demo has all the core I2C routines you need for the BS2sx (or BS2, or BS2e).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.