'{$STAMP BS2p} '*********************************************************** '** ** '** I2C Routines for the Basic Stamp BS2p ** '** with the TPA81 Thermal sensor module ** '** ** '** Copyright 2005 - Devantech Ltd ** '** Commercial use of this software is prohibited ** '** Private and educational use only is permitted ** '** ** '** Written by Gerald Coe - February 2005 ** '** ** '*********************************************************** ' Connect P8 (pin13) of the BS2p to the TPA81 SDA ' Connect P9 (pin14) of the BS2p to the TPA81 SCL ' Use 4k7 pull-up resistors from SCL and SDA to 5v supply 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, [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