embeded/Cortex-M3 Ti2015. 8. 3. 17:19

요약하면..

GPIOPortIntRegister(GPIO_PORTA_BASE, PortAIntHandler);

GPIOPinTypeGPIOInput(GPIO_PORTA_BASE,GPIO_PIN_2);

GPIOIntTypeSet(GPIO_PORTA_BASE, GPIO_PIN_2, GPIO_RISING_EDGE);

GPIOPinIntEnable(GPIO_PORTA_BASE, GPIO_PIN_2);

이렇게 셋트로 해주면 P2는 rising_edge에서 PortAIntHandler 핸들러를 호출하게 되는건가?


그리고 핸들러에서는

GPIOPinIntStatus 를 사용해서 핀 별로 처리해주면 될 듯?


9.2.2.11 GPIOPinIntStatus

Gets interrupt status for the specified GPIO port.

Prototype:

long GPIOPinIntStatus(unsigned long ulPort, tBoolean bMasked)

Parameters:

ulPort is the base address of the GPIO port.

bMasked specifies whether masked or raw interrupt status is returned.

Description:

If bMasked is set as true, then the masked interrupt status is returned; otherwise, the raw interrupt status will be returned.

Returns:

Returns a bit-packed byte, where each bit that is set identifies an active masked or raw interrupt, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. Bits 31:8 should be ignored. 



9.3 Programming Example

The following example shows how to use the GPIO API to initialize the GPIO, enable interrupts,

read data from pins, and write data to pins.

int iVal;
//
// Register the port-level interrupt handler. This handler is the
// first level interrupt handler for all the pin interrupts.
//
GPIOPortIntRegister(GPIO_PORTA_BASE, PortAIntHandler);
//
// Initialize the GPIO pin configuration.
//
// Set pins 2, 4, and 5 as input, SW controlled.
//
GPIOPinTypeGPIOInput(GPIO_PORTA_BASE,
GPIO_PIN_2 | GPIO_PIN_4 | GPIO_PIN_5);
//
// Set pins 0 and 3 as output, SW controlled.
//
GPIOPinTypeGPIOOutput(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_3);
//
// Make pins 2 and 4 rising edge triggered interrupts.
//
GPIOIntTypeSet(GPIO_PORTA_BASE, GPIO_PIN_2 | GPIO_PIN_4, GPIO_RISING_EDGE);
//
// Make pin 5 high level triggered interrupts.
//
GPIOIntTypeSet(GPIO_PORTA_BASE, GPIO_PIN_5, GPIO_HIGH_LEVEL);
//
// Read some pins.
//
iVal = GPIOPinRead(GPIO_PORTA_BASE,
(GPIO_PIN_0 | GPIO_PIN_2 | GPIO_PIN_3 |
GPIO_PIN_4 | GPIO_PIN_5));
//
// Write some pins. Even though pins 2, 4, and 5 are specified, those
// pins are unaffected by this write since they are configured as inputs.
// At the end of this write, pin 0 will be a 0, and pin 3 will be a 1.
//
GPIOPinWrite(GPIO_PORTA_BASE,
(GPIO_PIN_0 | GPIO_PIN_2 | GPIO_PIN_3 |
GPIO_PIN_4 | GPIO_PIN_5),
0xF4);
//
// Enable the pin interrupts.
//
GPIOPinIntEnable(GPIO_PORTA_BASE, GPIO_PIN_2 | GPIO_PIN_4 | GPIO_PIN_5);



9.2.2.4 GPIOIntTypeSet

Sets the interrupt type for the specified pin(s).


Prototype:

void GPIOIntTypeSet(unsigned long ulPort, unsigned char ucPins, unsigned long ulIntType)

Parameters:

ulPort is the base address of the GPIO port.

ucPins is the bit-packed representation of the pin(s).

ulIntType specifies the type of interrupt trigger mechanism.

Description:

This function sets up the various interrupt trigger mechanisms for the specified pin(s) on the selected GPIO port.

The parameter ulIntType is an enumerated data type that can be one of the following values:

GPIO_FALLING_EDGE

GPIO_RISING_EDGE

GPIO_BOTH_EDGES

GPIO_LOW_LEVEL

