embeded/AVR (ATmega,ATtiny)2016. 4. 12. 21:24

74HC573 D latch를 이용하여 사용


주소(ATmega -> SRAM)와 데이터(SRAM -> ATmega) 는 동일 포트를 사용하며

래치를 통해 데이터의 방향을 결정하여 송신/수신한다.



[링크 : http://alnova2.tistory.com/673]


생각해보니.. 보드가 하나 있네.. 해봐야지

[링크 : http://www.us-technology.co.kr/product/product_main.asp?mode=101&smode=9]



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

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

부품들 정리  (0) 2016.04.16
avr pwm timer 계산기  (0) 2016.04.14
avr에 스피커 달기  (0) 2016.03.16
클론 avrisp avr studio 6 호환성(?)  (0) 2016.03.07
AVR ISP 부활의 조짐?!  (0) 2016.03.05
Posted by 구차니
embeded/Cortex-M4 Ti2016. 4. 12. 18:02

keil 에서 --c99주고 이런 에러 발생.

[링크 : http://www.keil.com/support/man/docs/uv4/uv4_dg_adscc.htm]

[링크 : http://www.keil.com/support/man/docs/armcc/armcc_chr1359124904416.htm]


uint32_t 등은 c99 타입인데...

#include <stdint.h>

#include <stdbool.h>

를 추가해주면 일단 패스

[링크 : http://www.keil.com/forum/17012/]

[링크 : http://www.keil.com/support/man/docs/armcc/armcc_chr1359124241645.htm]


error:  #1059-D: an entity with internal linkage cannot be referenced within an inline function with external linkage


굳이 해석하자면...

internal linkage와 함께 있는 항목(entity)은 external linkage와 함께 있는 inline function안에서 참조될 수 없다.



음.. inline 대신 static으로 쓰도록 해야 하는건가?

Note that instead of using static for internal linkage it is better to use anonymous namespaces into which you can also put classes. The linkage for anonymous namespaces has changed between C++98 and C++11 but the main thing is that they are unreachable from other translation units.

[링크 : http://stackoverflow.com/questions/1358400/what-is-external-linkage-and-internal-linkage-in-c]


클래스 내에서 안써서 그런가?

[링크 : https://msdn.microsoft.com/en-us/library/bw1hbe6y.aspx]



+

2018.04.20

일단.. extern __inline 으로 하니 문제없이 빌드는 됨.

'embeded > Cortex-M4 Ti' 카테고리의 다른 글

TM4C1231E6PM ADC  (0) 2016.05.20
tm4c1231e6pm / lm3s1607 타이머 차이점...?  (0) 2016.05.06
tm4c1231e6pm DIV400 ?  (0) 2016.04.12
lm3s1607 대체제 검색중..  (0) 2016.04.12
cortex-m4용 ti 라이브러리 tivaware  (0) 2016.04.12
Posted by 구차니
embeded/Cortex-M4 Ti2016. 4. 12. 16:27

lm3s1607에는 제공되지 않던 기능인데...

main 클럭을 PLL을 통해 400MHz로 올리고

그걸 다시 1/2 로 분기 후(200MHz)


클럭 디바이더를 통해 작동할 클럭을 설정하는데...

lm3s1607은 50MHz

tm4v1231e6pm은 80MHz 까지 작동한다고 해서 찾아보니...



위는 tm4v1231e6pm

아래는 lm3s1607 메뉴얼에서 발췌


tm4v1231e6pm 메뉴얼에서 발췌

DIV400을 설정시 사용가능한 클럭으로 /5에 80MHz 가 존재..


아무튼.. DIV400을 설정해야만 80MHz 최고 속도로 작동이 가능 할 것으로 보이니..

맘편하게 기존 회로에서 클럭 그대로 설정하면 50MHz로 쓰는데 지장없다는 걸려나?

'embeded > Cortex-M4 Ti' 카테고리의 다른 글

TM4C1231E6PM ADC  (0) 2016.05.20
tm4c1231e6pm / lm3s1607 타이머 차이점...?  (0) 2016.05.06
keil/c99 에서 __inline ...?  (0) 2016.04.12
lm3s1607 대체제 검색중..  (0) 2016.04.12
cortex-m4용 ti 라이브러리 tivaware  (0) 2016.04.12
Posted by 구차니
embeded/Cortex-M4 Ti2016. 4. 12. 14:03

LM3S1607 사용중인데 단종시켜 버린진 좀 오래되었고

이제 시중에서도 재고 찾기가 힘들어지고 있어서

호환제품으로 가려는데 pin-to-pin 호환 모델은 없고

홈페이지에서 찾아보니 LM4S에서 개명된 TM4C 계열로(cortex-M4) 갈아타야 할 듯


TM4C1231E6PM

LM4F110E5QR 


아무래도 개발환경에서 신형 칩으로는 이름이 없을수도 있으니.. TM4C 대신 LM4F계열로 찾아도 되겠지?

----


LM3S1607 (NRND)

Stellaris LM3S Microcontroller

Stellaris LM3S1607 Microcontroller Data Sheet (Rev. H) 

Stellaris LM3S Sandstorm-, Fury-, and DustDevil-Class Microcontrollers Errata 

Stellaris DustDevil-Class Product Change Notice 

Stellaris Product Change Notice (PCN), Sept 2009 

ARM Cortex-M3 Errata (r1p1 and r2p0) 

LM3S1607 RevA Product Change Notice (PCN), May 2008 

[링크 : http://www.ti.com/product/lm3s1607]


Overview for Control + Automation MCUs

[링크 : http://www.ti.com/lsds/ti/microcontrollers_16-bit_32-bit/c2000_performance/control_automation/overview.page]


TM4C12x ARM® Cortex®-M4F core-based high-performance MCUs


[링크 : http://www.ti.com/lsds/ti/microcontrollers_16-bit_32-bit/c2000_performance/control_automation/tm4c12x/overview.page]



TM4C1231E6PM (ACTIVE)

High performance 32-bit ARM® Cortex®-M4F based MCU

Tiva™ C Series TM4C1231E6PM Microcontroller Data Sheet (Rev. E) 

Tiva C Series TM4C123x Microcontrollers Silicon Revisions 6 and 7 Errata (Rev. E) 

Stellaris LM4F110E5QR Rev A1/A3/B0 Errata (Rev. H) 

ARM® Cortex™-M4F Errata (v3) 

[링크 : http://www.ti.com/product/TM4C1231E6PM]



아무튼.. 50MHz -> 80MHz로 성능 향상.. 일려나?



+

ST에서도 있긴한데.. 애네는 active..

ti가 유별난건가..


[링크 : http://www2.st.com/content/st_com/.../stm32-32-bit-arm-cortex-mcus/stm32f1-series.html]

[링크 : http://www2.st.com/.../stm32f1-series/stm32f103.html?querycriteria=productId=LN1565]

'embeded > Cortex-M4 Ti' 카테고리의 다른 글

TM4C1231E6PM ADC  (0) 2016.05.20
tm4c1231e6pm / lm3s1607 타이머 차이점...?  (0) 2016.05.06
keil/c99 에서 __inline ...?  (0) 2016.04.12
tm4c1231e6pm DIV400 ?  (0) 2016.04.12
cortex-m4용 ti 라이브러리 tivaware  (0) 2016.04.12
Posted by 구차니
Linux2016. 4. 12. 11:00


$ sudo chvt 1

$ chvt 1

Couldn't get a file descriptor referring to the console

$ tty

/dev/pts/3



음? 무슨 차이지?
그리고 왜... 안바뀌는거야?


/etc/init$ ls -al tty*
-rw-r--r-- 1 root root 348  4월 17  2012 tty1.conf
-rw-r--r-- 1 root root 333  4월 17  2012 tty2.conf
-rw-r--r-- 1 root root 333  4월 17  2012 tty3.conf
-rw-r--r-- 1 root root 333  4월 17  2012 tty4.conf
-rw-r--r-- 1 root root 232  4월 17  2012 tty5.conf
-rw-r--r-- 1 root root 232  4월 17  2012 tty6.conf

아무튼.. 6개의 가상 터미널은 /etc/init에서 tty?.conf를 통해 뜨게 되는건가?

/etc/init$ cat tty1.conf

# tty1 - getty

#

# This service maintains a getty on tty1 from the point the system is

# started until it is shut down again.


start on stopped rc RUNLEVEL=[2345] and (

            not-container or

            container CONTAINER=lxc or

            container CONTAINER=lxc-libvirt)


stop on runlevel [!2345]


respawn

exec /sbin/getty -8 38400 tty1




[링크 : http://computernetworkingnotes.com/linux-file-system-basic-commands/login-linux-terminal.html]

[링크 : http://computernetworkingnotes.com/system-administrations/inittab.html]

'Linux' 카테고리의 다른 글

cp -Lr  (0) 2016.06.14
libxml 크로스컴파일. (shared library)  (0) 2016.06.13
리눅스 콘솔에서 한글보기  (0) 2016.04.11
AMD avx 리눅스 식별자  (0) 2016.03.08
리눅스용 비디오 편집 프로그램  (0) 2016.03.02
Posted by 구차니
embeded/Cortex-M4 Ti2016. 4. 12. 08:54

욕같애...

stellarisware가 이름은 더 이뻤는데 흑.. ㅠㅠ



아마도.. 조만간 해야 할일..

stellarisware -> tivaware migration ㅠㅠ




[링크 : http://www.ti.com/lit/an/spma050a/spma050a.pdf]

'embeded > Cortex-M4 Ti' 카테고리의 다른 글

TM4C1231E6PM ADC  (0) 2016.05.20
tm4c1231e6pm / lm3s1607 타이머 차이점...?  (0) 2016.05.06
keil/c99 에서 __inline ...?  (0) 2016.04.12
tm4c1231e6pm DIV400 ?  (0) 2016.04.12
lm3s1607 대체제 검색중..  (0) 2016.04.12
Posted by 구차니
embeded/arduino(genuino)2016. 4. 11. 18:33

믿을만 한건가...?


// Internal Temperature Sensor // Example sketch for ATmega328 types. // // April 2012, Arduino 1.0 void setup() {  Serial.begin(9600);  Serial.println(F("Internal Temperature Sensor")); } void loop() {  // Show the temperature in degrees Celcius.  Serial.println(GetTemp(),1);  delay(1000); } double GetTemp(void) {  unsigned int wADC;  double t;  // The internal temperature has to be used  // with the internal reference of 1.1V.  // Channel 8 can not be selected with  // the analogRead function yet.  // Set the internal reference and mux.  ADMUX = (_BV(REFS1) | _BV(REFS0) | _BV(MUX3));  ADCSRA |= _BV(ADEN);  // enable the ADC  delay(20);            // wait for voltages to become stable.  ADCSRA |= _BV(ADSC);  // Start the ADC  // Detect end-of-conversion  while (bit_is_set(ADCSRA,ADSC));  // Reading register "ADCW" takes care of how to read ADCL and ADCH.  wADC = ADCW;  // The offset of 324.31 could be wrong. It is just an indication.  t = (wADC - 324.31 ) / 1.22;  // The returned temperature is in degrees Celcius.  return (t); }


실내온도 25도

손으로 대면 약간 따스함이 느껴지는걸 봐서는 37도~38도 정도 되지 않을까 싶은데...

19.4도는 손을 댄 시점..

20.2

20.2

20.2

21.1

20.2

20.2

20.2

21.1

20.2

21.1

20.2

20.2

19.4

19.4

18.6

19.4

19.4

20.2

19.4

20.2

21.1

20.2

20.2

20.2

20.2

20.2

20.2

21.1

20.2

21.1

20.2

21.1

20.2


그냥 레지스터 출력

349.0

349.0

349.0

348.0

348.0

348.0

348.0

348.0

349.0

349.0

348.0

349.0

349.0 


[링크 : http://playground.arduino.cc/Main/InternalTemperatureSensor]

2016/03/31 - [embeded/arduino(genuino)] - 아두이노 나노 내장 온도센서



아무튼.. 아래 계산식에 의해 349를 계산해보면

349 = (Vin * 1024) / 1.1

Vin = (349 * 1.1) / 1024

Vin = 0.37490234375 = 374mV 인가?



대충.. 10bit니까 1024.. rev가 1.1로 내장 전원을 쓰니

단순하게(?) 출력으로 나오는 값에서 10으로 나눠주면 되려나?

그런데.. k랑 Tos값은 제품 테스트의 일부로 EEPROM에 테스트 해서 저장해야 한다고?!?!


[링크 : http://www.atmel.com/images/...328p_datasheet_complete.pdf]



[링크 : https://www.arduino.cc/en/uploads/Main/ArduinoNano30Schematic.pdf]


AREF는 0.0V로 연결되서.. 코드에서 내부 1.1V로 설정한 듯?


ADMUX = (_BV(REFS1) | _BV(REFS0) | _BV(MUX3));

Internal 1.1V Voltage Reference with external capacitor at AREF pin



회로도에서 찾아 보니.. AVcc는 5V랑 묶여 있으니..

데이터시트에서 해당내용을 찾아 변경하면..


음.. 너무 빠듯하게 나오네..


ADMUX = (_BV(REFS0) | _BV(MUX3)); // (_BV(REFS1) | 


79.0

79.0

79.0

79.0

79.0

79.0

79.0 



+

offset도 .. gain도 많이 다르네?


static const float offset = 335.2; // change this by calibration result

static const float gain = 1.06154;

[링크 : http://www.avdweb.nl/arduino/hardware-interfacing/temperature-measurement.html]

Posted by 구차니
Linux2016. 4. 11. 14:28

어? 입력도 되나 모르겠네?

음.. xterm에서 한글에 나오게 하는게 아니라

jfbterm 이라는 걸 통해서 하는거라 해당 세션을 종료하면 한글이 안나온다는데 흐음..


[링크 : http://bakyeono.net/post/2015-12-31-linux-hangul-console.html]

[링크 : https://jfbterm.osdn.jp/]

'Linux' 카테고리의 다른 글

libxml 크로스컴파일. (shared library)  (0) 2016.06.13
chvt - change Virtual Termianl  (0) 2016.04.12
AMD avx 리눅스 식별자  (0) 2016.03.08
리눅스용 비디오 편집 프로그램  (0) 2016.03.02
objdump  (0) 2016.02.18
Posted by 구차니
embeded/arduino(genuino)2016. 4. 9. 23:27

올... 이미 다 설정이 있네? ㄷㄷ

조금 번거로워도.. 거상인 GS-08A Atmega8 을 이걸 가지고

조금 수정해서

3.3V 용으로 퓨즈비트랑 설정한 다음 stk-500 계열로 avrisp 이용해서 구으면 될려나?




[링크 : https://learn.sparkfun.com/tutorials/using-the-arduino-pro-mini-33v]

[링크 : https://www.sparkfun.com/products/11114]

Posted by 구차니
파일방2016. 4. 8. 09:47

몰래 채팅을 위해서 리눅스에 깔아 볼까했는데 ㄷㄷㄷ

이걸 이용해서 리눅스 서버 상태 불러오는 짓을 할수 있다니!!


[링크 : http://truefeel.tistory.com/224]  <<<

    [링크 : http://reqres.tistory.com/25]


[링크 : https://github.com/vysheng/tg]

    [링크 : https://telegram.org/apps]

'파일방' 카테고리의 다른 글

캐논 셔터 컷수 확인하기  (0) 2016.04.26
ti - energia  (0) 2016.04.14
avidemux 간단한 사용법 / 리눅스가 낫네!  (0) 2016.03.28
notepad++ for linux?  (0) 2016.03.22
photostitcher  (0) 2016.03.15
Posted by 구차니