'embeded/AVR (ATmega,ATtiny)'에 해당되는 글 117건

  1. 2023.07.04 ATMEL AT32UC3A 시리즈
  2. 2021.06.28 AVR V-USB (USB HID)
  3. 2017.11.21 avrisp mk2 / avrisp mk2 clone / stk500 clone
  4. 2017.11.21 avr unlock 관련
  5. 2017.11.21 avrdude + usbasp 테스트
  6. 2017.11.18 avrdude 실행 안됨
  7. 2017.11.17 keil bootloader example - avr/atmel
  8. 2017.11.13 avrdude -U 옵션
  9. 2017.11.13 USBasp 설치
  10. 2017.08.11 avr 저전압 감지

독특하게도 Audio Bitstream DAC(ABDAC) 라는 녀석이 장착된 시리즈

 

[링크 : https://ww1.microchip.com/downloads/en/DeviceDoc/doc32058.pdf]

'embeded > AVR (ATmega,ATtiny)' 카테고리의 다른 글

AVR V-USB (USB HID)  (0) 2021.06.28
avrisp mk2 / avrisp mk2 clone / stk500 clone  (0) 2017.11.21
avr unlock 관련  (0) 2017.11.21
avrdude + usbasp 테스트  (0) 2017.11.21
avrdude 실행 안됨  (0) 2017.11.18
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2021. 6. 28. 22:19

attiny2313에 엣지 트리거 핀 하나 이용해서 USB 1.1 구현을 한 듯.

음.. atmega128 등에서는 못쓰는건가?

No UART, timer, input capture unit or other special hardware is required (except one edge triggered interrupt).

 [링크 : https://www.obdev.at/products/vusb/index.html]

 

Previous versions have been tested with IAR 4.10B/W32 and

[링크 : https://github.com/obdev/v-usb/blob/master/Readme.txt]

[링크 : https://github.com/obdev/v-usb]

 

다운로드 해서 보니 ATtny45 ATmega8에 대한 언급은 있는데

압축 파일 자체가 2012 인걸 봐서는.. 오랫동안 유지보수 안된 것 같긴하다..

[링크 : https://www.obdev.at/products/vusb/download.html]

'embeded > AVR (ATmega,ATtiny)' 카테고리의 다른 글

ATMEL AT32UC3A 시리즈  (0) 2023.07.04
avrisp mk2 / avrisp mk2 clone / stk500 clone  (0) 2017.11.21
avr unlock 관련  (0) 2017.11.21
avrdude + usbasp 테스트  (0) 2017.11.21
avrdude 실행 안됨  (0) 2017.11.18
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2017. 11. 21. 16:36

AVRISP mk2 atmel 정품

AVRISP mk2 clone(stm32 사용) 두개 꽂으니 처음보는 창이 뜨는데

어느게 atmel 정품인지 구분할 방법이 없네?


STK500은 1.845MHz가 한계...

(us-technology.co.kr 에서 구매한건데 사이트 사라짐 ㅠㅠ)


AVRISP mk2 ATMEL 정품. 8.0MHz 까지 지원한다.

(근데 16MHz 만 달아서 오버시키는 셈인데 8.0MHz를 어떻게 쓰지 ?)


'embeded > AVR (ATmega,ATtiny)' 카테고리의 다른 글

ATMEL AT32UC3A 시리즈  (0) 2023.07.04
AVR V-USB (USB HID)  (0) 2021.06.28
avr unlock 관련  (0) 2017.11.21
avrdude + usbasp 테스트  (0) 2017.11.21
avrdude 실행 안됨  (0) 2017.11.18
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2017. 11. 21. 14:58

secureAVR 이라는 걸 찾아보라는데 링크가 깨졌고

비슷한 걸로 이런건 보인다.

근데.. CryptoAuthentication은 AES 보안된 EEPROM 일뿐이네..

[링크 : http://www.atmel.com/products/security-ics/default.aspx]

    [링크 : http://www.atmel.com/Images/Atmel-8914-CryptoAuth-ATAES132A-Datasheet.pdf]

    [링크 : http://www.atmel.com/Images/Atmel-8895S-CryptoAuth-ATECC108A-Datasheet-Summary.pdf]

    [링크 : http://www.atmel.com/images/Atmel-8885-CryptoAuth-ATSHA204A-Datasheet.pdf]


TPM이라고 Trusted Platform Module이 AVR RISC 를 채택한 프로세서네..

알고리즘 타입에.. RSA / SHA-1 / SHA-2

[링크 : http://www.atmel.com/Images/Atmel-5295S-TPM-AT97SC3204-LPC-Interface-Datasheet-Summary.pdf]


아무튼.. 아래는 2000년 연구 자료고

2010년 즈음에 조사해도 여전히 뚫린다.. 라는 결론?

[링크 : http://www.cl.cam.ac.uk/~sps32/mcu_lock.html]

    [링크 : http://www.avrfreaks.net/forum/atmega-can-be-unlocked?page=all]


unlock하는 소스와 제품.. ㄷㄷㄷ

[링크 : http://martin-stej.wz.cz/index.php?page_id=avr_unlocker&lang=en]



+

다르게 보면.. 보안칩을 별도로 쓰거나

프로그램 자체를 암호화 하고 그걸 칩에서 복호화 해서 쓰는 걸로

lock bit 등의 효용 자체가 없음이 증명(?)된 걸려나?

'embeded > AVR (ATmega,ATtiny)' 카테고리의 다른 글

AVR V-USB (USB HID)  (0) 2021.06.28
avrisp mk2 / avrisp mk2 clone / stk500 clone  (0) 2017.11.21
avrdude + usbasp 테스트  (0) 2017.11.21
avrdude 실행 안됨  (0) 2017.11.18
keil bootloader example - avr/atmel  (0) 2017.11.17
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2017. 11. 21. 13:37

커맨드 최종버전...

퓨즈 비트를 먼저 셋팅하고 리부팅 하고 나서, 플래시에 데이터를 쓴다~ 라는 설정 (들어있는 비트는 기본값 임)

일단 내가 가진 usbasp는 -B 옵션으로 SCK 변경이 안되서 좀 더 실험을 해봐야 함...

D:\avrdude>avrdude -v -cusbasp -pm64 -Ulfuse:w:0xC1:m -Uhfuse:w:0x99:m -Uefuse:w:0xFF:m -Ulock:w:0x3F:m -E reset && avrdude -v -cusbasp -pm64 -Uflash:w:atmega64.hex:i 



avrdude는 프로그램 종료시 기본으로 reset을 건다는데..

-E exitspec[,…]

By default, AVRDUDE leaves the parallel port in the same state at exit as it has been found at startup. This option modifies the state of the ‘/RESET’ and ‘Vcc’ lines the parallel port is left at, according to the exitspec arguments provided, as follows:


reset

The ‘/RESET’ signal will be left activated at program exit, that is it will be held low, in order to keep the MCU in reset state afterwards. Note in particular that the programming algorithm for the AT90S1200 device mandates that the ‘/RESET’ signal is active before powering up the MCU, so in case an external power supply is used for this MCU type, a previous invocation of AVRDUDE with this option specified is one of the possible ways to guarantee this condition.


noreset

The ‘/RESET’ line will be deactivated at program exit, thus allowing the MCU target program to run while the programming hardware remains connected.


vcc

This option will leave those parallel port pins active (i. e. high) that can be used to supply ‘Vcc’ power to the MCU.


novcc

This option will pull the ‘Vcc’ pins of the parallel port down at program exit.


d_high

This option will leave the 8 data pins on the parallel port active (i. e. high).


d_low

This option will leave the 8 data pins on the parallel port inactive (i. e. low).


Multiple exitspec arguments can be separated with commas. 

[링크 : http://www.nongnu.org/avrdude/user-manual/avrdude_4.html]

[링크 : http://www.avrfreaks.net/forum/avrdude-reset-command[]



atmega64에서 avrdude로 테스트

-p에서 칩을 정해주지 않으면 실행이 되지 않는다.

D:\avrdude>avrdude -patmega64 -cusbasp


avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: error: program enable: target doesn't answer. 1

avrdude: initialization failed, rc=-1

         Double check connections and try again, or use -F to override

         this check.



avrdude done.  Thank you.

D:\avrdude>avrdude -patmega64 -cusbasp


avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: AVR device initialized and ready to accept instructions


Reading | ################################################## | 100% 0.02s


avrdude: Device signature = 0x1e9602 (probably m64)


avrdude: safemode: Fuses OK (E:FF, H:C9, L:FF)


avrdude done.  Thank you.



D:\avrdude>avrdude -patmega64 -v -cusbasp


avrdude: Version 6.3, compiled on Feb 17 2016 at 09:25:53

         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         Copyright (c) 2007-2014 Joerg Wunsch


         System wide configuration file is "D:\avrdude\avrdude.conf"


         Using Port                    : usb

         Using Programmer              : usbasp

         AVR Part                      : ATmega64

         Chip Erase delay              : 9000 us

         PAGEL                         : PD7

         BS2                           : PA0

         RESET disposition             : dedicated

         RETRY pulse                   : SCK

         serial program mode           : yes

         parallel program mode         : yes

         Timeout                       : 200

         StabDelay                     : 100

         CmdexeDelay                   : 25

         SyncLoops                     : 32

         ByteDelay                     : 0

         PollIndex                     : 3

         PollValue                     : 0x53

         Memory Detail                 :


                                  Block Poll               Page                       Polled

           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack

           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------

           eeprom         4    20    64    0 no       2048    8      0  9000  9000 0xff 0xff

           flash         33     6   128    0 yes     65536  256    256  4500  4500 0xff 0xff

           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           calibration    0     0     0    0 no          4    0      0     0     0 0x00 0x00

           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00


         Programmer Type : usbasp

         Description     : USBasp, http://www.fischl.de/usbasp/


avrdude: auto set sck period (because given equals null)

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: error: program enable: target doesn't answer. 1

avrdude: initialization failed, rc=-1

         Double check connections and try again, or use -F to override

         this check.



avrdude done.  Thank you.

D:\avrdude>avrdude -patmega64 -v -cusbasp


avrdude: Version 6.3, compiled on Feb 17 2016 at 09:25:53

         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         Copyright (c) 2007-2014 Joerg Wunsch


         System wide configuration file is "D:\avrdude\avrdude.conf"


         Using Port                    : usb

         Using Programmer              : usbasp

         AVR Part                      : ATmega64

         Chip Erase delay              : 9000 us

         PAGEL                         : PD7

         BS2                           : PA0

         RESET disposition             : dedicated

         RETRY pulse                   : SCK

         serial program mode           : yes

         parallel program mode         : yes

         Timeout                       : 200

         StabDelay                     : 100

         CmdexeDelay                   : 25

         SyncLoops                     : 32

         ByteDelay                     : 0

         PollIndex                     : 3

         PollValue                     : 0x53

         Memory Detail                 :


                                  Block Poll               Page                       Polled

           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack

           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------

           eeprom         4    20    64    0 no       2048    8      0  9000  9000 0xff 0xff

           flash         33     6   128    0 yes     65536  256    256  4500  4500 0xff 0xff

           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           calibration    0     0     0    0 no          4    0      0     0     0 0x00 0x00

           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00


         Programmer Type : usbasp

         Description     : USBasp, http://www.fischl.de/usbasp/


avrdude: auto set sck period (because given equals null)

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: AVR device initialized and ready to accept instructions


Reading | ################################################## | 100% 0.03s


avrdude: Device signature = 0x1e9602 (probably m64)

avrdude: safemode: hfuse reads as C9

avrdude: safemode: efuse reads as FF


avrdude: safemode: hfuse reads as C9

avrdude: safemode: efuse reads as FF

avrdude: safemode: Fuses OK (E:FF, H:C9, L:FF)


avrdude done.  Thank you.


-Ulock:r:-:i 로 lock 비트나 fuse 비트를 읽어서 콘솔로 출력가능 함

D:\avrdude>avrdude -patmega64 -cusbasp -Ulock:r:-:i


avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: AVR device initialized and ready to accept instructions


Reading | ################################################## | 100% 0.03s


avrdude: Device signature = 0x1e9602 (probably m64)

avrdude: reading lock memory:


Reading | ################################################## | 100% 0.02s


avrdude: writing output file "<stdout>"

:010000003FC0

:00000001FF


avrdude: safemode: Fuses OK (E:FF, H:C9, L:FF)


avrdude done.  Thank you. 

[링크 : http://shawnhymel.com/622/quick-tip-reading-fuse-bits-in-an-arduino/]


일단.. -p 옵션의 칩이 다르면 중단한다.(avr studio랑 같네..)

D:\avrdude>avrdude -patmega128 -cusbasp -Ulock:r:-:i


avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: AVR device initialized and ready to accept instructions


Reading | ################################################## | 100% -0.00s


avrdude: Device signature = 0x1e9602 (probably m64)

avrdude: Expected signature for ATmega128 is 1E 97 02

         Double check chip, or use -F to override this check.


avrdude done.  Thank you. 


다 읽는데 35초 정도? 늦게 걸리길래 속도 업해보려고 하니 지원을 하지 않는다고 한다. ㅠㅠ

D:\avrdude>avrdude -patmega64 -cusbasp -Uflash:r:dump.hex:i -B 0.6


avrdude: set SCK frequency to 1500000 Hz

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: AVR device initialized and ready to accept instructions


Reading | ################################################## | 100% 0.03s


avrdude: Device signature = 0x1e9602 (probably m64)

avrdude: reading flash memory:


Reading | ################################################## | 100% 35.25s


avrdude: writing output file "dump.hex"


avrdude: safemode: Fuses OK (E:FF, H:C9, L:FF)


avrdude done.  Thank you. 

D:\avrdude>avrdude -patmega64 -cusbasp -Uflash:r:dump.hex:i -B 2


avrdude: set SCK frequency to 375000 Hz

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: AVR device initialized and ready to accept instructions


Reading | ################################################## | 100% 0.05s


avrdude: Device signature = 0x1e9602 (probably m64)

avrdude: reading flash memory:


Reading | ################################################## | 100% 35.25s


avrdude: writing output file "dump.hex"


avrdude: safemode: Fuses OK (E:FF, H:C9, L:FF)


avrdude done.  Thank you.


일단 펌웨어 업데이트 시도는 해봐야 할 듯...

[링크 : http://tmlgt.blog.me/220332919733]

[링크 : http://blog.lincomatic.com/?p=1480]



+

초기값 셋팅이 atmega4에서 아래와 같이 나오는데

맞는진 확인해 봐야겠지만.. intel HEX 포맷을 기반으로 읽으려니 빡쳐서 hexa로 출력!

avrdude: safemode: Fuses OK (E:FD, H:99, L:E1

D:\avrdude>avrdude -patmega64 -cusbasp  -v -Ulock:r:-:i

avrdude: writing output file "<stdout>"

:010000003FC0

:00000001FF

D:\avrdude>avrdude -patmega64 -cusbasp  -v -Ulock:r:-:h

avrdude: writing output file "<stdout>"

0x3f


그걸 계산기에 때려 넣으니 아래와 같이 나온다.

internal RC 1MHz 이고 Lockbit는 0xFF인데

bit 7/6이 사용 불가인지 0x3F가 실질적인 기본 값인 것으로 보인다.


[링크 : http://eleccelerator.com/fusecalc/fusecalc.php?chip=atmega64]

[링크 : ]http://eleccelerator.com/...?chip=atmega64&LOW=E1&HIGH=99&EXTENDED=FD&LOCKBIT=3F]

'embeded > AVR (ATmega,ATtiny)' 카테고리의 다른 글

avrisp mk2 / avrisp mk2 clone / stk500 clone  (0) 2017.11.21
avr unlock 관련  (0) 2017.11.21
avrdude 실행 안됨  (0) 2017.11.18
keil bootloader example - avr/atmel  (0) 2017.11.17
avrdude -U 옵션  (0) 2017.11.13
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2017. 11. 18. 13:19

저 에러 자체가 win64/win32 호환 문제라는데

64bit 깔린데서 하나는 실행되고 하나는 안되는건

도대체 머가 문제인 거야?



+

2017.11.20


(x64와 x86 연결 문제를 야기하는)xinput.dll이 문제거나, 권한 문제거나

[링크 : http://freewisdoms.com/how-to-fix-0xc000007b-application-error/]

    [링크 : https://www.youtube.com/watch?v=lIvPZjzAi_w]

    [링크 : https://www.youtube.com/watch?v=ZO_Tyjjf8BI]

[링크 : https://stackoverflow.com/questions/10492037/the-application-was-unable-to-start-correctly-0xc000007b]

[링크 : https://forums.sketchup.com/t/windows-7-0xc000007b-error-on-startup/12323/7]

'embeded > AVR (ATmega,ATtiny)' 카테고리의 다른 글

avr unlock 관련  (0) 2017.11.21
avrdude + usbasp 테스트  (0) 2017.11.21
keil bootloader example - avr/atmel  (0) 2017.11.17
avrdude -U 옵션  (0) 2017.11.13
USBasp 설치  (0) 2017.11.13
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2017. 11. 17. 16:03

어느거 기준인진 좀 코드를 분석해 봐야 할 듯?


프로젝트 파일 뜯어 보니

 Device (AT89C51ID2)

 Vendor (Atmel)

크앙... AT89C51 8051계열용이네.. ㅠㅠ


[링크 : http://www.keil.com/download/docs/52.asp]

'embeded > AVR (ATmega,ATtiny)' 카테고리의 다른 글

avrdude + usbasp 테스트  (0) 2017.11.21
avrdude 실행 안됨  (0) 2017.11.18
avrdude -U 옵션  (0) 2017.11.13
USBasp 설치  (0) 2017.11.13
avr 저전압 감지  (0) 2017.08.11
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2017. 11. 13. 16:06

-U 옵션이 무지 복잡해 보이는데

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500 -PCOM6 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m

2016/04/06 - [embeded/arduino(genuino)] - 아두이노 부트로더 굽기?


아래 내용으로 해석을 해보면..

lock / fuse bit(extended/high/low) 를 Write 하고 immediate 모드로 해당 값을 쓰도록 한다 정도?

-Ulock:w:0x3F:m

-Uefuse:w:0x05:m

-Uhfuse:w:0xDA:m

-Ulfuse:w:0xFF:m



-U memtype:op:filename[:format]

Perform a memory operation. Multiple ‘-U’ options can be specified in order to operate on multiple memories on the same command-line invocation. The memtype field specifies the memory type to operate on. Use the ‘-v’ option on the command line or the part command from terminal mode to display all the memory types supported by a particular device. Typically, a device’s memory configuration at least contains the memory types flash and eeprom. All memory types currently known are:


calibration

One or more bytes of RC oscillator calibration data.


eeprom

The EEPROM of the device.


efuse

The extended fuse byte.


flash

The flash ROM of the device.


fuse

The fuse byte in devices that have only a single fuse byte.


hfuse

The high fuse byte.


lfuse

The low fuse byte.


lock

The lock byte.


signature

The three device signature bytes (device ID).


fuseN

The fuse bytes of ATxmega devices, N is an integer number for each fuse supported by the device.


application

The application flash area of ATxmega devices.


apptable

The application table flash area of ATxmega devices.


boot

The boot flash area of ATxmega devices.


prodsig

The production signature (calibration) area of ATxmega devices.


usersig

The user signature area of ATxmega devices.


The op field specifies what operation to perform:


r

read the specified device memory and write to the specified file


w

read the specified file and write it to the specified device memory


v

read the specified device memory and the specified file and perform a verify operation


The filename field indicates the name of the file to read or write. The format field is optional and contains the format of the file to read or write. Possible values are:


i

Intel Hex


s

Motorola S-record


r

raw binary; little-endian byte order, in the case of the flash ROM data


e

ELF (Executable and Linkable Format), the final output file from the linker; currently only accepted as an input file


m

immediate mode; actual byte values specified on the command line, separated by commas or spaces in place of the filename field of the ‘-U’ option. This is useful for programming fuse bytes without having to create a single-byte file or enter terminal mode. If the number specified begins with 0x, it is treated as a hex value. If the number otherwise begins with a leading zero (0) it is treated as octal. Otherwise, the value is treated as decimal.


a

auto detect; valid for input only, and only if the input is not provided at stdin.


d

decimal; this and the following formats are only valid on output. They generate one line of output for the respective memory section, forming a comma-separated list of the values. This can be particularly useful for subsequent processing, like for fuse bit settings.


h

hexadecimal; each value will get the string 0x prepended.


o

octal; each value will get a 0 prepended unless it is less than 8 in which case it gets no prefix.


b

binary; each value will get the string 0b prepended.


The default is to use auto detection for input files, and raw binary format for output files.


Note that if filename contains a colon, the format field is no longer optional since the filename part following the colon would otherwise be misinterpreted as format.


As an abbreviation, the form -U filename is equivalent to specifying -U flash:w:filename:a. This will only work if filename does not have a colon in it. 

[링크 : http://www.nongnu.org/avrdude/user-manual/avrdude_4.html]

[링크 : http://www.ladyada.net/learn/avr/avrdude.html]


생각해보니.. 양산용으로 avrdude를 이용해서

초기에 fuse bit 설정 -> 리부팅 -> 빠른 속도로 굽기 이런식으로 

해두고 옵션파일을 ini에 저장하도록 해서 fuse bit나 mcu 종류별로 관리하도록 하면

편할 거 같은데 avrdude용 gui front end 한번 작성해볼까..

'embeded > AVR (ATmega,ATtiny)' 카테고리의 다른 글

avrdude 실행 안됨  (0) 2017.11.18
keil bootloader example - avr/atmel  (0) 2017.11.17
USBasp 설치  (0) 2017.11.13
avr 저전압 감지  (0) 2017.08.11
avr bod(Brown out Detect)  (0) 2017.08.11
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2017. 11. 13. 14:54

아래 링크에서 zadig를 받아서 실행하면 아래와 같이 뜨는데

[링크 : http://zadig.akeo.ie/] 드라이버


USBasp 를 찾아서 (USB ID 16C0 05DC)

드라이버를 WinUSB 에서 libusbk로 바꾼후 install driver를 하면 된다..(꽤나 삽질했네 -_-)


WinDriver로 깔면 아래와 같이 에러가 발생하면서 장치를 못 찾는다

C:\win32_executable>avrdude -cusbasp -Pusb -pm128 -v


avrdude: Version 6.3, compiled on Feb 17 2016 at 09:25:53

         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         Copyright (c) 2007-2014 Joerg Wunsch


         System wide configuration file is "C:\win32_executable\avrdude.conf"


         Using Port                    : usb

         Using Programmer              : usbasp

avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'


avrdude done.  Thank you.


libusbk로 깔고 나서 해결 -_-

C:\win32_executable>avrdude -cusbasp -Pusb -pm128 -v


avrdude: Version 6.3, compiled on Feb 17 2016 at 09:25:53

         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         Copyright (c) 2007-2014 Joerg Wunsch


         System wide configuration file is "C:\win32_executable\avrdude.conf"


         Using Port                    : usb

         Using Programmer              : usbasp

         AVR Part                      : ATmega128

         Chip Erase delay              : 9000 us

         PAGEL                         : PD7

         BS2                           : PA0

         RESET disposition             : dedicated

         RETRY pulse                   : SCK

         serial program mode           : yes

         parallel program mode         : yes

         Timeout                       : 200

         StabDelay                     : 100

         CmdexeDelay                   : 25

         SyncLoops                     : 32

         ByteDelay                     : 0

         PollIndex                     : 3

         PollValue                     : 0x53

         Memory Detail                 :


                                  Block Poll               Page                       Polled

           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack

           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------

           eeprom         4    12    64    0 no       4096    8      0  9000  9000 0xff 0xff

           flash         33     6   128    0 yes    131072  256    512  4500  4500 0xff 0xff

           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           calibration    0     0     0    0 no          4    0      0     0     0 0x00 0x00

           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00


         Programmer Type : usbasp

         Description     : USBasp, http://www.fischl.de/usbasp/


avrdude: auto set sck period (because given equals null)

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: error: program enable: target doesn't answer. 1

avrdude: initialization failed, rc=-1

         Double check connections and try again, or use -F to override

         this check.



avrdude done.  Thank you.

[링크 : http://www.fischl.de/usbasp/]

[링크 : http://download.savannah.gnu.org/releases/avrdude/] avrdude

[링크 : https://rlogiacco.wordpress.com/2016/09/01/usbasp-windows-10/]

'embeded > AVR (ATmega,ATtiny)' 카테고리의 다른 글

keil bootloader example - avr/atmel  (0) 2017.11.17
avrdude -U 옵션  (0) 2017.11.13
avr 저전압 감지  (0) 2017.08.11
avr bod(Brown out Detect)  (0) 2017.08.11
avr pwm 관련  (0) 2017.04.19
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2017. 8. 11. 18:58

mcp6002 opamp를 이용

일종의 comparator로 사용하여 gpio 입력으로 받아 감지

[링크 : http://blog.naver.com/ivy1379/220504291815]


생각해보면

gpio 히스테리시스 값 이하로 떨어지면 0이 되니

저항이나 다이오드로 전압 강하하고 gpio에 넣어서

0으로 떨어지는 순간 탐지하거나

다이오드 직렬 연결해서 단계별로 경고 셧다운 시키는 것도 방법일듯


stm32

[링크 : http://www.st.com/.../reset-and-supervisor-ics/resets-and-voltage-detectors/stm1061.html]

'embeded > AVR (ATmega,ATtiny)' 카테고리의 다른 글

avrdude -U 옵션  (0) 2017.11.13
USBasp 설치  (0) 2017.11.13
avr bod(Brown out Detect)  (0) 2017.08.11
avr pwm 관련  (0) 2017.04.19
IAR AVR은 start section 설정이 안되나?  (0) 2017.02.17
Posted by 구차니