Please Help me again
I use SERIN command but the data i was send is not what i send !!!!
My hardware environment
DB 9 pin(s)···················· My BS2SX PIN
pin 2······························ pin 1
pin 3······························ pin 0
pin 5······························ GND
I made my wire by myself and·about 20 cm. long (is that too long?)
after coding and programed to BS2SX , I use Hyper Terminal to send charactor·in sending is O.K. but when i press a key the value is NOT EQUAL ASCII and if i press a lot of time the value is not the same, it's change and change (I notice that it's was missing a first bit and the last bit)
and the terminal doesn't have·a charactor return back.
'{$STAMP BS2sx} '{$PORT COM2} inpbyte var BYTE baudmode con 240 DIRH = %11111111 OUTH = %10000001 Main: HIGH 4 SERIN 0,baudmode,Main,[noparse][[/noparse]inpbyte] SEROUT 1,baudmode,10,[noparse][[/noparse]"You have enter ",inpbyte,10,13] LOW 4 OUTH = inpbyte DEBUG ? inpbyte Pause 200 Goto Main
My hardware environment
DB 9 pin(s)···················· My BS2SX PIN
pin 2······························ pin 1
pin 3······························ pin 0
pin 5······························ GND
I made my wire by myself and·about 20 cm. long (is that too long?)
after coding and programed to BS2SX , I use Hyper Terminal to send charactor·in sending is O.K. but when i press a key the value is NOT EQUAL ASCII and if i press a lot of time the value is not the same, it's change and change (I notice that it's was missing a first bit and the last bit)
and the terminal doesn't have·a charactor return back.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Learn somthing about everything, and Everthing about somthing-
willthiswork89 is correct, you can define PIN 16 for serial communication through the existing DBP programming
connector. Keep in mind there is a signal inversion that takes place when you do this. That said, this could be
the source of your problem. Since you are using a BS2sx, a baudmode of 240 translates to 9600 baud. Try
adding 16384 to this value so that the data sent or received becomes inverted. 16384 + 240 = 16624
You also need a 22K current limiting resistor on your Serin pin...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
I'm a programmer but some reason make me shift to do this job. My electric (electronic) knowledge is very very necessary.
I hope i will disturbing you more and more.
thank again for knowledge and help.