NEWB serial
lboucher
Posts: 139
HI All
I have a parrallax usb to serial adapter and i would like to send data to an SX28.
I need to have a max232 circuit right?
Thanks
Lucas
I have a parrallax usb to serial adapter and i would like to send data to an SX28.
I need to have a max232 circuit right?
Thanks
Lucas
Comments
No you don't need a MAX232. Just connect to the serial adapter.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There is a fine line between arrogance and confidence. Make sure you don't cross it...
·
I thought serial was +/- 15 volts and the ttl voltage was 5 volts.
I am right in quessing that since this is a usb to serial adapter the serial is 5 volts because usb is 5 volts.
Thanks
[noparse][[/noparse]Edit] Fixed typo.
Post Edited (JonnyMac) : 3/5/2009 7:46:38 AM GMT
I hook up my usb to serial.
Pin 3 to the serin pin on the sx, connect the ground. (Not using a pull up resistor, should i be?)
Then use the attached program.
When i hit "A" on hyperterminal it shows up on the SX as 191 instead of 65.
Hyperterminal setting 9600 8 bits N parity 1 Stop bit No flow control
What in the world is going on, this should be simple.
And I know it sounds funny to say, but you're using old fashioned SX/B syntax. RX_BYTE should be a function declared like this:
... and coded like this:
Since __PARAM1 is used to return a byte from a function we can use it to receive the serial byte (I've looked inside the SERIN code so I know this is okay).
[noparse][[/noparse]Edit] See attached -- it will get you going (I tested with a Propeller Plug with is the follow up to the USB2SER).
Post Edited (JonnyMac) : 3/5/2009 12:48:15 AM GMT
I think Jon meant to say
And you must connect the USB Vss ground pin to your SX ground
regards peter
(Interesting if you do connect the serial ground to VDD then unplug the SX tech board the power led glows half dim.)
Also I finally got it to work at 50 MHX specifying N9600 not T9600, can someone explain why?
Anyways thanks for the help everyone.
I am an ME, and I am just starting up the learning curve with microcontrollers at this level, only ever messed with the BS2 before.
Does anyone know a good line by line tutorial on how to do this.
I have plenty of examples, but for a NEWB i find it hard to follow.
Thanks again
Yes, that's what I meant -- thankfully, the USB2SER doesn't have a Vdd pin!
-- www.parallax.com/Portals/0/Downloads/docs/books/BegAssemforSX.pdf
See chapters 10 & 12
Post Edited (JonnyMac) : 3/6/2009 5:25:27 AM GMT
I thought serial was +/- 15 volts and the ttl voltage was 5 volts.
I am right in quessing that since this is a usb to serial adapter the serial is 5 volts because usb is 5 volts.
·Note: I tried to do two quotes but could not get it to work so I just did a copy and paste.
1) USB2SER -- this is USB to TTL serial
2) USBto232 -- this is USB to RS-232 serial
I may have incorrectly assumed that the original poster was using #1 -- perhaps it was #2. If #1, use True mode and connect the TX pin to the RX input of the SX. If #2 put a 22K resistor (to limit current to a safe level) between TX pin and the RX input and use Inverted input.
Sorry for the misunderstanding on this - you are a great help here.
Pete
www.parallax.com/Store/Accessories/Tools/tabid/162/CategoryID/37/List/0/Level/a/ProductID/32/Default.aspx?SortField=ProductName%2CProductName
At least it worked for 10 minutes last night and hasn't damaged anything yet.
Question on Parallax USB2SER design:
Parallax offers the schematic for this design as a reference for people who want to have a USB interface to their microcontroller. I have the USB2SER device here on my desk (tiny little thing, very sleek design), as well as two documents from Parallax that I downloaded from here:
http://www.parallax.com/Store/Accessories/Tools/tabid/162/CategoryID/37/List/0/Level/a/ProductID/32/Default.aspx?SortField=ProductName,ProductName
Johnny Mac - you said (above) that in order to use this part, we would need to connect the TX from the FT232 to the RX of the SX48 (through the 150 ohm resistor), and the RX from the FT232 to the TX of the SX48 (through another 150 ohm resistor). Can you verify this? The 4 pin connector coming off the USB2SER design consists of an active low RESET, then TX, RX, and VSS. I'm only using the TX and RX pins, and I've connected the VSS to my GND on the SX48. And in software, this FT232 chip wants the serial mode to be TRUE... correct?
I'm allowing my customers to select between serial (RS232) and USB communication, and I want to be sure that I get this guy (FT232) hooked up correctly. Not a huge deal, as they can always be swapped in SW, but I would like to have the design as clean as possible.
And I'm a little hesitant, since I got an updated schematic (Rev for the USB2SER from Parallax that was wrong, and they are aware of it and are cleaning it up... (thanks Joshua!) .... I'm putting this USB capability into my production board, and I want to feel better about the design, since my boss won't be happy about needing to pay for another board spin if it doesnt' work!
Thanks,
Laura (Old_Lady).... Actually I'm 42, so I'm not all THAT old..... just a little bit old.... if there is such a thing.....
When using ANY kind of inverter (MAX232, USB2SER) the software mode will be True. The only time you'll use Inverted is with the 22K resistor trick I just mentioned.l
Thanks for the clarification.
~ Laura