Basic Stamp 2.5 with BS2 Chip and Rev B Board of Education Error
Codehammer
Posts: 6
Hi
I am Programming in Basic Stamp 2.5, using a·BS2 Chip and Rev B Board of Education. The·Problem I Am having is that the Basic Stamp 2.2 Program Checks the Device on COM1, when One clicks Run-> Identify.
In the Tips of the Day it is said to Have a max Power of 6V to the Board of Education.
The Manuals say the BS2 Chip Must have a Max of 7.5V, currently it's set to 6V.
I Currently have 1 Servo Connected so Can I Still use a max of 7.5V, or Lower than 6V
I Then Type in the Code below just to see if the Device Detects:
The Problem is that I used to have before I Changed the board of Education's Power from 4V to 6V was:
Finding the PSC
PSC Version is·xx and each time xx was a·Different Unicode Characters.
After making the Board of Education's Power to 6V the Following:
Finding the PSC
Finding the PSC
Finding the PSC
Finding the PSC
Finding the PSC
Finding the PSC
Finding the PSC
Finding the PSC
.....
Sdat PIN 13 means that Pin 13 Must Connect to the Servo form the Board of Education, I've Tried all other Pins (12-15) and modified the Code too. The Servo is on Channel 11 on the PSC.
Baud CON 396 ' Means that baud of 9600 is Set.(is that true or is it 38K4) Run-> identify has the Chip listed wiith 9600.
I·do Not Know what the 500 in the following·Line from the Manual·means :
SERIN Sdat, Baud, 500, FindPSC, [noparse][[/noparse]STR buff\3]
Could all these Problems be a Result of me using Rev B Board of Education when the manual I Have has a Rev·C Board of Education· Board?
Or is it because of Too little Power to the BS2 chip with 1 Servo (currently 6V instead of a max of 7.5)
I've read Somewhere That too Little Power will Cause the Chips to Reset.
Below is some of the Other Code's used to Rotate the Servo and Retrieve the Servo Position:
I am Programming in Basic Stamp 2.5, using a·BS2 Chip and Rev B Board of Education. The·Problem I Am having is that the Basic Stamp 2.2 Program Checks the Device on COM1, when One clicks Run-> Identify.
In the Tips of the Day it is said to Have a max Power of 6V to the Board of Education.
The Manuals say the BS2 Chip Must have a Max of 7.5V, currently it's set to 6V.
I Currently have 1 Servo Connected so Can I Still use a max of 7.5V, or Lower than 6V
I Then Type in the Code below just to see if the Device Detects:
' {$PBASIC 2.5} ' {$STAMP BS2} Sdat PIN 13 Baud CON 396 buff VAR Byte(3) FindPSC: DEBUG "Finding the PSC", CR SEROUT Sdat, Baud+$8000, [noparse][[/noparse]"!SCVER?", CR] SERIN Sdat, Baud, 500, FindPSC, [noparse][[/noparse]STR buff\3] DEBUG "PSC Version is ", buff(0), buff(1), buff(2), CR STOP
The Problem is that I used to have before I Changed the board of Education's Power from 4V to 6V was:
Finding the PSC
PSC Version is·xx and each time xx was a·Different Unicode Characters.
After making the Board of Education's Power to 6V the Following:
Finding the PSC
Finding the PSC
Finding the PSC
Finding the PSC
Finding the PSC
Finding the PSC
Finding the PSC
Finding the PSC
.....
Sdat PIN 13 means that Pin 13 Must Connect to the Servo form the Board of Education, I've Tried all other Pins (12-15) and modified the Code too. The Servo is on Channel 11 on the PSC.
Baud CON 396 ' Means that baud of 9600 is Set.(is that true or is it 38K4) Run-> identify has the Chip listed wiith 9600.
I·do Not Know what the 500 in the following·Line from the Manual·means :
SERIN Sdat, Baud, 500, FindPSC, [noparse][[/noparse]STR buff\3]
Could all these Problems be a Result of me using Rev B Board of Education when the manual I Have has a Rev·C Board of Education· Board?
Or is it because of Too little Power to the BS2 chip with 1 Servo (currently 6V instead of a max of 7.5)
I've read Somewhere That too Little Power will Cause the Chips to Reset.
Below is some of the Other Code's used to Rotate the Servo and Retrieve the Servo Position:
' {$STAMP BS2} ' {$PBASIC 2.5} ' {$PORT COM1} ch VAR Byte pw VAR Word ra VAR Byte Sdat CON 15 baud CON 396 ra=7 ch=11 DO pw=1250 SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", ch, ra, pw.LOWBYTE, pw.HIGHBYTE, CR] PAUSE 1000 pw=250 SEROUT Sdat, BAUD+$8000,[noparse][[/noparse]"!SC", ch, ra, pw.HIGHBYTE, CR] PAUSE 1000 LOOP
' {$STAMP BS2} ' {$PBASIC 2.5} ' {$PORT COM1} ch VAR Byte pw VAR Word ra VAR Byte x VAR Byte Buff VAR Byte(3) Sdat CON 15 baud CON 396 Init: ra= 15: ch = 11 DO pw=1240: GOSUB WRservo pw=240: GOSUB WRservo LOOP WRservo: ch=11 SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", ch, ra, pw.LOWBYTE,pw.HIGHBYTE, CR] FOR x = 0 TO 4 PAUSE 1000 SEROUT Sdat, Baud+$8000, [noparse][[/noparse]"!SCRSP", ch, CR] SERIN Sdat, Baud, 1000, Init,[noparse][[/noparse]STR Buff\3] DEBUG "Servo ", DEC buff(0), " ", HEX2 buff(1), " :", HEX2 buff(2), CR NEXT RETURN
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Are you trying to talk to a PSC board? Or do you merely have one servo connected to the BOE?
The code you are using is designed to talk to a PSC board, which will then control a servo connected to the PSC board.
If it's one servo, then you should use "PULSOUT" to drive the servo directly from the BS2. And you should power the servo using Vdd, NOT 'Vin'. Then you can up the supply voltage to 7.5 volts.
The 7805 Regulator the BOE uses to supply 5 volts to the BOE board (and the BS2, AND the 'Vdd' pin) can supply 1.5 amps -- but it does need a Vin of 7.5 volts to do that. A Vin of 6 volts WILL cause a brown-out.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
At the Moment the Serial Connection is to the REV B BOE, then From the BOE on X4 Pin 15 a Connection to the PSC, the Single PSC has on Pin 11 a Connection to the Servo.
The·Test I'm Performing is from Doc's that Came from·This Site.
Last Night Before Reading this I Connected the Jumper which is Suppose to be used when Having 2 Servo's, connected, anyways...· when I did the Ping Test above to the PSC, the Engine rotated slowly for 15 Seconds, then Stopped. Then Every Command Sent to the PSC like the Rotate Engine and Get Current Position caused the Green Light to Flash Then Stop almost showing it Received the Signal then Stopped. 2 Minutes Later there was No Activity and there was Nothing that Worked· - even after re-setting the Jumpers.
I'm Begining to think the PSC is Damaged. If So How Do I Test It. I've Given the Setup (above) of the Connections & Hardware, if Possible Please Give me the PULSOUT and Vdd Code so as to Test if the PSC Works.
Thanks For Your Responses
·· I'm unclear as to which BOE you have...Serial or USB.· If it's Serial, then you cannot use the servo connector you're using.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Post Edited (Chris Savage (Parallax)) : 9/14/2005 3:09:13 PM GMT
What Connector Should I Use?
Are you Saying Above I Should Supply 5V to the BOE and 7.5 to the PSC? I'm Unsure what·Vinn is in the 1st Place. I Will Try and Scan the Doc that I Got (with Diagrams) which Explains all I Have Said Above.
I Will Now Only be Back Monday on the Net: Before Later Today, will someone Please Post me Something so As to determine whether my PSC is Blown.
Allanlane5, you Said that I Can Directly Connect the Servo to the BOE, if So Then I Can Verify if the PSC is Blown - The Code I have Used to do the Above was Directly from the Manual, I am Learning Slowly the Language of PBasic 2.5 - Please give me Code to Test it Directly from the BOE Rev B.
Thanks.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
http://www.parallax.com/detail.asp?product_id=28023
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
The Diagram on page 3 is Exactly trhe Setup I've got, Except 1 servo on channel 11.
Now as you can see there the BOE is Rev C -·I got Rev. B
All·people Above mentioning VIN's and terms which is not on that PDF.
Also the code I posted in the fisrt post can be found on pages 4, 5 and 6.
Extract:
So this·does not say whether 2 Servo's on the Board requires 7.5 V.
6V is what I got on the PSC at the Moment < 7.5.
What now, does this mean the PSC is damaged? I remember someone saying that the Servo can be controlled directly from the BOE - If someone posts this code so I can Test it· then I Know its NOT the BOE thats Damaged - Only the PSC.
If you are using 2 battery packs:
How many mAh are your batteries that you have connected to the PSC? I have noticed that I get sporatic results when using lower ratings. The best results (and this is with my Hexcrawler) have been with a 3000mAh 7.2v R/C battery.
Hope this helps,
Doc
It states that if you are not using a Rev C BOE, where to connect your PSC.· It is not the servo headers.
So, have you removed your connection from the servo headers?· Have you connected the pins as stated above?· If so, can you run the identify firmware code?
BTW, 6V is fine, servos are designed to run at that voltage anyway.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Thanks for your responses.