Data from stamp to PC
Herm
Posts: 5
I'm an old newbie (renubie?) who has done a couple of stamp/stepper motor projects in the past.· I'm now interfacing a Honeywell ASDX DO pressure sensor with a stamp, using I2C protocol.·
That part of the project is going all right, but I'd·appreciate any advice on how to get data from the stamp into a PC (Excel?).· Am I missing something-is this a done deal or what?
I'm in the hobby mode with this project, so I can't afford hi buck solutions.· Would really appreciate any advice.· Thanks.···· Hermanator
That part of the project is going all right, but I'd·appreciate any advice on how to get data from the stamp into a PC (Excel?).· Am I missing something-is this a done deal or what?
I'm in the hobby mode with this project, so I can't afford hi buck solutions.· Would really appreciate any advice.· Thanks.···· Hermanator
Comments
Also, http://www.al-williams.com/npdaqax.htm·works great from Excel or C++ or VB. It is technically made to work with our NetPorter DAQ board, but the download is free for personal use and if you can make your Stamp output strings in the form of:
V1=data
V2=data
Where V1 and V2 are any identifier you want and data is whatever the value you want, then it will work great. For example, you might write:
Temp=33
Level=100
Status=1110011
Regards,
Al Williams
AWC
Add Floating Point to your Stamp (now with Macros)
http://www.awce.com/pak12.htm
·
Sorry about misspelling your name. Hermanator
'{$STAMP BS1}
HIGH 5
SYMBOL CS = 0
SYMBOL CSA = 4
SYMBOL AD = PIN1
SYMBOL CLK = 2
SYMBOL data = B0
SYMBOL datb = B6
SYMBOL i = B2
loop:
LOW 5
PAUSE 1
HIGH 5
FOR B4 = 0 TO 39
PAUSE 3000
GOSUB conv ' Get the data from ADC 1.
SEROUT 3,N1200,(B0)
PAUSE 1000
NEXT
'************************************************
FOR B4 = 0 TO 39
'LOW 5
'PAUSE 1
'HIGH 5
PAUSE 3000
GOSUB convt···· ' Get the data from ADC 2.
SEROUT 3,N1200,(B6)
PAUSE 1000
NEXT
SLEEP 3280
GOTO loop
conv: LOW CLK···· ' Put clock line in starting state.
LOW CS
PULSOUT CLK, 1···· ' 10 us clock pulse.
LET data = 0···· ' Clear data.
FOR i = 1 TO 8···· ' Eight data bits.
LET data = data * 2·· ' Perform shift left.
PULSOUT CLK, 1···· ' 10 us clock pulse.
LET data = data + AD·· ' Put bit in LSB of data.
NEXT
HIGH CS
RETURN
convt: LOW CLK···· ' Put clock line in starting state.
LOW CSA
PULSOUT CLK, 1···· ' 10 us clock pulse.
LET datb = 0···· ' Clear data.
FOR i = 1 TO 8···· ' Eight data bits.
LET datb = datb * 2·· ' Perform shift left.
PULSOUT CLK, 1···· ' 10 us clock pulse.
LET datb = datb + AD·· ' Put bit in LSB of data.
NEXT
HIGH CSA
RETURN
***************************************QBasic:
DEFINT A-Z
OPEN "com1:1200,N,8,1,CD0,CS0,DS0,OP0" FOR INPUT AS #1
OPEN "c:\data.log" FOR OUTPUT AS #2
CLS
PRINT "Battery voltage logging (COM1). Press any key to stop."
PRINT "File is located at c:\data.log"
PRINT ""
Again:
temp$ = INPUT$(1, 1)
PRINT ASC(temp$); CHR$(9); DATE$; CHR$(9); TIME$
PRINT #2, ASC(temp$); CHR$(9); DATE$; CHR$(9); TIME$
IF INKEY$ = "" THEN GOTO Again
CLOSE
END