집에 굴러 다니고 있던 저렴한 IR 수광/발광부 녀석들
ATtiny2313의 성공에 힘입어 해보겠어! 했는데 으앙 쥬금 ㅋㅋ

[링크 : http://www.eleparts.co.kr/EPX33JXU] EL-23G 발광
[링크 : http://www.eleparts.co.kr/EPX33JXR] ST-23G 수광



아무튼, IR이니 입력되는 IR이 있으면 5V로 나오려나 하고 해봤는데 안되서
기본 회로를 찾아보니 kodenshi의 ST-23G 회로도가 나온다.


[링크: http://www.kodenshi.co.kr/download/DB/1-3/ST23G.PDF]

아무튼 저런 느낌(!)으로 대충 연결해서 테스터기에 mA 단위로 측정이 안되서 낮춰보니 0.7uA...


가리면 전류가 흐르지 않아서 Probe라고 뜬다.



아으.... 이걸 쓰려면 opamp 사용해야 할 것 같은데
다음번에는 귀찮아도 비싸도 이런거 사서 쓸까 ㅠㅠ


[링크: http://www.eleparts.co.kr/EPX33JXL
Posted by 구차니
'ISP Frequency'를 '230.4kHz' 에서 '57.6kHz'로 낮추니 된다 -_-



귀찮아서 점퍼선 구매하고 대충 연결 ㅋㅋ
일단 회로는 전혀 없이 기본값인 Internal RC 로 작동하고
내 기억에는 8MHz 를 CKDIV / 8 로 해서 1Mhz로 작동하게 되는걸로 알고 있는데
그렇다면 230.4kHz로도 충분히 접속되어야 하기에 낮출 생각을 못했다.


이번에 지른 거상인 GS-08A
부가세 포함 1.1만원 들여서 해결책을 찾았으니 만원어치 값을 했구나~ ㅋㅋㅋ
이 녀석을 붙이는데 안되서 혹시나 ISP Clock? 이러면서 했더니 두둥!
그리고 나서 ATtiny2313에 해보니 두둥! 으앙 ㅋㅋㅋㅋ


---
기본 퓨즈 비트 설정
CKDIV8이 체크 되어 있어서 1MHz로 작동하게 된다.
체크를 끄면 8MHz로 작동하게 되고 ISP Clock도 기본값인 250kHz로 설정하고 사용해도 문제가 없어진다.

 
Posted by 구차니

타이밍 시트에는 VCC - RST tied up 으로 바로 둘 다 올라가는데



attiny2313 관련 데이터 시트
리셋 내용에는 0.2~0.9V 사이로 인기 되어야 하고(Vcc 1.8~5.5V 기준)
2.5us 동안 은 LOW로 있어야 하는 듯 하다.


atmega128 관련 데이터 시트
atmega128에서는 0.2~0.85V로 약간은 더 엄격(?)해 졌고
RST LOW 타이밍이 2.5us에서 1.5us 로 단축되었다.


 

Posted by 구차니
찾다보니 ATTINY 시리즈는 ATMEGA에 비해서 드라이브 능력도 떨어진다고 하는데
그걸로 인해서 파워업 리셋 쪽 저항값이 다른게 아닐까 생각이 된다.

음.. 풀업을 걸어 줘야 하는데 저항만 걸어줘서 그런가..

[링크 : http://startingelectronics.com/tutorials/AVR-8-microcontrollers/starting-AVR-development/]
[링크 : http://circuitsdiy.com/simplest-usb-avr-programmer/]
[링크 : http://electronics-diy.com/avr_programmer.php]
[링크 : http://www.smokeandwires.co.nz/blog/a-breadboardable-attiny2313-development-board/]
[링크 : http://liketech.com/entry/AVR-ISP-연결회로
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2013. 6. 29. 17:32
ISP 연결해줘도 안되고..
전원분리해도 안되고
10k 풀업을 달아보라는데 어떻게 달아야 하나 고민중 ㅠㅠ
(VCC-RST tied-up 이라고 하는데 데이터 시트에는 회로구성이 없어서 찾아 보니 10K 풀업 저항을 달아주라고 한다.)



[링크 : http://www.smokeandwires.co.nz/blog/a-breadboardable-attiny2313-development-board/]
[링크 : https://www.sparkfun.com/tutorials/93]
[링크 : http://frbird.blog.me/140102467895]

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

attiny2313 / atmega128 Power-on-Reset 관련 데이터시트 내용  (0) 2013.07.02
attiny2313 회로도 조사  (0) 2013.07.01
0으로 나누면 어떻게 될까?  (0) 2012.07.04
AVR ATmega128 i2c  (0) 2012.02.20
AVR ISP 핀 순서  (0) 2012.01.22
Posted by 구차니
Atmega32에 0으로 나누기 해서 미치게 하면 폭발한다는데..
도대체 어찌되먹은 녀석이지 -ㅁ-

[링크 :  http://www.youtube.com/watch?v=mZ7pUADoo58]

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

attiny2313 회로도 조사  (0) 2013.07.01
attiny2313과 함께하는 지랄같은 주말 -_-  (0) 2013.06.29
AVR ATmega128 i2c  (0) 2012.02.20
AVR ISP 핀 순서  (0) 2012.01.22
AVT FFT + DAC = 보청기?  (0) 2012.01.18
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2012. 2. 20. 23:20
AVR 에서도 I2C는 open drain으로 구성되는데
i2c 기능을 사용하지 않고,  GPIO로 구성해서 i2c 통신을 할 경우에는
i2c 버스 풀업과 avr pin 내장 풀업으로 인해 모종의 문제가 발생하는 듯하다.

• INT1/SDA – Port D, Bit 1
INT1, External Interrupt source 1. The PD1 pin can serve as an external interrupt source to the MCU.
SDA, Two-wire Serial Interface Data: When the TWEN bit in TWCR is set (one) to enable the
Two-wire Serial Interface, pin PD1 is disconnected from the port and becomes the Serial Data
I/O pin for the Two-wire Serial Interface. In this mode, there is a spike filter on the pin to sup-
press spikes shorter than 50 ns on the input signal, and the pin is driven by an open drain driver
with slew-rate limitation.
 
•INT0/SCL – Port D, Bit 0
INT0, External Interrupt source 0. The PD0 pin can serve as an external interrupt source to the MCU.
SCL, Two-wire Serial Interface Clock: When the TWEN bit in TWCR is set (one) to enable the
Two-wire Serial Interface, pin PD0 is disconnected from the port and becomes the Serial Clock
I/O pin for the Two-wire Serial Interface. In this mode, there is a spike filter on the pin to sup-
press spikes shorter than 50 ns on the input signal, and the pin is driven by an open drain driver
with slew-rate limitation. 

Electrical Interconnection
As depicted in Figure 86, both bus lines are connected to the positive supply voltage through
pull-up resistors. The bus drivers of all TWI-compliant devices are open-drain or open-collector.
This implements a wired-AND function which is essential to the operation of the interface. A low
level on a TWI bus line is generated when one or more TWI devices output a zero. A high level
is output when all TWI devices tri-state their outputs, allowing the pull-up resistors to pull the line
high. Note that all AVR devices connected to the TWI bus must be powered in order to allow any bus operation. 
The number of devices that can be connected to the bus is only limited by the bus capacitance
limit of 400 pF and the 7-bit slave address space. A detailed specification of the electrical char-
acteristics of the TWI is given in “Two-wire Serial Interface Characteristics” on page 322. Two
different sets of specifications are presented there, one relevant for bus speeds below 100 kHz,
and one valid for bus speeds up to 400 kHz. 

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

attiny2313과 함께하는 지랄같은 주말 -_-  (0) 2013.06.29
0으로 나누면 어떻게 될까?  (0) 2012.07.04
AVR ISP 핀 순서  (0) 2012.01.22
AVT FFT + DAC = 보청기?  (0) 2012.01.18
AVR TWI 예제  (0) 2012.01.11
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2012. 1. 22. 21:12
매번 헷갈리는게 이 핀이 위에서 보는건지 아래서 보는건지 알수가 없다는거 -_-
아무튼, 여러개를 동시에 보니 항상 같은 배열이고, 5번 쪽에 구멍이 뚫린것을 봐서는
보드 기준 위에서 아래로 내려다 보고 만든 핀 배열인 것으로 생각이 된다.
만약 커넥터측의 회로를 만들어서 떔질을 한다면 아래에서 위로 보고 좌우가 뒤집히게 결선을 해야 할려나?



[링크 : http://www.us-technology.co.kr/product/doc/isp.pdf]

 

----
조립되어 있는(?) 케이블들을 보니 커넥터의 방향을 동일한 쪽으로 해주었다.
아~ 별거 아니지만 이렇게 연장을 하는거구나 라는걸 깨달은 바보 같은 구차니군 ㅠ.ㅠ

 

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

0으로 나누면 어떻게 될까?  (0) 2012.07.04
AVR ATmega128 i2c  (0) 2012.02.20
AVT FFT + DAC = 보청기?  (0) 2012.01.18
AVR TWI 예제  (0) 2012.01.11
AVR EEPROM / CODE section 관련  (0) 2012.01.03
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2012. 1. 18. 21:31
Atmega128 에 내장된 녀석은 ADC 뿐이며 그것도 10bit 밖에 안된다.


윈도우 녹음기에서 미리설정된 "전화 음질"만 해도 16bit 모노이다 -_-


일단 AVR에서 FFT 연산이 거의 실시간에 가능하다고 해도
전화 음질만도 못한 녀석이어서는 좀.. 안습?

[링크 : http://www.micombox.com/index.php?document_srl=223459]

    [링크 : http://elm-chan.org/works/akilcd/report_e.html] << 아무튼 FFT + LCD 예제

[링크 : http://www.jjj.de/fft/fftpage.html]

인터넷 찾아보니, MAX195 / MAX542 라는 외부 ADC/  DAC 를 구매해서 했다는데
가격을 찾아보니 이거머.... ADC야 만원 미만이지만 DAC는 5만원 정도 -_-
I've used MAX195 as ADC and MAX542 as DAC. Sampling frequency is 24kHz
[링크 : http://www.youtube.com/watch?v=BNmr3Sd7UZc]  



머.. 간단하고 성급하게 결론을 내리자면 AVR에 내장된 ADC로는 조금 많이 아쉬운 성능.
그리고 DAC는 드럽게 비싸니 이 프로젝트는 심각히 고심을 -_-

---
ATxmega 시리즈에는 12bit ADC / DAC가 내장되어 있다.
12bit가 충분하다면 ATxmega 칩도 고려 해볼만 할 듯 

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

AVR ATmega128 i2c  (0) 2012.02.20
AVR ISP 핀 순서  (0) 2012.01.22
AVR TWI 예제  (0) 2012.01.11
AVR EEPROM / CODE section 관련  (0) 2012.01.03
AVR ATmega용 JTAG과 AVR32 호환성?  (0) 2011.12.29
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2012. 1. 11. 17:35
24CXX EEPROM 을 이용한 TWI 예제라는데
데이터시트를 살펴보면 8bit 레지스터를 위한 주소를 가지는 녀석이다.
용량이 큰녀석들은 16bit 주소를 사용하므로 nongnu에서 공개하는 소스대로 사용하면 안될듯 하다.
[링크 :  http://www.nongnu.org/avr-libc/user-manual/group__twi__demo.html



[링크 :  http://pdf1.alldatasheet.com/datasheet-pdf/view/200505/SANYO/LE24C0221M.html]


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

AVR ISP 핀 순서  (0) 2012.01.22
AVT FFT + DAC = 보청기?  (0) 2012.01.18
AVR EEPROM / CODE section 관련  (0) 2012.01.03
AVR ATmega용 JTAG과 AVR32 호환성?  (0) 2011.12.29
ATMEL AVR 시리즈별 플래시 / 메모리 용량  (2) 2011.12.29
Posted by 구차니