Top Banner
AVR
16

AVR - dl.melec.irdl.melec.ir/download/pdf/AVR/CodeVision-Fusebit[Melec.ir].pdf · AVR AVR AVR AVR 01 CodeVision CKSEL3..0 Device Clocking Option CKSEL3..0 External Crystal/Ceramic

Jun 05, 2019

Download

Documents

dangdan
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: AVR - dl.melec.irdl.melec.ir/download/pdf/AVR/CodeVision-Fusebit[Melec.ir].pdf · AVR AVR AVR AVR 01 CodeVision CKSEL3..0 Device Clocking Option CKSEL3..0 External Crystal/Ceramic

AVR

Page 2: AVR - dl.melec.irdl.melec.ir/download/pdf/AVR/CodeVision-Fusebit[Melec.ir].pdf · AVR AVR AVR AVR 01 CodeVision CKSEL3..0 Device Clocking Option CKSEL3..0 External Crystal/Ceramic

AVR

Codevision AVR

Codevision

Page 3: AVR - dl.melec.irdl.melec.ir/download/pdf/AVR/CodeVision-Fusebit[Melec.ir].pdf · AVR AVR AVR AVR 01 CodeVision CKSEL3..0 Device Clocking Option CKSEL3..0 External Crystal/Ceramic

CodeVision AVR File New

WindowsNew

NewProject

Codewizard

Yes

Codewizard

LCDSPIADC

(IN)(OUT)INOUT

IN

TTri-statePPull up

OUT1

0Pull up

Page 4: AVR - dl.melec.irdl.melec.ir/download/pdf/AVR/CodeVision-Fusebit[Melec.ir].pdf · AVR AVR AVR AVR 01 CodeVision CKSEL3..0 Device Clocking Option CKSEL3..0 External Crystal/Ceramic

CodewizardFileCodewizard

Generate,Save and Exit

Save

C Compiler files(*.c)

Project files(*.prj)

CodewizardAVR project files(*.cwp)

Codewizard AVR

(Comment)

//Place your code here

EROREROR

Stack

ERORWarning

Page 5: AVR - dl.melec.irdl.melec.ir/download/pdf/AVR/CodeVision-Fusebit[Melec.ir].pdf · AVR AVR AVR AVR 01 CodeVision CKSEL3..0 Device Clocking Option CKSEL3..0 External Crystal/Ceramic

SettingProgrammer

STK200+/300STK500/AVRISP

Page 6: AVR - dl.melec.irdl.melec.ir/download/pdf/AVR/CodeVision-Fusebit[Melec.ir].pdf · AVR AVR AVR AVR 01 CodeVision CKSEL3..0 Device Clocking Option CKSEL3..0 External Crystal/Ceramic

OKProgrammer setting

ToolsChip programmer

(Codewizard)

Page 7: AVR - dl.melec.irdl.melec.ir/download/pdf/AVR/CodeVision-Fusebit[Melec.ir].pdf · AVR AVR AVR AVR 01 CodeVision CKSEL3..0 Device Clocking Option CKSEL3..0 External Crystal/Ceramic

FileEditProgram

ProgramErase chip

WWW.KAMANGARI.BLOGFA.COM

FileLoad flash

Codevision

Page 8: AVR - dl.melec.irdl.melec.ir/download/pdf/AVR/CodeVision-Fusebit[Melec.ir].pdf · AVR AVR AVR AVR 01 CodeVision CKSEL3..0 Device Clocking Option CKSEL3..0 External Crystal/Ceramic

ProgramFlash

WWW.KAMANGARI.BLOGFA.COM

ERORNO

EROR

Chip Programmer

WWW.KAMANGARI.BLOGFA.COM

Page 9: AVR - dl.melec.irdl.melec.ir/download/pdf/AVR/CodeVision-Fusebit[Melec.ir].pdf · AVR AVR AVR AVR 01 CodeVision CKSEL3..0 Device Clocking Option CKSEL3..0 External Crystal/Ceramic

WWW.KAMANGARI.BLOGFA.COM

Page 10: AVR - dl.melec.irdl.melec.ir/download/pdf/AVR/CodeVision-Fusebit[Melec.ir].pdf · AVR AVR AVR AVR 01 CodeVision CKSEL3..0 Device Clocking Option CKSEL3..0 External Crystal/Ceramic

WWW.KAMANGARI.BLOGFA.COM

