Show Posts
Pages: 1 ... 47 48 [49] 50 51 ... 100
721  Using Arduino / Displays / Re: Powertip PG12864 and Mega 2560 on: April 23, 2013, 04:35:36 pm
Hi Jan

What is your setup? What lib do you use? U8glib? What is your contructor call for u8glib?
How did you connect your display?

It also might be a contrast issue: How do you control the contrast of the display? Is there a negative voltage converter included?

Oliver

722  Using Arduino / Programming Questions / Re: Migrating a u8glib project to AVR Studio 4 on: April 20, 2013, 08:20:05 am
PROGMEM should be defined by the avr lib. I also have never observed conflicts in the source file (but there might be some).

But i am glad to hear that it's working now.

Oliver
723  Using Arduino / Programming Questions / Re: Migrating a u8glib project to AVR Studio 4 on: April 20, 2013, 03:40:46 am
For the link stage of U8glib it is also important to add -Wl,--gc-sections

See also http://code.google.com/p/u8glib/wiki/avr

For the compile error. What has been the code around line 142? Did you apply the correct controller type?

Oliver
724  Using Arduino / Programming Questions / Re: list of "defined(__AVR_xxxxxx__)" on: April 19, 2013, 02:09:39 pm

http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/AVR-Options.html#AVR-Options

See section __AVR_Device__ for the "construction rule".

Then, if you need more specific defines, you can use

Code:
avr-gcc -mmcu=atmega8 -dM -E - < /dev/null

