delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2005/10/14/20:01:15

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: AndrewC <andspamtrap AT exemail DOT doty DOT com DOT au>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: reading from com1: => driving me nuts
Date: Sat, 15 Oct 2005 09:47:05 +1000
Message-ID: <55g0l1loonul6cqq14k5svi8lr72g67es1@4ax.com>
References: <1h4c4cp.1b942cr1g5grtnN%muellernick AT gmx DOT de>
X-Newsreader: Forte Agent 3.0/32.763
MIME-Version: 1.0
Lines: 53
NNTP-Posting-Host: 220.233.169.234
X-Trace: 1129333621 un-2park-reader-01.sydney.pipenetworks.com.au 13316 220.233.169.234:2222
X-Complaints-To: Abuse, including message IDs to abuse AT pipenetworks DOT com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

>I hope, this subject isn't OT here.
No it is not.
>I've been fiddling around for a hole day now, but can't get it working:
I would expect that based on the code below you would be fidling
forever.
>
>I want a serial communication with a uC. The Baud-rate is 115200, 8 bit,
>1 stop bit, no parity. I've tested the communication with a
>terminal-program (on the same machine) and that works. I also checked
>the timing with a scope, and it's OK to.
No problem with this.  I have done this with a M16C based uC board.

>So now I want to establish a communication from within my C-program
>(using djgpp, of course). I do the following:

.... SNIP....
>What am I doing wrong?
Assuming that you are a embedded C programmer didn't it strike you are
strange that you can't read or write to the uart registers? If you
can't access them then have a think about the API/library you are
using as it may not give you the control you need to talk to an SBC.

I would advise the following:-
	1) Have a look at PMCOMM and DZCOMM. I use an unreleased
version on PMCOMM which has a small number of bug fixes over the 1.1
release.
	2) Decide if you need wakeup mode in the future and if so then
you will need to use PMCOMM.
	3) If you need to go cross platfrom then DZCOMM is the go.
	4) If PMCOMM or DZCOMM are to complex then have a look in the
V2TK directory on the DJPP mirrors by looking at the index (or
somename like that from memory) and check out the other comms
libraries, but some of them do not have all of the features of PMCOMM
or DZCOMM.

If you want the full source code to a sniffer I wrote using DJGPP a
long time ago then please respond to this posting or modify the
respond to email.


If you do want to use Windows and program a windows based app then
grab the following serial comms library, but with this you will need
to use MSVC++
	http://home.ict.nl/~ramklein/Projects/Serial.html

Hope this helps.


Andrew
	



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019