Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

need ATMEGA16 C code example

Status
Not open for further replies.

Bjorn

Newbie level 4
Joined
Jul 29, 2005
Messages
7
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,314
atmega16 interrupt example

Atmel is quite good with datasheets and you will find examples for most common use in the datasheet.
 

micro4000

Newbie level 4
Joined
Sep 23, 2007
Messages
7
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,316
atmega c code

hi
which compiler you use?
i use code vision
if you use that tell me to i send for you some simple example
 

hbaocr

Full Member level 4
Joined
May 13, 2007
Messages
235
Helped
25
Reputation
48
Reaction score
5
Trophy points
1,298
Location
Hochiminh City university of technology (VietNam)
Activity points
2,777
atmega16 code examples

thank , micro4000
can you send me example code for available ADC (10bit) and Analog comparator on uC, some code about TWI(I2C bus) ,and SPI , Jtag ...etc..

Added after 1 hours 14 minutes:

hello all friends
I'm using ATMega16.and I have met some problem!
how can I choose internal RC osc by selecting CKSEL3..0 , I can't find which register name the same it i can program it by C (Win_AVr)
 

Bjorn

Newbie level 4
Joined
Jul 29, 2005
Messages
7
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,314
atmega16 c

I realy don´t know how to do fusebits changes i the code, i dont think it possible. I use ponyprog or some other flash software (AVRStudio would work to).

Also avrdude(included with winavr, and probably the one u are using?) can handle fuses see LINK
 

Eugen_E

Full Member level 6
Joined
Nov 29, 2004
Messages
382
Helped
44
Reputation
86
Reaction score
11
Trophy points
1,298
Location
Romania
Activity points
2,840
atmega16 adc example

You can't change the clock source in software (at runtime), by writing a register.

The way to select a clock source is by programing the fuses in the programing software acording to the datasheet. I use Pony Prog, which has the option for fuse read/ fuse write. Set the CKSEL bits in - Write Security and Configuration Bits. Be careful not to block the device programming by the security bits.

www.lancos.com/e2p/ponyprog2000.html#s2.2.2

You can generate *.hex file from WinAVR - makefile and use any programmer you have.
 

micro4000

Newbie level 4
Joined
Sep 23, 2007
Messages
7
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,316
code for atmega16

hi
i'll send for you some simple example
but till then you can use the help of code vision
that is the best book and example that i use that avrytime i need help
try that plz
i am sure you wont be sorry about that√√√
 

aupa

Member level 3
Joined
Feb 22, 2007
Messages
60
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,288
Activity points
1,526
atmega16 coding

i recommend you to download codevisionAVR because it has a codewizard that help's you configuring the pins, timers, interrupts,...

this program its usefull for begginers
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top