Pure C and Serial (ArduinoUNO)

Hello. I want to use pure C to read and write to the serial port of my computer from an arduino uno.
It appears there used to be libraries for this, but they all seem to be down. I have found partial solutions, but they don't compile or require older libraries from the arduino-core distributed with the IDE (version 00019 actually), but after lots of effort I find these don't work either. Does this one still exist somewhere: http://arduino.cc/forum/index.php/topic,37645.0.html? Or something similar?

(Background: I have a working Win32 virtual machine with Avrdude and AVR-Studio already setup and I can already make an led blink using this method. I am also already able to use serial communication on my computer both on the host OS and on the virtual machine, so that is not an issue. I would like to add serial to a project I have already written in pure C for the uno, and aside from needing serial i/o it works fine. I do NOT want to use the Arduino IDE.)

Thanks!

You can use C style code for accessing the USART ( or USI for some chips ), but if you use gcc you are compiling in C++. Until you are comfortable with low-level use check out the serial class before re-inventing the wheel. The IDE won't make you write bad code, and you can still add the serial class when compiling from non-IDE compiler.

EDIT: download the latest arduino version, you get avr tool set, gcc, IDE, and serial class. ( v 1.0.1 )

Arduino is open source and AFAIK Serial is a derived class of the Print class.

The source for all of that including the SoftwareSerial library should have come with your IDE.

I want to use pure C to read and write to the serial port of my computer from an arduino uno.

Why? C++ is a superset of C, so all the stuff that the HardwareSerial class is doing is ultimately based on C. Peek at the libraries if you really need to re-invent the wheel.

Don't expect your C implementation to be any faster. By the time the compiler gets done, the C++/C distinction is gone.

I didn't say it before, but until processors use C in the microcode we can't program in pure C.

I want to use pure C to read and write to the serial port of my computer from an arduino uno.

Um, go ahead!
Starting with the older Arduino code (HardwareSerial.c) might be helpful, and I'm pretty sure there are lots of examples over on AVRFreaks.
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=48188
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=45341

There is also some example UART code in the stdio demo code included in the AVR libC documenation:
http://www.nongnu.org/avr-libc/user-manual/group__stdiodemo.html

From a larger perspective, if you are not using the Arduino s/w (which it sounds like you aren't)
then the Arduino forums is probably not a good place for getting information/advice.
Head over to the AVRfreaks site: http://www.avrfreaks.net/
for all kinds of good non-Arduino AVR information.

Also, if you are looking at remote controlling AVR i/o from the PC you might want to have a look
at firmata (google around if you aren't familiar with it). That way you put firmata on the AVR and
you can can take control of many of the i/o pin functions from the serial interface.

--- bill