Where "atmega8" can be any of your favorit target controller. It will give this result:
Code:
#define __DBL_MIN_EXP__ (-125)
#define __UINT_LEAST16_MAX__ 65535U
#define __ATOMIC_ACQUIRE 2
#define __FLT_MIN__ 1.17549435e-38F
#define __BUILTIN_AVR_SLEEP 1
#define __UINT_LEAST8_TYPE__ unsigned char
#define __INTMAX_C(c) c ## LL
#define __CHAR_BIT__ 8
#define __UINT8_MAX__ 255
#define __WINT_MAX__ 65535U
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __SIZE_MAX__ 65535U
#define __WCHAR_MAX__ 32767
#define __DBL_DENORM_MIN__ ((double)1.40129846e-45L)
#define __GCC_ATOMIC_CHAR_LOCK_FREE 1
#define __FLT_EVAL_METHOD__ 0
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 1
#define __UINT_FAST64_MAX__ 18446744073709551615ULL
#define __SIG_ATOMIC_TYPE__ int
#define __DBL_MIN_10_EXP__ (-37)
#define __FINITE_MATH_ONLY__ 0
#define __FLASH __flash
#define __GNUC_PATCHLEVEL__ 0
#define __UINT_FAST8_MAX__ 65535U
#define __DEC64_MAX_EXP__ 385
#define __INT8_C(c) c
#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
#define __SHRT_MAX__ 32767
#define __LDBL_MAX__ 3.40282347e+38L
#define __UINT_LEAST8_MAX__ 255
#define __GCC_ATOMIC_BOOL_LOCK_FREE 1
#define __UINTMAX_TYPE__ long long unsigned int
#define __BUILTIN_AVR_DELAY_CYCLES 1
#define __DEC32_EPSILON__ 1E-6DF
#define __UINT32_MAX__ 4294967295UL
#define __LDBL_MAX_EXP__ 128
#define __WINT_MIN__ 0U
#define __SCHAR_MAX__ 127
#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
#define __INT64_C(c) c ## LL
#define __DBL_DIG__ 6
#define __GCC_ATOMIC_POINTER_LOCK_FREE 1
#define __SIZEOF_INT__ 2
#define __SIZEOF_POINTER__ 2
#define __USER_LABEL_PREFIX__
#define __STDC_HOSTED__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __FLT_EPSILON__ 1.19209290e-7F
#define __LDBL_MIN__ 1.17549435e-38L
#define __AVR_SFR_OFFSET__ 0x20
#define __DEC32_MAX__ 9.999999E96DF
#define __INT32_MAX__ 2147483647L
#define __SIZEOF_LONG__ 4
#define __UINT16_C(c) c ## U
#define __DECIMAL_DIG__ 9
#define __AVR_2_BYTE_PC__ 1
#define __LDBL_HAS_QUIET_NAN__ 1
#define __BUILTIN_AVR_SEI 1
#define __GNUC__ 4
#define __BUILTIN_AVR_SWAP 1
#define __FLT_HAS_DENORM__ 1
#define __SIZEOF_LONG_DOUBLE__ 4
#define __BIGGEST_ALIGNMENT__ 1
#define __UINT24_MAX__ 16777215UL
#define __BUILTIN_AVR_NOP 1
#define __DBL_MAX__ ((double)3.40282347e+38L)
#define __INT_FAST32_MAX__ 2147483647L
#define __DBL_HAS_INFINITY__ 1
#define __DEC32_MIN_EXP__ (-94)
#define __BUILTIN_AVR_FMULSU 1
#define __INT_FAST16_TYPE__ int
#define __LDBL_HAS_DENORM__ 1
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __INT_LEAST32_MAX__ 2147483647L
#define __USING_SJLJ_EXCEPTIONS__ 1
#define __DEC32_MIN__ 1E-95DF
#define __DBL_MAX_EXP__ 128
#define __DEC128_EPSILON__ 1E-33DL
#define __PTRDIFF_MAX__ 32767
#define __AVR_ENHANCED__ 1
#define __BUILTIN_AVR_WDR 1
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define __SIZEOF_SIZE_T__ 2
#define __SIZEOF_WINT_T__ 2
#define __GXX_ABI_VERSION 1002
#define __INT24_MAX__ 8388607L
#define __FLT_MIN_EXP__ (-125)
#define __INT_FAST64_TYPE__ long long int
#define __DBL_MIN__ ((double)1.17549435e-38L)
#define __DEC128_MIN__ 1E-6143DL
#define __REGISTER_PREFIX__
#define __UINT16_MAX__ 65535U
#define __DBL_HAS_DENORM__ 1
#define __AVR_ARCH__ 4
#define __UINT8_TYPE__ unsigned char
#define __NO_INLINE__ 1
#define __FLT_MANT_DIG__ 24
#define __VERSION__ "4.7.0"
#define __UINT64_C(c) c ## ULL
#define __MEMX __memx
#define __GCC_ATOMIC_INT_LOCK_FREE 1
#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __INT32_C(c) c ## L
#define __DEC64_EPSILON__ 1E-15DD
#define __ORDER_PDP_ENDIAN__ 3412
#define __DEC128_MIN_EXP__ (-6142)
#define __INT_FAST32_TYPE__ long int
#define __UINT_LEAST16_TYPE__ short unsigned int
#define __INT16_MAX__ 32767
#define __SIZE_TYPE__ unsigned int
#define __UINT64_MAX__ 18446744073709551615ULL
#define __INT8_TYPE__ signed char
#define __ELF__ 1
#define __FLT_RADIX__ 2
#define __INT_LEAST16_TYPE__ short int
#define __LDBL_EPSILON__ 1.19209290e-7L
#define __UINTMAX_C(c) c ## ULL
#define __INT24_MIN__ (-__INT24_MAX__-1)
#define __SIG_ATOMIC_MAX__ 32767
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 1
#define __SIZEOF_PTRDIFF_T__ 2
#define __AVR 1
#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
#define __INT_FAST16_MAX__ 32767
#define __UINT_FAST32_MAX__ 4294967295UL
#define __UINT_LEAST64_TYPE__ long long unsigned int
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MAX_10_EXP__ 38
#define __LONG_MAX__ 2147483647L
#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
#define __FLT_HAS_INFINITY__ 1
#define __UINT_FAST16_TYPE__ unsigned int
#define __DEC64_MAX__ 9.999999999999999E384DD
#define __AVR_ATmega8__ 1
#define __CHAR16_TYPE__ short unsigned int
#define __PRAGMA_REDEFINE_EXTNAME 1
#define __AVR_HAVE_LPMX__ 1
#define __INT_LEAST16_MAX__ 32767
#define __DEC64_MANT_DIG__ 16
#define __INT64_MAX__ 9223372036854775807LL
#define __UINT_LEAST32_MAX__ 4294967295UL
#define __GCC_ATOMIC_LONG_LOCK_FREE 1
#define __INT_LEAST64_TYPE__ long long int
#define __INT16_TYPE__ short int
#define __INT_LEAST8_TYPE__ signed char
#define __DEC32_MAX_EXP__ 97
#define __INT_FAST8_MAX__ 32767
#define __INTPTR_MAX__ 32767
#define __LDBL_MANT_DIG__ 24
#define __DBL_HAS_QUIET_NAN__ 1
#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
#define AVR 1
#define __BUILTIN_AVR_FMULS 1
#define __INTPTR_TYPE__ int
#define __UINT16_TYPE__ short unsigned int
#define __WCHAR_TYPE__ int
#define __SIZEOF_FLOAT__ 4
#define __AVR__ 1
#define __UINTPTR_MAX__ 65535U
#define __DEC64_MIN_EXP__ (-382)
#define __INT_FAST64_MAX__ 9223372036854775807LL
#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
#define __FLT_DIG__ 6
#define __UINT_FAST64_TYPE__ long long unsigned int
#define __INT_MAX__ 32767
#define __INT64_TYPE__ long long int
#define __FLT_MAX_EXP__ 128
#define __AVR_HAVE_MUL__ 1
#define __DBL_MANT_DIG__ 24
#define __INT_LEAST64_MAX__ 9223372036854775807LL
#define __AVR_HAVE_MOVW__ 1
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 1
#define __DEC64_MIN__ 1E-383DD
#define __WINT_TYPE__ unsigned int
#define __UINT_LEAST32_TYPE__ long unsigned int
#define __SIZEOF_SHORT__ 2
#define __LDBL_MIN_EXP__ (-125)
#define __INT_LEAST8_MAX__ 127
#define __LDBL_MAX_10_EXP__ 38
#define __ATOMIC_RELAXED 0
#define __DBL_EPSILON__ ((double)1.19209290e-7L)
#define __UINT8_C(c) c
#define __INT_LEAST32_TYPE__ long int
#define __SIZEOF_WCHAR_T__ 2
#define __UINT64_TYPE__ long long unsigned int
#define __INT_FAST8_TYPE__ int
#define __DBL_DECIMAL_DIG__ 9
#define __DEC_EVAL_METHOD__ 2
#define __ORDER_BIG_ENDIAN__ 4321
#define __UINT32_C(c) c ## UL
#define __INTMAX_MAX__ 9223372036854775807LL
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __FLT_DENORM_MIN__ 1.40129846e-45F
#define __INT8_MAX__ 127
#define __UINT_FAST32_TYPE__ long unsigned int
#define __CHAR32_TYPE__ long unsigned int
#define __FLT_MAX__ 3.40282347e+38F
#define __INT32_TYPE__ long int
#define __SIZEOF_DOUBLE__ 4
#define __FLT_MIN_10_EXP__ (-37)
#define __INTMAX_TYPE__ long long int
#define __DEC128_MAX_EXP__ 6145
#define __AVR_HAVE_16BIT_SP__ 1
#define __ATOMIC_CONSUME 1
#define __GNUC_MINOR__ 7
#define __UINTMAX_MAX__ 18446744073709551615ULL
#define __DEC32_MANT_DIG__ 7
#define __BUILTIN_AVR_CLI 1
#define __DBL_MAX_10_EXP__ 38
#define __LDBL_DENORM_MIN__ 1.40129846e-45L
#define __INT16_C(c) c
#define __STDC__ 1
#define __PTRDIFF_TYPE__ int
#define __ATOMIC_SEQ_CST 5
#define __UINT32_TYPE__ long unsigned int
#define __UINTPTR_TYPE__ unsigned int
#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
#define __DEC128_MANT_DIG__ 34
#define __LDBL_MIN_10_EXP__ (-37)
#define __SIZEOF_LONG_LONG__ 8
#define __GCC_ATOMIC_LLONG_LOCK_FREE 1
#define __LDBL_DIG__ 6
#define __FLT_DECIMAL_DIG__ 9
#define __UINT_FAST16_MAX__ 65535U
#define __GNUC_GNU_INLINE__ 1
#define __BUILTIN_AVR_INSERT_BITS 1
#define __GCC_ATOMIC_SHORT_LOCK_FREE 1
#define __BUILTIN_AVR_FLASH_SEGMENT 1
#define __UINT_FAST8_TYPE__ unsigned int
#define __ATOMIC_ACQ_REL 4
#define __ATOMIC_RELEASE 3
#define __BUILTIN_AVR_FMUL 1

