Baudrate/hyperterminal Question?
Dodge Dakota
Posts: 5
HI, I have 2 questions: First one is Baudrate (16624), not sure how i got this number but it's the only thing that works with the serial devices I'm playing with. Any Ideal what it is as far as 2400, 9600, or bps? Second one, well guess the firstone will answer that, Been trying to monitor the output of my stamp using hyperterminal at 9600 but have been able to so like i said finding out what 16624 is will fix that. I forgot how i found this value but it's the only on that works for me. Thanks for the help!
Comments
They also include the equation for figuring it out!
It's something like: (1000000/<desired baudrate>)-20
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
I've attached the entire template.· You can get this loaded every time you click on File\New by doing this:
1. Download the file to your system.
2. Start the BASIC Stamp IDE
3. Click on Edit\Preferences...
4. Click on the Files & Directories tab
5. Click the Browse button next to the New file template text box
6. Navigate to the file, click on Open
7. Click OK to close the Properties dialog
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
Thanks! Looks like that where i found the number 16624.
John,
I have try the templete but couldn't get it to work with the device that i am working with. Thats why i'm try to figure out the bps of 16624 (which is 9600, 8-n-inverted) for BS2p24.
But this does explain why i can monitor it using Hypertermal. Guess i will have to figure that out tonight.
Thanks again for the help
Baud con inverted + T9600
nul con $00
soh con $01
stx con $02
eot con $04
Main:
serout 6, Baud, [noparse][[/noparse]nul, nul, nul, nul, nul, soh,"ZOO", stx,"AAHELLO",eot]
End
Pin 6 is connect straight to the device to display a msg on. This is how i know that it is working but i'm try to view the dat being sent to troubleshot another device that's giving me problems. Thanks again for the help.
Are you using the programming port or are you using some I/O pins.
Using windows no doubt....be sure PBasic isn't using the comm port while you're trying to use hyperterminal.
You should only have to: serout <pin>, <baud>,·("hello",CR)· and you should see a 'hello' pop up in the connect hyperterm window (of course, hyperterm has to be at the same baud rate!).
If you are using a 'working' programming cable in to the programming port...then there's nothing you need to do to see anything.
Try this even:
temp=1
debug·"Temp = ", DEC temp, CR
You should see: Temp = 1 on your debug screen in Pbasic.
You don't need the framing stuff to test for 'anything' coming on the screen.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
ARe you sure you are going in to the proper pins on the hyperterm computer?
You should be using an inverted serout to pin 2 on the DB9 and you should be using a true serin from pin 3 of the DB9.· **NOTE, you need a 22kohm resistor inline with the serin pin on your stamp to limit the 12Volt RS232 and prevent destroying your stamp pin!
do you have a voltmeter?· If you put your meter on one of the serial pins you may not get a nice value to read, but you sure should see the meter jumping around trying to make the reading.· I use that to determine if anything at all is happeningon that pin!
This is some simple script I'm using to talk to a modem:
SEROUT 15, 16780,10,· [noparse][[/noparse]"AT", CR]
SERIN· 14, 396, 2500, Error, [noparse][[/noparse]WAIT ("y")]
Again, remembering that a 22kohm resistor is in series with the serin I/O line (pin14 in my case).
AND....due to my luck with 50/50 choices....if you happen to have serout going to serial port pin 2 and serin going to serial port 3 and it still doesn't work....swap the wires!· Overall, the Tx at one end needs to go to the Rx at the other end!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
But I'll tell you...the stamp pins aren't designed to take 12Volts....so we put a current limiting resistor inline to help protect the pins.
The typical value is 22kohm.· I'd suggest you do use it....find whatever combination of resistors you have to make it happen.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
NOTE:
The 22 k resistor is not required if
connecting to the SIN pin.
GREAT info starting on page 381 about this.· I highly recommend you read it.
If you are taking the serial into a regular IO pin, then you do need it.
Dave
But DaveF is right...read the manual and if you are using the programming port then you don't need the resistors!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."