Your problem is not the 3.3V supply, but the fact that DTR goes high on normal RS232 communication (the Propeller Tool holds it Low).
So the Rx of the PC never can go LOW. The simplest solution is to connect the 4.7k Resistor from Rx to Vss instead of DTR (this one at the PC Serial Port Connector).
I still can not get the comunication to work, i dont even see the signal on a scope. So now i am wondering if i have the code correct.
Take a look and let me know what you think.
{{ Test serial com 1 }}
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
@ grasshopper : Assuming you've got indentation right and it's not hanging in that 'repeat', that code works okay for me on a ProtoBoard via a PropPlug.
Ergh this is frustrating all i need to do is get this prototype working and i can make the boards with a USB connection.
Sapieha,
I tried as you suggested. i am using hyper terminal for what it is worth. I am now going to try using visual basic but already foresee no positive results.
I can program the thing so i assume the hardware is correct. I tryed different baud rates maybe i need to invert the signal?
Any help is going to stop me going postal at work. [noparse]:)[/noparse]
[noparse][[/noparse]*edited]
here is my new schematic
Post Edited (grasshopper) : 11/19/2007 6:31:42 PM GMT
If you can program the Propeller then the RX/TX levels can not be the problem. At programming, the interface has to work in both directions.
Most PCs have no problem with 0V and 3.3 V level at RX. Some need a negativ voltage instead of 0V, then the MAX circuit or Roadster's solution may help.
But what can be the real problem?
Perhaps you get a Reset between Upload the program and switching to the Terminal. Because the state of DTR changes on Open and Close, you can only 1 time open the port again after Upload. After closeing it a Reset occure.
You can try it with PropTerminal, this is a Terminal with intergrated Loader. After upload a binary with PropTerminal, the Port stays open, and you can communicate without changeing the Program.
See: http://forums.parallax.com/showthread.php?p=649540
grasshopper,
There is nothing mysterious about the transistor circuit or the RS-232 port. The circuit that shows the 4k7 to ground should work but you could try changing the value to 1K to sharpen up those edges. As long as the PC sees something less than 1V or so there should be no problem even though RS-232 "standard" (not) states otherwise. The circuit with the pnp emitter tied to +5V would never work as the prop could never turn the transistor off with 3.3V (the transistor would see 1.7V which is enough to turn it on).
If you are ever unsure about your terminal setup you can always disconnect and short pin 2&3 of the DB9 together and the terminal should echo everything you type. If it doesn't then check that your handshake settings are set to "none".
Your code should be indented after the repeat (or else it won't).
{{
***********************************************************************
Com Testing using a RS232 IC
***********************************************************************
}}
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
OBJ
SER : "FullDuplexSerial"
pub start
ser.start(31, 30, 0, 9600)
repeat
ser.tx(10) 'line feed
ser.tx(13) 'carriage return
waitcnt (1_000_000 * 25 + cnt )
ser.str(string("Hello"))
ser.str(string("WORLD"))
ser.tx(13) 'line feed
ser.tx(10) 'carriage return
* i can program the thing but can not receive the string using hyperterminal and various other programs
* Hypertermianl is Set up as this
Bits per secound 9600
Data bits 8
PArity none
Stop bits 1
Flow control None
Comments
On standart Com port you can have 3 to 12 Volt on it
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
Sapieha
So the Rx of the PC never can go LOW. The simplest solution is to connect the 4.7k Resistor from Rx to Vss instead of DTR (this one at the PC Serial Port Connector).
Andy
Take a look and let me know what you think.
{{ Test serial com 1 }}
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
OBJ
SER : "FullDuplexSerial"
pub start
ser.start(31, 30, 0, 9600)
repeat
waitcnt (1_000_000 * 20 + cnt )
ser.str(string("Test"))
ser.tx(13)
ser.tx(10)
In Com Properties you must have ..... NO hardware flow
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
Sapieha
Sapieha,
I tried as you suggested. i am using hyper terminal for what it is worth. I am now going to try using visual basic but already foresee no positive results.
I can program the thing so i assume the hardware is correct. I tryed different baud rates maybe i need to invert the signal?
Any help is going to stop me going postal at work. [noparse]:)[/noparse]
[noparse][[/noparse]*edited]
here is my new schematic
Post Edited (grasshopper) : 11/19/2007 6:31:42 PM GMT
It is not corect.
Standart Com have -3 -12 to +3 +12 Volt so it is not corect to conect RX signal to Vss.
Look on this link
http://en.wikipedia.org/wiki/RS-232
Conect RTS to CTS and from this resistor to RX and it must funktion
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
Sapieha
Again all i can do is program the dam thing. I think it is either the DTR line or a programming issue.
here is my current schematic
Cros conect RTS and CTS lines on conector.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
Sapieha
Still no luck i am going to sleep on it. I will check in tomorrow
Thanks;;
I attahed my modifed schematic, you might want to also try the basic stamp debug window on the basic stamp editor
If you can program the Propeller then the RX/TX levels can not be the problem. At programming, the interface has to work in both directions.
Most PCs have no problem with 0V and 3.3 V level at RX. Some need a negativ voltage instead of 0V, then the MAX circuit or Roadster's solution may help.
But what can be the real problem?
Perhaps you get a Reset between Upload the program and switching to the Terminal. Because the state of DTR changes on Open and Close, you can only 1 time open the port again after Upload. After closeing it a Reset occure.
You can try it with PropTerminal, this is a Terminal with intergrated Loader. After upload a binary with PropTerminal, the Port stays open, and you can communicate without changeing the Program.
See: http://forums.parallax.com/showthread.php?p=649540
Andy
There is nothing mysterious about the transistor circuit or the RS-232 port. The circuit that shows the 4k7 to ground should work but you could try changing the value to 1K to sharpen up those edges. As long as the PC sees something less than 1V or so there should be no problem even though RS-232 "standard" (not) states otherwise. The circuit with the pnp emitter tied to +5V would never work as the prop could never turn the transistor off with 3.3V (the transistor would see 1.7V which is enough to turn it on).
If you are ever unsure about your terminal setup you can always disconnect and short pin 2&3 of the DB9 together and the terminal should echo everything you type. If it doesn't then check that your handshake settings are set to "none".
Your code should be indented after the repeat (or else it won't).
*Peter*
And this code
* i can program the thing but can not receive the string using hyperterminal and various other programs
* Hypertermianl is Set up as this
Bits per secound 9600
Data bits 8
PArity none
Stop bits 1
Flow control None
I NEED HELP I AM GOING INSANE !!!!!!!!!
Thanks everyone for helping and sorry for sending so many post and getting no where.