Oliver
725  Using Arduino / Programming Questions / Re: Migrating a u8glib project to AVR Studio 4 on: April 19, 2013, 12:07:29 pm
Hi

Quote
Is there a way to prevent the standard Arduino IDE from recompiling the code which did not change, and/or from recompiling external libraries?

I might be wrong, but i thought that 1.5.2 or the latest AVR release 1.0.4 (?) was more smarter than previous release.

Quote
On the u8glib site there are two categories of downloads: for Arduino and for AVR. The files inside are pretty much the same. Which library should I use? I ended up using the library for Arduino because the AVR library doesn't contain u8g.c with LCD-specific constructors. Is it correct?

The AVR release of U8glib does not include the C++ wrapper. You need to use the C API.

Quote
The AVR-GCC compiler found many many errors in the u8glib code. I had to fix them manually until it finally got compiled. Are there serious language differences between AVR-GCC and the Arduino IDE compiler? Or maybe there are some compiler options I should set?

I have created a step by step tutorial for U8glib and AVR-Studio 6: http://code.google.com/p/m2tklib/wiki/as6
What kind of compiler errors did you find? I do use different versions of AVR-GCC with u8glib without problem.

The development of U8glib is done 100% on Ubuntu with a Makefile environment. Build time is much faster with a good makefile.

Oliver


726  Using Arduino / Displays / Re: Tiny display for Leonardo (< 85 × 25 mm)? on: April 15, 2013, 02:09:32 pm

