Go to Post I think overcoming obstacles together builds a stronger team. - MissInformation [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-11-2011, 16:35
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
free C compiler for Windows


Hello C gurus.

Do you know if there's a free C compiler for Windows XP which has support for RS232 access, and has a sleep() function which blocks waiting (as opposed to busy waiting).


  #2   Spotlight this post!  
Unread 26-11-2011, 18:24
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: free C compiler for Windows

Not quite what you are looking for, but pyserial for python can toggle the RTS pin, if that is what you are still trying to do.
  #3   Spotlight this post!  
Unread 26-11-2011, 18:58
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: free C compiler for Windows

Quote:
Originally Posted by EricVanWyk View Post
Not quite what you are looking for, but pyserial for python can toggle the RTS pin, if that is what you are still trying to do.
Thanks.

It's not just toggling the RTS pin that I'm after. I know how to do that.

I've written countless interrupt-driven RS232 comm test equipment apps, mostly in assembly, for older machines running DOS (where you can diddle directly with the hardware). Many of them run fine from a windows command prompt.

What I want to do is write a small 32-bit windows app that looks something like this:

void main(void){

while(1) do{
SetRTS();
sleep(10);
ClearRTS();
sleep(10);
}

}

... where the sleep() function is blocked waiting, not spinning.

I want to slap a scope on the RTS pin and watch it while I play around with Windows to see what it does to the signal under various conditions.

I'm thinking this would be a visually captivating show-and-tell for students just learning about realtime issues and concurrent processing.



  #4   Spotlight this post!  
Unread 26-11-2011, 22:11
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: free C compiler for Windows

The Windows API for serial communication has a function (EscapeCommFunction) which can be requested to clear or set RTS state.

http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx

Thus, any compiler which links to the Windows API can use it.....

I've used the VC++ compiler before (on windows), and Cygwin when building from my Linux machine. VC++ Express and Cygwin are both free. winapi also has a Sleep() function. The MSDN page on Sleep() has more information.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #5   Spotlight this post!  
Unread 26-11-2011, 22:21
plnyyanks's Avatar
plnyyanks plnyyanks is offline
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,114
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
Re: free C compiler for Windows

Quote:
Originally Posted by apalrd View Post
The MSDN page on Sleep() has more information.
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx

When I program C(++) on Windows, I use either Bloodshed Dev-C++ or VSC++. Both support the winapi and both are free.
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
  #6   Spotlight this post!  
Unread 26-11-2011, 23:11
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: free C compiler for Windows


@apalrd,plnyyanks: Thanks guys. This appears to be what I'm looking for.


  #7   Spotlight this post!  
Unread 27-11-2011, 11:26
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
Re: free C compiler for Windows

I would recommend MinGW, Minimalist GNU for Windows, http://www.mingw.org/.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 18:50.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi