RS232 between PC and embedded MPU

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
What is the best method to have a PC and embedded MPU communicate with
RS232? I have a HC08 that doesn't have SCI, so it would all have to be in
software. There are probably ROM routines that would help but I haven't been
able to find any documentation on them. This seems like it should be a "cut
and paste" job. Maybe I have to code it myself.

On the PC side I was thinking of using Visual Basic, thinking that would be
the easiest.

I already have the IDE up and running - so I don't need it for debug, or
programming. I am trying to get a stand-alone data collection project
running with an embedded MPU and a PC. The PC would receive the data, save,
and graph it.

Does anyone have any experience in this? Thanks.



Re: RS232 between PC and embedded MPU
I don't know much about software UARTs. You could try a hardware UART
on the SPI bus.  The external UART will require an appropriate crystal
to generate the clock signal.

-- Arya


Re: RS232 between PC and embedded MPU

Quoted text here. Click to load it
I have absolutely no experience in the HC08 but plenty in Google. This link
seems to cover what you want.
http://www.hc08.cz/attachments/uart.pdf

Peter



Re: RS232 between PC and embedded MPU
Quoted text here. Click to load it
Java is pretty easy, just download the javas.comm package from sun. Its a
sinch to use java and RS232 interface.
--

Wing Wong.
Webpage: http://wing.ucc.asn.au

Re: RS232 between PC and embedded MPU

Quoted text here. Click to load it
with
be in
haven't been
a "cut
Quoted text here. Click to load it
would be
or

save,

Have you looked at HyperTerminal?  It's already on the
PC and has proven adaptable for creating data files of
the sort you seem to be describing for many of the simple
test beds I've set up.

Regards,
Ken Asbury


Re: RS232 between PC and embedded MPU

Quoted text here. Click to load it

there are some appnotes describing different approaches, e.g. using a
hardware timer (interrupt).

[...]

Quoted text here. Click to load it

VB doesn't support the serial interface nicely, but you can use rsapi
from Berndt and Kainka.

If you want to do it in "plain C" and Win32, there will be soon a
simple but powerful open source solution ("serialapi") in sf.net.

Contact Andi Martin or me if you need it earlier.

Oliver
--
Oliver Betz, Muenchen (oliverbetz.de)

Re: RS232 between PC and embedded MPU

Quoted text here. Click to load it

Using a serial port in Python is dead simple using the pyserial
module. If you want to get fancy, it's not all that hard to use
the native Win32 File API so you can do async stuff.

--
Grant Edwards                   grante             Yow!  I'm rated PG-34!!
                                  at              
We've slightly trimmed the long signature. Click to see the full one.
Re: RS232 between PC and embedded MPU
Quoted text here. Click to load it

If this is roll-your-own then the easiest is to drop windows and run under DOS
-- boot dos, not the dos-box in windows, though the dos-box did work on Windows
95.

Next is non-visual C and a communications library.

I have never tried doing data logging / instrument control with Visual-xx or
NET,
so maybe that is, after all is said and done, the best choice.

--
Nicholas O. Lindan, Cleveland, Ohio
Consulting Engineer:  Electronics; Informatics; Photonics.
We've slightly trimmed the long signature. Click to see the full one.
Re: RS232 between PC and embedded MPU

Quoted text here. Click to load it
be
DOS
Windows
or

Heck, you can run just fine in a DOS box under Win95, Win98, and Win2k.
I've
done it without problems on all of these.  Use an interrupt handler under
Win9x,
and just poll under Win2k.  Win2k handles the I/O to the port, and supplies
buffering,
so you don't need to do it for that OS.  If you want to, you can sort of
detect the
OS running from DOS, by using some Win9x int calls.  Alas, Win2k detects as
if
Windows is not running, but once you know that it's not a problem.

Hope this helps,

Mike Anton



Re: RS232 between PC and embedded MPU
On the PC side, if you want VB or VBA/Excel code, drop me a line. I
have two examples that I can send you. One is VB6, the other is Excel
with VBA. Both  use the MSComm control.  I've used both of these for
what you are interested in doing.  

Sorry can't help you with the HC08, but code should be available
searching google. I've done bit-banging on the PIC.  Select a UART to
handle the voltage adjustments.  Make sure you put a jmp on the board
so you can loopback the UART. This makes it easy to test using an
"echo" type test with the jumper in place across RX/TX.  If you are
using "C", implement it in "C", then extract the assembler and hand
code it to get the timing right.

snipped-for-privacy@yahoo.com
Indianapolis, IN USA

wrote:
Quoted text here. Click to load it


Site Timeline