Hmmm, OLED, maybe this:
https://www.crystalfontz.com/product/CFAL12832DB

Perhaps do an image search for "oled 128x32". It will give a lot of results.

Oliver
727  Using Arduino / Displays / Re: Tiny display for Leonardo (< 85 × 25 mm)? on: April 15, 2013, 01:52:10 pm
http://www.adafruit.com/products/661
or
http://www.newhavendisplay.com/lcd-chiponglass-128-x-32-c-3_113.html breakout board: http://www.alexanderhiam.com/projects/nhd-bob/#1

Oliver
728  International / Deutsch / Re: LCD Display 100x32 2xHD 44102, HD 44105 on: April 14, 2013, 12:36:33 am
Hi

Da sich sonst noch niemand gemeldet hat... Wenn Du deine Frage auf Englisch im Display Folder dieses Forums plazieren würdest und an Bill's Thread anhängst (http://arduino.cc/forum/index.php/topic,56705.0.html), dann müsstest Du eigentlich vom Autor der GLCD direkt eine kompetente Antwort bekommen.

Oliver


729  Using Arduino / Displays / Re: Simple menu m2tklib with example. on: April 14, 2013, 12:10:21 am
Hi

If you are working with the Arduino IDE, then unused procedures and data will be removed.
Both, u8glib and m2tklib, are already optimized for size. Here are some general ideas for the users of these libs:
- Avoid large fonts in u8glib. Use fonts with end in "r". The size of the font in bytes is always given in the overview picture.
- Only use a small number of fonts or only one font.
- Do not use large functions like drawLine or drawCircle
- Restrict yourself on a subset of elements in m2tklib: Maybe only use the XYLIST container.
- Reuse the format option string
- Reuse complete elements: For example a cancel button can be defined once and placed on all of the sub-menues.

Oliver
730  Using Arduino / Displays / Re: initialization process of NHD‐2.8‐25664UMB3 on: April 13, 2013, 12:51:00 am
Although you refer to the new multi-font version for the display, it should be supported by U8glib (which had been tested with the NHD-2.8-25664UCY2). Init code is here:

http://code.google.com/p/u8glib/source/browse/csrc/u8g_dev_ssd1322_nhd31oled_gr.c

The default mode for u8glib will only show 248x64 pixel for this display. To see all pixel you need to enable u8glib 16 bit mode (uncomment the constant in u8g.h)

There is also an app note on this display, including the init sequence: http://www.newhavendisplay.com/app_notes/OLED_25664.txt

Oliver

Update: I think u8glib was tested with NHD-3.12-25664UCY2 and not with  NHD-2.8-25664UCY2. But i do not see a difference between these display types, except for their dimensions.
731  Using Arduino / Displays / Re: Crius OLED display on: April 12, 2013, 11:30:37 pm
Quote
Is there a way to set the I2C speed to a lower (but more reliable) rate ?

This must be programmed into the ATMega. For example see lines 120ff in http://code.google.com/p/u8glib/source/browse/csrc/u8g_com_i2c.c

Oliver
732  Using Arduino / Displays / Re: Simple menu m2tklib with example. on: April 12, 2013, 01:46:51 pm
I would suggest to use low level graphics commands to display the measurement date.
Use M2_XYLIST() go get full controll of the placement of your buttons and other M2tklib elements.
Tutorial on low level graphics: http://code.google.com/p/m2tklib/wiki/t06u8g

Oliver
733  Using Arduino / Displays / Re: Crius OLED display on: April 12, 2013, 01:35:53 pm
When i worked with u8glib on a Seeedstudio 96x96 OLED, i noticed that the chip is very sensitive to wire size and I2C speed. 100kHz is already the limit for this controller. I2C fast mode (400kHz?)was never working with my OLED.

Another reason for not beeing able to communicate with the controller could be the look state. A library should send an unlook sequence (0x0fd, 0x012) as first command.

Oliver
734  Using Arduino / Displays / Re: LCD ST7565 on: April 11, 2013, 11:49:52 pm
Hi

Have a look at the XBM example code in the IDE: You need to copy the content of the file (car.xbm) into your .ino file. See also http://code.google.com/p/u8glib/wiki/userreference#drawXBM.

Oliver
735  Using Arduino / Displays / Re: Simple menu m2tklib with example. on: April 11, 2013, 05:44:02 pm
'el_backlight_menu' is used before it is defined. This is a common problem in C and C++. Use a forward declaration and place the command
M2_EXTERN_ALIGN(el_backlight_menu);
next to
M2_EXTERN_ALIGN(top_el_menu);

See also: http://code.google.com/p/m2tklib/wiki/elref#Forward_Declaration

Oliver
Pages: 1 ... 47 48 [49] 50 51 ... 100