Page 11: AVR - dl.melec.irdl.melec.ir/download/pdf/AVR/CodeVision-Fusebit[Melec.ir].pdf · AVR AVR AVR AVR 01 CodeVision CKSEL3..0 Device Clocking Option CKSEL3..0 External Crystal/Ceramic

WWW.KAMANGARI.BLOGFA.COM

Flash

AVR

Page 12: AVR - dl.melec.irdl.melec.ir/download/pdf/AVR/CodeVision-Fusebit[Melec.ir].pdf · AVR AVR AVR AVR 01 CodeVision CKSEL3..0 Device Clocking Option CKSEL3..0 External Crystal/Ceramic

CKSEL0..3 EESAVE STU DWEN

BODEN JTAGEN RSTDISBL M103C BODLEVEL OCDEN WDTON M161C BOOTRST SPIEN CKDIV8 S8535C BOOTSZ0 CKOPT CKOUT S8515C BOOTSZ1 SUT0..1 SELFPRGEN

EraseFlash)(Erase chip

(Lock bit)Erase

AVR

AVR

AVR

AVR

0 1

CodeVision

CKSEL3..0

CKSEL3..0 Device Clocking Option 1111-1010 External Crystal/Ceramic Resonator

1001 External Low-frequency Crystal1000-0101 External RC Oscillator 0100-0001 Calibrated Internal RC Oscillator

0000 External Clock

WWW.KAMANGARI.BLOGFA.COM

Page 13: AVR - dl.melec.irdl.melec.ir/download/pdf/AVR/CodeVision-Fusebit[Melec.ir].pdf · AVR AVR AVR AVR 01 CodeVision CKSEL3..0 Device Clocking Option CKSEL3..0 External Crystal/Ceramic

1 MHZ

CKSEL3..2

STK200+/300

AVR

BODEN

BROWN-OUT (Reset)

AVRBROWN-OUT

AVR(VCC)

(VBOT)VCC(VBOT+)

Time Out

RESETBROWN-

OUTBODEN

BODLEVEL

VCC

RESET

RESET

ATMEGA2560BODLEVEL0..3

BOOTRST

RESET

BOOTSZ0 & BOOTSZ1

BOOT

FLASHBOOT

AVR

Page 14: AVR - dl.melec.irdl.melec.ir/download/pdf/AVR/CodeVision-Fusebit[Melec.ir].pdf · AVR AVR AVR AVR 01 CodeVision CKSEL3..0 Device Clocking Option CKSEL3..0 External Crystal/Ceramic

BOOT LOADERBOOT

USARTSPI2WIRE

EESAVE

ERASEEEPROM

JTAGEN

JTAG

JTAGI/O

JTAGJoin Test Access Group

IEEE 1149.1

FlashEEPROM

RAM

FlashEEPROM

AVR(BREAK)

CI/OJTAG

TMSTCK TDITDOATMEGA16ATMEGA32

JTAG

LCDI/O

OCDEN

(OCDEN=0)JTAGEN

SPIEN

SPI

WWW.KAMANGARI.BLOGFA.COM

Page 15: AVR - dl.melec.irdl.melec.ir/download/pdf/AVR/CodeVision-Fusebit[Melec.ir].pdf · AVR AVR AVR AVR 01 CodeVision CKSEL3..0 Device Clocking Option CKSEL3..0 External Crystal/Ceramic

CKOPT

CKOPT

XTAL2

CKOPT

XTAL2

CKOPT

16MHZ8MHZ

C1C2

Recommended Range for c1 & c2

Frequency Range (MHZ)

CKSEL3..1 CKOPT

_ 0.9 0.4 101 1

12 22 0.9 3.0 110 1 12 22 0.3 8.0 1111 12 22 1.0 101,110,111 0

SUT0..1

Start UpSTU

RSTDISBL

Reset

ISPIn System Programming

WDTON

WWW.KAMANGARI.BLOGFA.COM

Page 16: AVR - dl.melec.irdl.melec.ir/download/pdf/AVR/CodeVision-Fusebit[Melec.ir].pdf · AVR AVR AVR AVR 01 CodeVision CKSEL3..0 Device Clocking Option CKSEL3..0 External Crystal/Ceramic

CKDIV8

ATMEGA 162

CKOUT

ATMEGA 162

PORTB.0

SELFPRGEN

ATMEGA 48/88/168

BOOT

DWEN

M103C

ATMEGA 103

ATMEGA 103

M161CS8535CS8515C

M103C

ATMEGA 16 AT90S8535AT90S8515

[email protected]

WWW.KAMANGARI.BLOGFA.COM

WWW.IR-MICRO.COM