SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By maokh
#21478
I am trying to interface a DOSonCHIP to the RS232 level shifter. I am powering the device and the level shifter at 3.7VDC from an Li+ and I am able to get the level shifter TX LED to flicker when i type. However, I am unable to obtain any response from the device.

I have VCC and GND connected up, as well as TX and RX on the UART interface lines tied to the level shifter. the MODE's are floating as it says to do this if its in UART mode. I noticed that there are some hardware flow control lines on the device.

I have tried to directly interface the hardware flow control lines directly to my PC's serial interface as they are "5VDC tolerant", but it does not seem to work.

I suspect that either the module is defective, or perhaps the 3VDC level for the hardware handshake is too low for it to send the data from the DOSonCHIP to my PC.

Any ideas?
By KamPutty
#21520
Have you tried just connecting a rs232 cable to the unit and going to hyperterminal (assuming windows)?

Also, what baud rate, you need to hit <cr>2 times for it to auto set the baudrate...

Also, 3.6 max vcc

~Kam (^8*
By KamPutty
#21531
Speaking of the DOSonCHIP module, has anyone done any spi to it? The spec they provide is anything but helpful!

~Kam (^8*
By maokh
#21564
KamPutty wrote:Have you tried just connecting a rs232 cable to the unit and going to hyperterminal (assuming windows)?

Also, what baud rate, you need to hit <cr>2 times for it to auto set the baudrate...

Also, 3.6 max vcc

~Kam (^8*
I think I only tried it with the level shifter. I will try directly connecting to it.

Oh, and i agree.....what spec sheet? I had to look up the datasheet for the chip they are using, but its limited in usefulness.
By KamPutty
#21611
Well, I'm nearly 100% done with the DOSonCHIP product. After spending 2 days (wasted I may add) I still cannot get it to communicate correctly via SPI. I've emailed the company 2 times for answers (eg. timing!) and still no return email etc.

I may have to return the product since it does not work.

Lets see what happens in the next few days! BLA!

~Kam (^8*
User avatar
By sparky
#21631
Hi Kam,

I've used the DOSonCHIP IC with great success. But it was a painful start. I recommend the simple RS232->UART test to get the unit up and running. Be sure to tie CTS ground. Hit enter twice and you should see the '>' prompt.

-Nathan
By KamPutty
#21632
but but but!!! I want spi!!! :o

I'n not worried about the commands, its the interface! BLA! :x

:D ~Kam :D
By Cannibal
#21725
Hi maokh,

something that just caught my eye in your post is that you're thinking of connecting 5v tolerant handshaking IO's to the Serial cable of a PC.

The voltage range for RS232 is +/- 9->13V, so you will probably want a level converter!
By maokh
#21939
I guess it really depends on the PC hardware you are using. Some laptops (like the one i am using) operate at a lower voltage (5V)
By Cannibal
#22005
Good point,

But I still reccomend taking a scope and checking what the true output levels are, since the true EIA232 spec has negative as well as positive swing, and a 5v tolerant IO may not take -5v or even -0.5v too well.

see http://www.camiresearch.com/Data_Com_Basics/image28.gif

If your laptop violates the rs232 spec by going 0->5 you should be ok.
By brennen
#22007
Quoth sparky on the page for Sparkfun's 232 level shifter board(http://www.sparkfun.com/commerce/produc ... cts_id=133):
Almost all current computers (<5yrs old) utilize a serial port based on the EIA-232 standard which operates from 0-5V rather than the RS232 standard of +/-12V.
As you mentioned, I do remember something about EIA-232 going negative, too. The quote may be a little suspect, and I'm no 232 expert, so YMMV.
By Cannibal
#22046
The EIA232 standard uses negative, bipolar logic in which a negative voltage signal represents logic '1', and
positive voltage represents logic '0'.
A tutorial covering the whole specification, and covering the renaming of RS232 to EIA232 is given here:

http://www.engr.uvic.ca/~auv/resources/ ... andard.pdf

I'm going to repeat my warning again for the following reasons:

1) Anything that uses a MAX232, MAX3232, or other similar serial level conversion chipsets will produce a voltage of around +/- 10->14v

for example, the TI MAX3232 data sheet http://focus.ti.com/lit/ds/symlink/max3232.pdf

Also note, some models can source enough current, and maintain +/-9v that they can be used as makeshift op-amp dual rail power supply (with additional filtering). In turn this means they may be able to source enough current to harm protection diodes and kill a pin on a micro.

Two of the devices on my desk right now use 232 driver chips (fpga board and pic dev board) that fall into this category.

Please either use a level converter just in case your pc, laptop, USB<->serial cable, or other device actually followed the spec, or check the levels with a scope to eliminate guesswork.

Sparkfun sells a level shifter for 10 bucks that makes good insurance for any project.

good luck
By maokh
#22494
Okay, after tieing CTS to ground, i am able to fake out the flow control so i can connect to it via level shifter.

I am able to go around the SD card and perform various functions, although, i am unable to actually write something to a file:
>i
2098-01-01 00:00 0 TEST.TXT
2098-01-01 00:00 0 TEST2.TXT

>ow TEST3.TXT
1
>w #1 "test"

>q #1

>i
2098-01-01 00:00 0 TEST.TXT
2098-01-01 00:00 0 TEST2.TXT
2098-01-01 00:00 0 TEST3.TXT
all files are blank..

i have also tried: w #1 4 "test"

can someone here paste in an example of writing text to a file? im sure im just messing up the syntax somehow.

Also:
>v
c10 b0101 f0102
this verison has some funny bugs ... like, if you set the date, it likes to add a "1" to the day value.

I am currently using the new sparkfun module that just came out, btw.
By saipan59
#22499
I don't actually have one of these, but I asked a question to the DOSonChip folks the other day, and my understanding of the syntax for writing was this:

>w #1 4<cr>
"test"

The quotes are sent by the chip, not by you:
The first quote means "I'm ready to receive data from you", and the 2nd quote means "I have received the 4 bytes that you told me you would send". You can send up to 2 GB of data (supposedly) in this fashion.

This type of syntax is required so that you can send *binary* data, or multiple lines of ASCII data at the same time. For example, you might want to send:

>w #1 15<cr>
"This<cr>is<cr>a<cr>test<cr>"

The DOSonChip guy(s) needs to spend just a few hours improving the "User's Guide" to explain stuff like this, and to give a series of realistic examples.
I'm not planning to buy one because it is too poorly supported at this time. The "uALFAT" looks like a better choice right now, so I may get one of those...

Pete
By maokh
#22522
I'll have to check out that other solution ... i guess right now i am somewhat locked into this platform -- at least for this project. Thanks very much for this very valuable information. Not only is the documentation incomplete, but its almost misleading! I litterally was throwing every command I could think of for about an hour or so. The sucker wants file names and paths in all caps too.

I have been putting the DOSonChip to sleep with the 'z' command, and watched the standby current draw drop from about 5mA to something barely measurable in the uA's. I have been waking it up by grounding the RESET pin...is this the only way to pull the sucker out of sleep mode? I dont want to needlessly eat up a GPIO line for nothing.

Oh, and a word of warning. The DOSonChip has an unusual amount of current draw (somewhere around 15mA) on power up while its waiting to autobaud on the <CR><CR>. After you send it this, it drops down to its 5mA average draw.

I'd suggest anyone using this chip/module in their designs to immediately send it <CR><CR> and/or put it to sleep (z) if they want to save the most power possible.