Help with BS2SX Analog/digital code
Siri
Posts: 220
This is my first attempt to write some cose for OEM Basic Stamp 2sx to doa analog to digital conversion.
I used the Board of Education BS2 to practice and the attached code worked which was taken from Matt Gilland's book.
I also read the Basic Stamp Manual - "pulsout" command the only difference is Duration units and the Maximum pulse width.
I really do not see if I need to change any part of the code and when I run the code in BS2sx - it does not work.
The hardware is connected exactly the same to the same pins etc.
I would appreciate any help to sove this problem.
Thank you.
Siri
I used the Board of Education BS2 to practice and the attached code worked which was taken from Matt Gilland's book.
I also read the Basic Stamp Manual - "pulsout" command the only difference is Duration units and the Maximum pulse width.
I really do not see if I need to change any part of the code and when I run the code in BS2sx - it does not work.
The hardware is connected exactly the same to the same pins etc.
I would appreciate any help to sove this problem.
Thank you.
Siri
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
That is the exact code Iused in the BS2 and BS2sx.
I get the 8 bit results from the ADC0832CCN and it shows up in the debug window when I run it in the BS2 but not with the BS2sx OEM.
The· BS2 and BS2sx pins used are:
PINS 3,4 and 5 from the stamp are connected to pins CS,CLK and D0 respectively.
I have attached the circiut and the code page from the book.
Thanks
Siri
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
I get "11111111" for about a fraction of a sec. and then "00000000" but nothing happens when you continue to turn pot in any direction.
The code is attached.
Thanks
Siri