NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Everything Else » Questions about winAVR
January 31, 2013 by Q |
I'm new to programming and am a little confused about the winAVR environment. Is it made specifically for microcontrollers or can I run normal C programs on it (such as printing the famed "Hello World" on a console of some kind). Also, I was wondering about Makefiles. I understand the theory behind them, but where would I write one if I wanted to write one myself. I have tried searching the web for answers, but was unsuccessful. I would greatly appreciate it if someone could shed some light on the subject. |
---|---|
January 31, 2013 by pcbolt |
Hi Q - The winAVR compilers are written specifically for MCU's (microcontroller) but you can write C programs for them "almost" the same as normal C programs. Since you are working on a platform that has no operating system, the concept of writing to a console or reading from a file do not have the same meaning. You can write a program that prints "Hello World" to an LCD wired to the MCU or to a serial port on a PC which then prints to the console. You get to use most of the standard C library functions (math, string formatting, printf etc) so it is no too much of a stretch from normal C. The Users Manual is a good place to poke around when you get stuck, and of course the datasheets for the MCU are a must. Makefiles are just text files with a few quirks to them. Some of the formatting MUST use tabs as beginning of lines and not spaces so some text editors do not do a good job when cutting and pasting (Notepad is not usually a good choice). A really good reference for Make files is HERE. |
February 01, 2013 by Q |
OK, thanks. |
June 13, 2013 by bnjleo |
ok, I have my microcontroller all hooked-up and ready to go. but I don't know how to start the programming. I don't know how to use the software. anyone can help me? |
June 13, 2013 by sask55 |
bnjleo Have you gone through the detailed inductions fund in The NerdKits Guide? If you are having some problem with any part of those instructions you can ask a much more specific question detailing where you are having trouble. I am certain you will get all the help you may require regarding getting started from this forum. Just ask a specific question. |
June 25, 2013 by Q |
Do you mean how to write a computer program in general, or how to load a program onto the chip, or both? |
Please log in to post a reply.
Did you know that the microcontroller's crystal oscillator can be used to keep accurate time? Learn more...
|