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 구차니
embeded/arduino(genuino)2016. 4. 7. 10:25

기본값으로 설치되었다는 전제하에

아래 경로에 플래시 구울때 사용하는 설정들이 존재한다.


아두이노는 기본적으로 USB 파워나 외부 전원을 통해(7805) 5V를 공급하도록 되어있는데

7805를 들어내거나 결선을 바꾸거나 외부 Vcc에다가 3.3V를 넣어 주고

클럭을 다운시켜 작동하면 좀 간편할지도?


아니면 프로미니 3.3V 이런거라던가?


ATmega328 running at 8MHz with external resonator (0.5% tolerance)

Low-voltage board needs no interfacing circuitry to popular 3.3V devices and modules (GPS, accelerometers, sensors, etc)

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


C:\Program Files (x86)\Arduino\hardware\arduino\avr\boards.txt

##############################################################


nano.name=Arduino Nano


nano.upload.tool=avrdude

nano.upload.protocol=arduino


nano.bootloader.tool=avrdude

nano.bootloader.unlock_bits=0x3F

nano.bootloader.lock_bits=0x0F


nano.build.f_cpu=16000000L

nano.build.board=AVR_NANO

nano.build.core=arduino

nano.build.variant=eightanaloginputs


## Arduino Nano w/ ATmega328

## -------------------------

nano.menu.cpu.atmega328=ATmega328


nano.menu.cpu.atmega328.upload.maximum_size=30720

nano.menu.cpu.atmega328.upload.maximum_data_size=2048

nano.menu.cpu.atmega328.upload.speed=57600


nano.menu.cpu.atmega328.bootloader.low_fuses=0xFF

nano.menu.cpu.atmega328.bootloader.high_fuses=0xDA

nano.menu.cpu.atmega328.bootloader.extended_fuses=0x05

nano.menu.cpu.atmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex


nano.menu.cpu.atmega328.build.mcu=atmega328p


## Arduino Nano w/ ATmega168

## -------------------------

nano.menu.cpu.atmega168=ATmega168


nano.menu.cpu.atmega168.upload.maximum_size=14336

nano.menu.cpu.atmega168.upload.maximum_data_size=1024

nano.menu.cpu.atmega168.upload.speed=19200


nano.menu.cpu.atmega168.bootloader.low_fuses=0xff

nano.menu.cpu.atmega168.bootloader.high_fuses=0xdd

nano.menu.cpu.atmega168.bootloader.extended_fuses=0x00

nano.menu.cpu.atmega168.bootloader.file=atmega/ATmegaBOOT_168_diecimila.hex


nano.menu.cpu.atmega168.build.mcu=atmega168 


