what's the difference between BS2 and BS2p
qiuqiuaaa
Posts: 37
I bought a new compass module "HMC5883L", and I use Basic Stamp 2. The sample program provided on product page is on BS2p. It can not be run on my stamp. I want to know the difference and how to modify the program. Thank you.
Main problem is here:
SDA PIN 0 'P0 transceives to/from SDA
SCL PIN 1 'P1 sends clock pulses
WRITE_DATA CON $3C 'Used to perform a Write operation
READ_DATA CON $3D 'Used to perform a Read operation
MODE CON $02 'Read/Write Register, Selects the operating mode. Default = Single measurement
Cont_Mode CON $0
I2COUT SDA, WRITE_DATA, MODE, [Cont_Mode] ' Send continuous output command
Main problem is here:
SDA PIN 0 'P0 transceives to/from SDA
SCL PIN 1 'P1 sends clock pulses
WRITE_DATA CON $3C 'Used to perform a Write operation
READ_DATA CON $3D 'Used to perform a Read operation
MODE CON $02 'Read/Write Register, Selects the operating mode. Default = Single measurement
Cont_Mode CON $0
I2COUT SDA, WRITE_DATA, MODE, [Cont_Mode] ' Send continuous output command
Comments
The BS2p offers more built-in functions and more program storage and faster operation.
There are excellent reasons to own both. While BS2 doesn't have I2C as a built-in, you can construct code to use it. And the same goes if you choose to use an LCD. About the other limit is that the BS2 uses slower RS232 protocols. The Basic Stamp Manual has a good comparison chart.