Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

C programming

C programming

2006-01-28 by pinky elodia

hi....
i'm looking for sample programming in C.......for ATMEL
i hve a sample on ADC (in C) but couldn't properly understand...
if i dont use portF(ADC port) as input, i can use as normal ouput, right?
i hve try, but fail...........
are they book in C for Programming microcontroller...as i see ordinary C book don't tell us about how to write program for uC....


What are the most popular cars? Find out at Yahoo! Autos

Re: [AVR-Chat] C programming

2006-01-28 by Shawn Wilton

It took me less time to do a search on amazon for "c programming atmel" to return these results: < http://www.amazon.com/exec/obidos/search-handle-url/ref=br_ss_hs/104-5094045-9203924?platform=gurupa&url=index%3Dblended&field-keywords=c+programming+atmel&Go.x=0&Go.y=0&Go=Go>
than it did for me to write this reply. :-)

Give a man a fish and he feeds for a day, teach a man to fish...

-Shawn


On 1/28/06, pinky elodia < sima_zafrani@yahoo.com> wrote:
hi....
i'm looking for sample programming in C.......for ATMEL
i hve a sample on ADC (in C) but couldn't properly understand...
if i dont use portF(ADC port) as input, i can use as normal ouput, right?
i hve try, but fail...........
are they book in C for Programming microcontroller...as i see ordinary C book don't tell us about how to write program for uC....


What are the most popular cars? Find out at Yahoo! Autos
YAHOO! GROUPS LINKS





--


Shawn Wilton (b9 Systems)
http://black9.com

Re: [AVR-Chat] C programming

2006-01-28 by David Kelly

On Jan 28, 2006, at 3:30 AM, pinky elodia wrote:

> hi....
> i'm looking for sample programming in C.......for ATMEL
> i hve a sample on ADC (in C) but couldn't properly understand...
> if i dont use portF(ADC port) as input, i can use as normal ouput,  
> right?
> i hve try, but fail...........
> are they book in C for Programming microcontroller...as i see  
> ordinary C book don't tell us about how to write program for uC....

The problem is that first you need to understand C. And also at the  
same time you need to understand the target (AVR) you are coding for.  
Then 2nd you can put the C and AVR together.

Using the ADC and/or port pins is not a C problem but an AVR problem.  
The Atmel datasheet for your particular AVR will tell you how the  
port behaves and may be controlled. Then its up to you to do what the  
chip needs, either in assembly or in C, or whatever, your choice.

--
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.