[링크 : https://forum.arduino.cc/index.php?topic=236128.0]



Arduino Duemilanove or Nano w/ ATmega328


Low Fuse 0xFF

High Fuse 0xDA

Extended Fuse 0x05 


[링크 : http://www.codingwithcody.com/2011/04/arduino-default-fuse-settings/]

[링크 : http://www.engbedded.com/fusecalc/] 퓨즈비트 계산기



+

어제 퇴근길에 본거 겨우 링크 찾았네..

[링크 : http://www.ba0sh1.com/tutorial-3-3v-hacking-for-arduino-nano/]

Posted by 구차니
embeded/arduino(genuino)2016. 4. 7. 09:58

툴에서 설정을 해놨다면 그걸 이용해서

스케치 - 프로그래머를 이용해 업로드

를 함으로서 stk500 호환 usbisp 등을 이용해 업로드가 가능해진다.





[링크 : https://www.arduino.cc/en/Hacking/Bootloader?from=Tutorial.Bootloader]


Tools->Boards->Your Board

Tools->Programmer->Your Programmer

Sketch->Upload Using a Programmer

[링크 : https://www.arduino.cc/en/Hacking/Programmer]

Posted by 구차니
embeded/arduino(genuino)2016. 4. 6. 23:41



 

예전에 가지고 있던 녀석으로 구워볼려고 했더니..

프로그래머 이녀석은... 굽는 용도가 아닌가? 안되지 왜?

(어쩌면 보드를 정해줘서 그런걸지도..)


아무튼 STK500 개발보드로 하니 USBISP로 구워진다

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



근데.. 메시지가 머이리 길어?

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


avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58

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

         Copyright (c) 2007-2009 Joerg Wunsch


         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"


         Using Port                    : COM6

         Using Programmer              : stk500

         AVR Part                      : ATmega328P

         Chip Erase delay              : 9000 us

         PAGEL                         : PD7

         BS2                           : PC2

         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        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff

           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff

           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

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


         Programmer Type : STK500V2

         Description     : Atmel STK500

         Programmer Model: AVRISP

         Hardware Version: 2

         Firmware Version Master : 2.10

         Vtarget         : 5.0 V

         SCK period      : 43.5 us


avrdude: AVR device initialized and ready to accept instructions


Reading | ################################################## | 100% 0.09s


avrdude: Device signature = 0x1e950f

avrdude: erasing chip

avrdude: reading input file "0x3F"

avrdude: writing lock (1 bytes):


Writing | ################################################## | 100% 0.04s


avrdude: 1 bytes of lock written

avrdude: verifying lock memory against 0x3F:

avrdude: load data lock data from input file 0x3F:

avrdude: input file 0x3F contains 1 bytes

avrdude: reading on-chip lock data:


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


avrdude: verifying ...

avrdude: 1 bytes of lock verified

avrdude: reading input file "0x05"

avrdude: writing efuse (1 bytes):


Writing | ################################################## | 100% 0.03s


avrdude: 1 bytes of efuse written

avrdude: verifying efuse memory against 0x05:

avrdude: load data efuse data from input file 0x05:

avrdude: input file 0x05 contains 1 bytes

avrdude: reading on-chip efuse data:


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


avrdude: verifying ...

avrdude: 1 bytes of efuse verified

avrdude: reading input file "0xDA"

avrdude: writing hfuse (1 bytes):


Writing | ################################################## | 100% 0.03s


avrdude: 1 bytes of hfuse written

avrdude: verifying hfuse memory against 0xDA:

avrdude: load data hfuse data from input file 0xDA:

avrdude: input file 0xDA contains 1 bytes

avrdude: reading on-chip hfuse data:


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


avrdude: verifying ...

avrdude: 1 bytes of hfuse verified

avrdude: reading input file "0xFF"

avrdude: writing lfuse (1 bytes):


Writing | ################################################## | 100% 0.03s


avrdude: 1 bytes of lfuse written

avrdude: verifying lfuse memory against 0xFF:

avrdude: load data lfuse data from input file 0xFF:

avrdude: input file 0xFF contains 1 bytes

avrdude: reading on-chip lfuse data:


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


avrdude: verifying ...

avrdude: 1 bytes of lfuse verified


avrdude done.  Thank you.


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 -Uflash:w:C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex:i -Ulock:w:0x0F:m 


avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58

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

         Copyright (c) 2007-2009 Joerg Wunsch


         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"


         Using Port                    : COM6

         Using Programmer              : stk500

         AVR Part                      : ATmega328P

         Chip Erase delay              : 9000 us

         PAGEL                         : PD7

         BS2                           : PC2

         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        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff

           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff

           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

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


         Programmer Type : STK500V2

         Description     : Atmel STK500

         Programmer Model: AVRISP

         Hardware Version: 2

         Firmware Version Master : 2.10

         Vtarget         : 5.0 V

         SCK period      : 43.5 us


avrdude: AVR device initialized and ready to accept instructions


Reading | ################################################## | 100% 0.09s


avrdude: Device signature = 0x1e950f

avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed

         To disable this feature, specify the -D option.

avrdude: erasing chip

avrdude: reading input file "C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex"

avrdude: writing flash (32670 bytes):


Writing | ################################################## | 100% 0.00s


avrdude: 32670 bytes of flash written

avrdude: verifying flash memory against C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex:

avrdude: load data flash data from input file C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex:

avrdude: input file C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex contains 32670 bytes

avrdude: reading on-chip flash data:


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


avrdude: verifying ...

avrdude: 32670 bytes of flash verified

avrdude: reading input file "0x0F"

avrdude: writing lock (1 bytes):


Writing | ################################################## | 100% 0.09s


avrdude: 1 bytes of lock written

avrdude: verifying lock memory against 0x0F:

avrdude: load data lock data from input file 0x0F:

avrdude: input file 0x0F contains 1 bytes

avrdude: reading on-chip lock data:


Reading | ################################################## | 100% 0.04s


avrdude: verifying ...

avrdude: 1 bytes of lock verified


avrdude done.  Thank you. 


Posted by 구차니
embeded/arduino(genuino)2016. 4. 6. 22:59

헐.. 설정이 문제가 아니었나 -ㅁ-?!?!


시리얼 포트를 통해서는 이런 메시지가(115k)

 NON GENUINE DEVICE FOUND! NON GENUINE DEVICE FOUND! 


구을려고 하면 아래와 같은 메시지가 나온다.

avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58

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

         Copyright (c) 2007-2009 Joerg Wunsch


         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"


         Using Port                    : COM6

         Using Programmer              : arduino

         Overriding Baud Rate          : 57600

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x43

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x45

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x20

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x46

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x4f

avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x55

avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x4e

avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x44

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x21

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x20 


얘는 내가 쓰던 usbisp 인데.. 이렇게 나오고..


안구워지는 녀석은.. 이렇게


구워지는 놈은 이렇게... 어?


윈도우 드라이버가 의심되서 봐도 머.. 둘다 상관없네




[링크 : http://www.instructables.com/id/A-solution-to-avrdude-stk500getsync-not-in-syn/]

[링크 : https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader]

[링크 : http://electropit.com/index.php/2015/09/06/arduino-nano-v3-0-clones/]

[링크 : http://internetofhomethings.com/homethings/?tag=not-genuine-device-found]

[링크 : http://www.ftdichip.com/Support/Utilities.htm#FT_PROG]



일단.. 위에 내용을 덮어 쓰고 하니까.

새로운 포트로 잡히고 나서 구워진다.. 머지?


16진수 값으로도 가장 마지막 비트가 먼가 이상한게 씌어져 있을때는 안되었고(무슨값인진..)

0000 으로 되어 있으니 되는걸 봐서는..

의심가는 건.. hardware specific 하위의 RS232와 IO 컨트롤 관련 셋팅..



Posted by 구차니
embeded/raspberry pi2016. 4. 6. 20:06

안된다는 말이 있어서 따라가보니...

핀 자체가 실장이 안되어 있다고... (GPIO19)



bcm2835 has support for I2C slave. Refer to section 11 of http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf


Unfortunately, GPIO pin 19 (BSC slave CLK) was dropped. http://elinux.org/RPi_BCM2835_GPIOs


So, the built-in I2C slave cannot be used.

[링크 : http://raspberrypi.stackexchange.com/questions/5584/i2c-raspberri-pi-as-a-slave]





[링크 : http://elinux.org/RPi_BCM2835_GPIOs]

Posted by 구차니
embeded/arduino(genuino)2016. 4. 6. 20:01

라즈베리는 3.3v 일테고

아두이노는 5v 일텐데.. 그냥 연결해도 되려나?

라즈베리 날려먹긴 싫은데.. 레벨 시프터 사야하나 ㅠㅠ


[링크 : https://www.eleparts.co.kr/EPX8MXNR] 6천원... ㅠㅠ


일단은...

아래는 3.3V 짜리를 5V인 아두이노에서 쓰는거지만...

[링크 : http://playground.arduino.cc/Main/I2CBi-directionalLevelShifter]

2016/04/01 - [embeded/arduino(genuino)] - 아두이노 level shift / MPU-6050


The Raspberry Pi is running at 3.3 Volts while the Arduino is running at 5 Volts. There are tutorials suggest using a level converter for the I2C communication. This is NOT needed if the Raspberry Pi is running as “master” and the Arduino is running as “slave”.


The reason it works is because the Arduino does not have any pull-ups resistors installed, but the P1 header on the Raspberry Pi has 1k8 ohms resistors to the 3.3 volts power rail. Data is transmitted by pulling the lines to 0v, for a “high” logic signal. For “low” logic signal, it’s pulled up to the supply rail voltage level. Because there is no pull-up resistors in the Arduino and because 3.3 volts is within the “low” logic level range for the Arduino everything works as it should.

[링크 : http://blog.oscarliang.net/raspberry-pi-arduino-connected-i2c/]

    [링크 : http://dsscircuits.com/articles/effects-of-varying-i2c-pull-up-resistors]

[링크 : http://blog.retep.org/2014/02/15/connecting-an-arduino-to-a-raspberry-pi-using-i2c/]




걍.. 과감하게(?) atmega 녀석들이 대부분 2.8V~5.5V 니까 3.3V로 주면 안되려나?


Operating Voltage:

1.8 - 5.5V


TWI(I2C)쪽 입력 전압은 Vcc + 0.5 니까.. 3.3V 주면은.. 어떻게 안되려나?

그나저나.. 0.3V~0.7V 로 무지 좁네..



[링크 : http://www.atmel.com/...atmega48a-48pa-88a-88pa-168a-168pa-328-328p_datasheet_complete.pdf]

Posted by 구차니
이론 관련2016. 4. 6. 09:39

어... 단순하게 arctan으로 하면 땡~이 아니었던게야?!?!?!





void calc_xy_angles(void){

   // Using x y and z from accelerometer, calculate x and y angles

   float x_val, y_val, z_val, result;

   unsigned short long x2, y2, z2; //24 bit


   // Lets get the deviations from our baseline

   x_val = (float)accel_value_x-(float)accel_center_x;

   y_val = (float)accel_value_y-(float)accel_center_y;

   z_val = (float)accel_value_z-(float)accel_center_z;


   // Work out the squares 

   x2 = (unsigned short long)(x_val*x_val);

   y2 = (unsigned short long)(y_val*y_val);

   z2 = (unsigned short long)(z_val*z_val);


   //X Axis

   result=sqrt(y2+z2);

   result=x_val/result;

   accel_angle_x = atan(result);


   //Y Axis

   result=sqrt(x2+z2);

   result=y_val/result;

   accel_angle_y = atan(result);


[링크 : http://www.hobbytronics.co.uk/accelerometer-info]


[링크 : https://cache.freescale.com/files/sensors/doc/app_note/AN3461.pdf]

[링크 : http://www.st.com/web/en/resource/technical/document/application_note/CD00268887.pdf]

[링크 : http://www.analog.com/media/en/technical-documentation/application-notes/AN-1057.pdf]


Posted by 구차니