GPIO_HIGH_LEVEL

where the different values describe the interrupt detection mechanism (edge or level) and the particular triggering event (falling, rising, or both edges for edge detect, low or high for level detect).

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note:

In order to avoid any spurious interrupts, the user must ensure that the GPIO inputs remain stable for the duration of this function.

Returns:

None.





[링크 : https://e2e.ti.com/support/microcontrollers/stellaris_arm/f/471/t/48738]

[링크 : http://elk.informatik.fh-augsburg.de/cdrom-stellaris/LM3S811/rasware-read-only/RASLib/src/encoder.c]

    [링크 : http://elk.informatik.fh-augsburg.de/cdrom-stellaris/LM3S811/rasware-read-only/RASLib/src/]

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

lm3s stellarisware SPI  (0) 2015.10.05
cortex-m3 ROM direct call  (0) 2015.09.25
bitband / cortex-m3  (0) 2013.08.16
LM3S1968과 H-JTAG(wiggler)  (0) 2013.06.28
cortex-m3 JTAG / X-LinkEx 1.1  (0) 2013.06.11
Posted by 구차니
embeded/raspberry pi2015. 8. 3. 08:38

기본적으로는 부팅시에만 가능하고

tvservice라는 3rd party 유틸을 통해 변경은 가능하나

출력 방향만 바꾸지 해상도까지 변경되는건 아니고 오버스캔 되는 등의 문제가 있으니

완전한 해결책이라고 하긴 힘들듯.


pi@delta ~ $ tvservice -c "PAL 4:3"; fbset -depth 8; fbset -depth 16

Powering on SDTV with explicit settings (mode:2 aspect:1)


pi@delta ~ $ tvservice -p; fbset -depth 8; fbset -depth 16

Powering on HDMI with preferred settings


[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=38020]



pi@raspberrypi ~ $ tvservice

Usage: tvservice [OPTION]...

  -p, --preferred                   Power on HDMI with preferred settings

  -e, --explicit="GROUP MODE DRIVE" Power on HDMI with explicit GROUP (CEA, DMT, CEA_3D_SBS, CEA_3D_TB, CEA_3D_FP)

                                      MODE (see --modes) and DRIVE (HDMI, DVI)

  -t, --ntsc                        Use NTSC frequency for HDMI mode (e.g. 59.94Hz rather than 60Hz)

  -c, --sdtvon="MODE ASPECT"        Power on SDTV with MODE (PAL or NTSC) and ASPECT (4:3 14:9 or 16:9)

  -o, --off                         Power off the display

  -m, --modes=GROUP                 Get supported modes for GROUP (CEA, DMT)

  -M, --monitor                     Monitor HDMI events

  -s, --status                      Get HDMI status

  -a, --audio                       Get supported audio information

  -d, --dumpedid <filename>         Dump EDID information to file

  -j, --json                        Use JSON format for --modes output

  -n, --name                        Print the device ID from EDID

  -h, --help                        Print this information 


pi@raspberrypi ~ $ fbset --help
Linux Frame Buffer Device Configuration Version 2.1 (23/06/1999)
(C) Copyright 1995-1999 by Geert Uytterhoeven


Usage: fbset [options] [mode]

Valid options:
  General options:
    -h, --help         : display this usage information
    --test             : don't change, just test whether the mode is valid
    -s, --show         : display video mode settings
    -i, --info         : display all frame buffer information
    -v, --verbose      : verbose mode
    -V, --version      : print version information
    -x, --xfree86      : XFree86 compatibility mode
    -a, --all          : change all virtual consoles on this device
  Frame buffer special device nodes:
    -fb <device>       : processed frame buffer device
                         (default is /dev/fb0)
  Video mode database:
    -db <file>         : video mode database file
                         (default is /etc/fb.modes)
  Display geometry:
    -xres <value>      : horizontal resolution (in pixels)
    -yres <value>      : vertical resolution (in pixels)
    -vxres <value>     : virtual horizontal resolution (in pixels)
    -vyres <value>     : virtual vertical resolution (in pixels)
    -depth <value>     : display depth (in bits per pixel)
    -nonstd <value>    : select nonstandard video mode
    -g, --geometry ... : set all geometry parameters at once
    -match             : set virtual vertical resolution by virtual resolution
  Display timings:
    -pixclock <value>  : pixel clock (in picoseconds)
    -left <value>      : left margin (in pixels)
    -right <value>     : right margin (in pixels)
    -upper <value>     : upper margin (in pixel lines)
    -lower <value>     : lower margin (in pixel lines)
    -hslen <value>     : horizontal sync length (in pixels)
    -vslen <value>     : vertical sync length (in pixel lines)
    -t, --timings ...  : set all timing parameters at once
  Display flags:
    -accel <value>     : hardware text acceleration enable (false or true)
    -hsync <value>     : horizontal sync polarity (low or high)
    -vsync <value>     : vertical sync polarity (low or high)
    -csync <value>     : composite sync polarity (low or high)
    -gsync <value>     : synch on green (false or true)
    -extsync <value>   : external sync enable (false or true)
    -bcast <value>     : broadcast enable (false or true)
    -laced <value>     : interlace enable (false or true)
    -double <value>    : doublescan enable (false or true)
    -rgba <r,g,b,a>    : recommended length of color entries
    -grayscale <value> : grayscale enable (false or true)
  Display positioning:
    -move <direction>  : move the visible part (left, right, up or down)
    -step <value>      : step increment (in pixels or pixel lines)
                         (default is 8 horizontal, 2 vertical) 


Posted by 구차니

avt studio 4만 다뤄봐서.. 5 부터는 어떻게 되는진 모르겠지만

윈도우에서는  -D를 통해서 cpu 종류와 클럭을 넣어주었는데

리눅스에서는 컴파일러의 도움을 받아 mcu 종류를 넣어주면 알아서 확장해서 사용한다.

그래서 win-avr과 같은 종류별로 헤더를 찾는 수고로움이 더는 장점은 있지만

빌드 과정에서 설정하게 되어 있어서 모르면 더 복잡할지도..


-mmcu=architecture

Note that when only using -mmcu=architecture but no -mmcu=MCU type, including the file <avr/io.h> cannot work since it cannot decide which device's definitions to select.


Architecture Macros

avr5

AVR_ARCH=5

AVR_MEGA [5]

AVR_ENHANCED [5]

AVR_HAVE_JMP_CALL [4]

AVR_HAVE_MOVW [1]

AVR_HAVE_LPMX [1]

AVR_HAVE_MUL [1]

AVR_2_BYTE_PC [2]

avr51

AVR_ARCH=51

AVR_MEGA [5]

AVR_ENHANCED [5]

AVR_HAVE_JMP_CALL [4]

AVR_HAVE_MOVW [1]

AVR_HAVE_LPMX [1]

AVR_HAVE_MUL [1]

AVR_HAVE_RAMPZ [4]

AVR_HAVE_ELPM [4]

AVR_HAVE_ELPMX [4]

AVR_2_BYTE_PC [2]


-mmcu=MCU type

The following MCU types are currently understood by avr-gcc. The table matches them against the corresponding avr-gcc architecture name, and shows the preprocessor symbol declared by the -mmcu option. 


Architecture MCU name    Macro

avr5/avr51 [3] atmega128   __AVR_ATmega128__

[링크 : http://www.nongnu.org/avr-libc/user-manual/using_tools.html]





#define AVR 1

#define __AVR 1

#define __AVR_ARCH__ 5

#define __AVR_ATmega128__ 1

#define __AVR_ENHANCED__ 1

#define __AVR_MEGA__ 1

#define __AVR__ 1

#define __CHAR_BIT__ 8

#define __DBL_DENORM_MIN__ 1.40129846e-45

#define __DBL_DIG__ 6

#define __DBL_EPSILON__ 1.19209290e-7

#define __DBL_HAS_INFINITY__ 1

#define __DBL_HAS_QUIET_NAN__ 1

#define __DBL_MANT_DIG__ 24

#define __DBL_MAX_10_EXP__ 38

#define __DBL_MAX_EXP__ 128

#define __DBL_MAX__ 3.40282347e+38

#define __DBL_MIN_10_EXP__ (-37)

#define __DBL_MIN_EXP__ (-125)

#define __DBL_MIN__ 1.17549435e-38

#define __DECIMAL_DIG__ 9

#define __FINITE_MATH_ONLY__ 0

#define __FLT_DENORM_MIN__ 1.40129846e-45F

#define __FLT_DIG__ 6

#define __FLT_EPSILON__ 1.19209290e-7F

#define __FLT_EVAL_METHOD__ 0

#define __FLT_HAS_INFINITY__ 1

#define __FLT_HAS_QUIET_NAN__ 1

#define __FLT_MANT_DIG__ 24

#define __FLT_MAX_10_EXP__ 38

#define __FLT_MAX_EXP__ 128

#define __FLT_MAX__ 3.40282347e+38F

#define __FLT_MIN_10_EXP__ (-37)

#define __FLT_MIN_EXP__ (-125)

#define __FLT_MIN__ 1.17549435e-38F

#define __FLT_RADIX__ 2

#define __GNUC_MINOR__ 1

#define __GNUC_PATCHLEVEL__ 0

#define __GNUC__ 4

#define __GXX_ABI_VERSION 1002

#define __INTMAX_MAX__ 9223372036854775807LL

#define __INTMAX_TYPE__ long long int

#define __INT_MAX__ 32767

#define __LDBL_DENORM_MIN__ 1.40129846e-45L

#define __LDBL_DIG__ 6

#define __LDBL_EPSILON__ 1.19209290e-7L

#define __LDBL_HAS_INFINITY__ 1

#define __LDBL_HAS_QUIET_NAN__ 1

#define __LDBL_MANT_DIG__ 24

#define __LDBL_MAX_10_EXP__ 38

#define __LDBL_MAX_EXP__ 128

#define __LDBL_MAX__ 3.40282347e+38L

#define __LDBL_MIN_10_EXP__ (-37)

#define __LDBL_MIN_EXP__ (-125)

#define __LDBL_MIN__ 1.17549435e-38L

#define __LONG_LONG_MAX__ 9223372036854775807LL

#define __LONG_MAX__ 2147483647L

#define __NO_INLINE__ 1

#define __PTRDIFF_TYPE__ int

#define __REGISTER_PREFIX__ 

#define __SCHAR_MAX__ 127

#define __SHRT_MAX__ 32767

#define __SIZE_TYPE__ unsigned int

#define __STDC_HOSTED__ 1

#define __STDC__ 1

#define __UINTMAX_TYPE__ long long unsigned int

#define __USER_LABEL_PREFIX__ 

#define __USING_SJLJ_EXCEPTIONS__ 1

#define __VERSION__ "4.1.0"

#define __WCHAR_MAX__ 32767

#define __WCHAR_TYPE__ int

#define __WINT_TYPE__ unsigned int 

[링크 : http://www.avrfreaks.net/forum/how-does-mmcumcutarget-work]


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

마우스 DIY 자료  (0) 2015.09.23
키보드 DIY 자료  (0) 2015.09.23
ubuntu 에서 AVR 컴파일하기  (0) 2015.07.30
USART UBRR error rate  (0) 2015.07.29
avr-libc 8bit AVR C++  (0) 2015.07.28
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2015. 7. 30. 17:46

이러다가 조만간.. 메인 컴터를 리눅이로 갈아 탈듯 -_-

(게임도 안하는데 머...)



$ sudo apt-get install gcc-avr avr-libc avrdude 

[링크 : http://eiggerc.blogspot.kr/2013/03/ubuntu-avr.html]


올 ㅋ

pi@raspberrypi ~ $ avr-

avr-addr2line   avr-c++filt     avr-gcc-4.7.2   avr-gcov        avr-nm          avr-readelf

avr-ar          avr-cpp         avr-gcc-ar      avr-gprof       avr-objcopy     avr-size

avr-as          avr-g++         avr-gcc-nm      avr-ld          avr-objdump     avr-strings

avr-c++         avr-gcc         avr-gcc-ranlib  avr-man         avr-ranlib      avr-strip 


c++ 예제.파일 갯수가 여러개이니 왜 DDRA나 이런게 없냐고 하지 말자?

ATmega1284P.h

AvrBlinkenLed.cpp

IOPort.h

IOPort.cpp

Led.h

Led.cpp 

[링크 : http://10rem.net/.../gnu-cplusplus-blinkenled-part-1...]


project & makefile

$ avr-c++ -mmcu=atmega128 IOPort.cpp

[링크 : http://www.nongnu.org/avr-libc/user-manual/group__demo__project.html]


avr-gcc 기본 헤더 경로 확인

pi@raspberrypi ~/src/avr $ avr-gcc -print-file-name=include

/usr/lib/gcc/avr/4.7.2/include 

[링크 : http://ubuntuforums.org/showthread.php?t=1014673]


위의 예제는 직접 DDRA나 PORTA 등을 선언해서 쓴것이고

원래는 아래 경로의 io.h 를 끌어오면 알아서 mmcu에 맞춰서 하위 헤더를 끌어오게 된다.

pi@raspberrypi ~/src/avr $ sudo find / -name io.h

/usr/lib/avr/include/avr/io.h 


빌드는 성공! 굽는건 나중에 
pi@raspberrypi ~/src/avr $ make
avr-c++ -mmcu=atmega128 IOPort.cpp AvrBlinkenLed.cpp
In file included from IOPort.h:12:0,
                 from AvrBlinkenLed.cpp:10:
ATmega1284P.h:14:0: warning: "PINA" redefined [enabled by default]
In file included from /usr/lib/gcc/avr/4.7.2/../../../avr/include/avr/io.h:150:0,
                 from AvrBlinkenLed.cpp:9:
/usr/lib/gcc/avr/4.7.2/../../../avr/include/avr/iom128.h:135:0: note: this is the location of the previous definition
In file included from IOPort.h:12:0,
                 from AvrBlinkenLed.cpp:10:
ATmega1284P.h:15:0: warning: "DDRA" redefined [enabled by default]
In file included from /usr/lib/gcc/avr/4.7.2/../../../avr/include/avr/io.h:150:0,
                 from AvrBlinkenLed.cpp:9:
/usr/lib/gcc/avr/4.7.2/../../../avr/include/avr/iom128.h:138:0: note: this is the location of the previous definition
In file included from IOPort.h:12:0,
                 from AvrBlinkenLed.cpp:10:
ATmega1284P.h:16:0: warning: "PORTA" redefined [enabled by default]
In file included from /usr/lib/gcc/avr/4.7.2/../../../avr/include/avr/io.h:150:0,
                 from AvrBlinkenLed.cpp:9:
/usr/lib/gcc/avr/4.7.2/../../../avr/include/avr/iom128.h:141:0: note: this is the location of the previous definition



2009/04/07 - [embeded/AVR (ATmega/ATtiny)] - linux에서 AVR 컴파일하기



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

키보드 DIY 자료  (0) 2015.09.23
avr-gcc -mmcu 관련 작동 내용  (0) 2015.08.02
USART UBRR error rate  (0) 2015.07.29
avr-libc 8bit AVR C++  (0) 2015.07.28
avr twi / i2c 예제 및 풀업관련  (0) 2015.07.19
Posted by 구차니
embeded/raspberry pi2015. 7. 30. 09:50

composite 해상도 관련

ssh로 하니 안되서 마우스 + 키보드 연결하고 파일로 저장해서 읽어옴 -_-

$ xdpyinfo

$ cat xdpy.txt

name of display:    :0.0

version number:    11.0

vendor string:    The X.Org Foundation

vendor release number:    11204000

X.Org version: 1.12.4

maximum request size:  16777212 bytes

motion buffer size:  256

bitmap unit, bit order, padding:    32, LSBFirst, 32

image byte order:    LSBFirst

number of supported pixmap formats:    7

supported pixmap formats:

    depth 1, bits_per_pixel 1, scanline_pad 32

    depth 4, bits_per_pixel 8, scanline_pad 32

    depth 8, bits_per_pixel 8, scanline_pad 32

    depth 15, bits_per_pixel 16, scanline_pad 32

    depth 16, bits_per_pixel 16, scanline_pad 32

    depth 24, bits_per_pixel 32, scanline_pad 32

    depth 32, bits_per_pixel 32, scanline_pad 32

keycode range:    minimum 8, maximum 255

focus:  window 0x1200005, revert to Parent

number of extensions:    27

    BIG-REQUESTS

    Composite

    DAMAGE

    DOUBLE-BUFFER

    DPMS

    DRI2

    GLX

    Generic Event Extension

    MIT-SCREEN-SAVER

    MIT-SHM

    RANDR

    RECORD

    RENDER

    SECURITY

    SGI-GLX

    SHAPE

    SYNC

    X-Resource

    XC-MISC

    XFIXES

    XFree86-DGA

    XFree86-VidModeExtension

    XINERAMA

    XInputExtension

    XKEYBOARD

    XTEST

    XVideo

default screen number:    0

number of screens:    1


screen #0:

  dimensions:    656x416 pixels (174x110 millimeters)

  resolution:    96x96 dots per inch

  depths (7):    16, 1, 4, 8, 15, 24, 32

  root window id:    0xe2

  depth of root window:    16 planes

  number of colormaps:    minimum 1, maximum 1

  default colormap:    0x20

  default number of colormap cells:    64

  preallocated pixels:    black 0, white 65535

  options:    backing-store NO, save-unders NO

  largest cursor:    656x416

  current input event mask:    0x7a003c

    ButtonPressMask          ButtonReleaseMask        EnterWindowMask

    LeaveWindowMask          StructureNotifyMask      SubstructureNotifyMask

    SubstructureRedirectMask FocusChangeMask          PropertyChangeMask

  number of visuals:    33

  default visual id:  0x21

  visual:

    visual id:    0x21

    class:    TrueColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    8 bits

  visual:

    visual id:    0xc2

    class:    TrueColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xc3

    class:    TrueColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xc4

    class:    TrueColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xc5

    class:    TrueColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xc6

    class:    TrueColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xc7

    class:    TrueColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xc8

    class:    TrueColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xc9

    class:    TrueColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xca

    class:    TrueColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xcb

    class:    TrueColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xcc

    class:    TrueColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xcd

    class:    TrueColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xce

    class:    TrueColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xcf

    class:    TrueColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xd0

    class:    TrueColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xd1

    class:    DirectColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xd2

    class:    DirectColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xd3

    class:    DirectColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xd4

    class:    DirectColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xd5

    class:    DirectColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xd6

    class:    DirectColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xd7

    class:    DirectColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xd8

    class:    DirectColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xd9

    class:    DirectColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xda

    class:    DirectColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xdb

    class:    DirectColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xdc

    class:    DirectColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xdd

    class:    DirectColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xde

    class:    DirectColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xdf

    class:    DirectColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0xe0

    class:    DirectColor

    depth:    16 planes

    available colormap entries:    64 per subfield

    red, green, blue masks:    0xf800, 0x7e0, 0x1f

    significant bits in color specification:    6 bits

  visual:

    visual id:    0x41

    class:    TrueColor

    depth:    32 planes

    available colormap entries:    256 per subfield

    red, green, blue masks:    0xff0000, 0xff00, 0xff

    significant bits in color specification:    8 bits 


$ cat xran.txt

Screen 0: minimum 656 x 416, current 656 x 416, maximum 656 x 416

default connected 656x416+0+0 0mm x 0mm

   656x416         0.0* 


[링크 : http://www.cyberciti.biz/faq/how-do-i-find-out-screen-resolution-of-my-linux-desktop/]


composite + HDMI는 불가능 하다고..

듀얼 모니터로 쓸수 있을까 아니면 clone 모드로 가능할까 싶었는데

물건너 간 듯하다 ㅠㅠ

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=4034&p=53117]




+

심심해서 해보는 뻘짓

음.. 작게 나오네...


gimp에서 fb 덤프해서 복구

RGB565 ㄷㄷㄷ


아무튼 이렇게 아담하게 나온다.



+

2015.07.31

아무것도 연결안하니 composite 출력이 기본으로 설정되는 듯

Posted by 구차니
embeded/AVR (ATmega,ATtiny)2015. 7. 29. 17:54

표로는 감이 안오는데



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



파형으로 보니 조금 감이 오는 기분?


[링크 : http://www.robotroom.com/Asynchronous-Serial-Communication-2.html]



[링크 : http://web.engr.oregonstate.edu/~traylor/ece473/lectures/uart.pdf]


심심해서 계산해보니...

56kbps / 16M 에서

8바이트 연속으로 보내면 0.5 비트 가 부족해서 최악의 경우 인식을 못할 수도 있겠으나


아마도 UART로 사용시 start bit를 trigger 삼아 그 이후로

클럭을 맞추는 것으로 추측되니 웬만해서는 문제가 안 될지도..

Posted by 구차니
embeded/ARM2015. 7. 28. 17:53

CPU 패밀리(?)는 EJ

아키텍쳐는 TE


ARM926EJ-S

Architecture ARMv5TE

The ARM926EJ-S processor implements the ARMv5TEJ instruction set 

[링크 : http://www.arm.com/products/processors/classic/arm9/arm926.php]

[링크 : https://en.wikipedia.org/wiki/ARM9]


근데 ARM 홈페이지에서도 페이지 별로 ARMv5TE와 ARMv5TEJ 를 섞어 쓰는건 함정.. ㄷㄷㄷ



TEJ라는 녀석도 구글에서 검색은 되는데 레퍼런스로 쓸만한건 안보이는 듯..


Integrated Modem + Applications

OMAP710 ‐ ARM925 + GSM/GPRS

OMAP730 ‐ ARM926TEJ + GSM/GPRS

OMAP733 ‐ ARM926TEJ + GSM/GPRS

OMAP750 ‐ ARM926TEJ + GSM/GPRS

OMAP850 ‐ ARM926TEJ + EDGE

OMAPV1030 ‐ ARM926TEJ + GSM/GPRS/EDGE

OMAPV1035 ‐ ARM926EJ + GSM/GPRS/EDGE

[링크 : http://www.wdic.org/w/WDIC/OMAP]

'embeded > ARM' 카테고리의 다른 글

cortex-A5/A7  (0) 2015.09.21
cortex-m 시리즈와 포화연산  (0) 2015.08.26
Jazelle 관련 검색  (0) 2015.04.28
ltib 패키지 요구사항  (0) 2015.04.13
jffs2 on sd card  (0) 2015.04.09
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2015. 7. 28. 14:40

ㄷㄷㄷ 한번 돌려볼까?


Can I use C++ on the AVR?

Basically yes, C++ is supported (assuming your compiler has been configured and compiled to support it, of course). Source files ending in .cc, .cpp or .C will automatically cause the compiler frontend to invoke the C++ compiler. Alternatively, the C++ compiler could be explicitly called by the name avr-c++.

However, there's currently no support for libstdc++, the standard support library needed for a complete C++ implementation. This imposes a number of restrictions on the C++ programs that can be compiled. Among them are:

Obviously, none of the C++ related standard functions, classes, and template classes are available.

The operators new and delete are not implemented, attempting to use them will cause the linker to complain about undefined external references. (This could perhaps be fixed.)

Some of the supplied include files are not C++ safe, i. e. they need to be wrapped into

extern"C" { . . . } 

(This could certainly be fixed, too.)

Exceptions are not supported. Since exceptions are enabled by default in the C++ frontend, they explicitly need to be turned off using -fno-exceptions in the compiler options. Failing this, the linker will complain about an undefined external reference to __gxx_personality_sj0.

Constructors and destructors are supported though, including global ones.

When programming C++ in space- and runtime-sensitive environments like microcontrollers, extra care should be taken to avoid unwanted side effects of the C++ calling conventions like implied copy constructors that could be called upon function invocation etc. These things could easily add up into a considerable amount of time and program memory wasted. Thus, casual inspection of the generated assembler code (using the -S compiler option) seems to be warranted.


[링크 : http://www.atmel.com/webdoc/AVRLibcReferenceManual/FAQ_1faq_cplusplus.html]


AVR용 STL ㄷㄷㄷ

[링크 : http://andybrown.me.uk/wk/2011/01/15/the-standard-template-library-stl-for-avr-with-c-streams/]

Posted by 구차니
embeded/AVR (ATmega,ATtiny)2015. 7. 19. 22:25

어드레스 맵 구조 까지 나오는 예제가 있으면 좋으련만...

그나저나 SDA, SCL에 풀업을 꼭 달으라네..


[링크 : http://electronicsdo.tistory.com/entry/I2C-The-I2C-of-ATmega128]

SCL 과 SDA 단자는 오픈 콜렉터 또는 오픈 드레인 방식으로 되어 있어 Wired-AND 기능을 합니다. 이 단자는 외부에 풀업 저항(수 K 오옴) 을 연결해 주어야 합니다.

[링크 : http://cafe.daum.net/_c21_/bbs_search_read?grpid=lH2L&fldid=GSYT&datanum=85]


SDA,SCL핀에 풀업저항을 꼭 달아줍니다.

[링크 : http://openctrl.tistory.com/entry/I2C-TWI]


자체 Pull-Up 저항은

30-50kΩ 정도로 저항치가 좀 높은 편이라서, 실제로 Data 와 Clock 라인에는

4.7kΩ 정도로 따로 Pull-Up 저항을 걸어두는 편이 좋습니다.

[링크 : http://egloos.zum.com/bellona/v/1345440]

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

USART UBRR error rate  (0) 2015.07.29
avr-libc 8bit AVR C++  (0) 2015.07.28
atmega128 gpio 인터럽트 데이터시트 내용  (0) 2015.07.18
AVR Studio / AVRdude 연동  (0) 2015.03.12
AVRISP 호환 제품 ?  (0) 2015.03.11
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2015. 7. 18. 22:29


PE4/PE5 는 Output Compate (OC3)

PE6은 Timer/counter 3 clk input(T3)

PE7은 Input Capture (IC)

PD쪽은.. 통신을 쓰면 4개 선을 쓰지 못하니

실질적으로 사용가능한 falling edge / rising edge 탐지는 2개 정도 일려나?


결론은.. 핀하나하나 while로 감지 하지 않으려면...

tie-up해서 잡는 수 밖에 없을 것으로 보이네..






External Interrupts

The External Interrupts are triggered by the INT7:0 pins. Observe that, if enabled, the interrupts will trigger even if the INT7:0 pins are configured as outputs. This feature provides a way of generating a software interrupt. The External Interrupts can be triggered by a falling or rising edge or a low level. This is set up as indicated in the specification for the External Interrupt Control Registers – EICRA (INT3:0) and EICRB (INT7:4). When the external interrupt is enabled and is configured as level triggered, the interrupt will trigger as long as the pin is held low. Note that recognition of falling or rising edge interrupts on INT7:4 requires the presence of an I/O clock, described in “Clock Systems and their Distribution” on page 35. Low level interrupts and the edge interrupt on INT3:0 are detected asynchronously. This implies that these interrupts can be used for waking the part also from sleep modes other than Idle mode. The I/O clock is halted in all sleep modes except Idle mode. Note that if a level triggered interrupt is used for wake-up from Power-down mode, the changed level must be held for some time to wake up the MCU. This makes the MCU less sensitive to noise. The changed level is sampled twice by the Watchdog Oscillator clock. The period of the Watchdog Oscillator is 1µs (nominal) at 5.0V and 25°C. The frequency of the Watchdog Oscillator is voltage dependent as shown in the “Electrical Characteristics” on page 318. The MCU will wake up if the input has the required level during this sampling or if it is held until the end of the start-up time. The start-up time is defined by the SUT fuses as described in “Clock Systems and their Distribution” on page 35. If the level is sampled twice by the Watchdog Oscillator clock but disappears before the end of the start-up time, the MCU will still wake up, but no interrupt will be generated. The required level must be held long enough for the MCU to complete the wake up to trigger the level interrupt.


EICRA와 EICRB는 조금 다르게 설명이 적혀있으니 자세히 읽어 봐야 할 듯..

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

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

avr-libc 8bit AVR C++  (0) 2015.07.28
avr twi / i2c 예제 및 풀업관련  (0) 2015.07.19
AVR Studio / AVRdude 연동  (0) 2015.03.12
AVRISP 호환 제품 ?  (0) 2015.03.11
SED1520 데이터시트 / Page, Line, Column  (0) 2014.03.27
Posted by 구차니