Type in the full discussion title or a part of it.
Discussion Title Created date
converting from atmel ASM to GCC gas
Hi, I switched my PC to linux, everything works fine, avr-gcc, avrdude, etc. However my bootloader was written in "atmel" asm style using avrasm2 compiler. I know I could install...
Thu. Dec 19, 2013 - 02:53 PM
optimization and warning
I have a string that I receive by serial and need to test the first 2 chars to take further action. char buf[20]; ... if(buf[0]=='O'...
Wed. Oct 9, 2013 - 02:03 PM
__flash and arguments
I have a simple program with some string in __flash (using gcc 4.7.2) #define _FLASH const __flash char _FLASH unit_strings[3][7] = { "Metric", "Imp US", "Imp UK" }; Now I...
Fri. Mar 8, 2013 - 07:56 PM
Watchdog question...
On a 168P, this does not work, cpu reset after 1s: void goto_sleep() { cli(); // disable interrupt timer0_ovf=0; wdt_enable(WDTO_1S); set_sleep_mode(...
Tue. Jan 17, 2012 - 07:28 PM
bit testing in a 128bits bitmap, improvement?
I want to test a bit in a 128bits bitmap, for the moment it is stored in 4 unsigned long, it looks like this: unsigned long pid01to20_support; unsigned long pid21to40_support...
Wed. Nov 23, 2011 - 02:45 AM
about danni's switches debouncing
yes I know the code and used it a couple of years ago, it is dated 2005 but switches debouncing questions occur every week in the forum, it should be a sticky post :) http://www....
Wed. Nov 16, 2011 - 01:50 AM
using __pgm with GCC 4.7
forked from the 4.6.1 LTO thread SprinterSB wrote: #include #define PGM_STR(X) ((const __pgm char[]) { X }) char const __pgm *gstr = PGM_STR ("123"); char const __pgm text...
Mon. Oct 24, 2011 - 01:52 PM
Remove .fini9/.fini0 from executable?
Hi, My main() never return/exit, it's declared as: void main(void) __attribute__ ((OS_main)) __attribute__ ((noreturn)); which produce the smaller code, however I noticed that in...
Tue. Sep 7, 2010 - 04:04 PM
Need help with CAN bus
Hi, I use an atmega168 and a MCP2515/2551 to talk CAN, for a car embedded product. They talk via SPI, both chips have a separated 16MHz crystal. The RS slope on the 2551 is 47k. I...
Wed. Oct 21, 2009 - 05:14 PM
On the importance of optimization flags
I am making an application on a ATMEGA168 so I have 16Kb of flash space. I added and added functionnalities and the size grows a lot with time. This is the basic optimization...
Tue. Oct 6, 2009 - 04:11 PM
powering an LCD controller with a pin?
My project uses an atmega168p and a standard LCD 16x2. In power down mode the avr takes less than 1µA but the LCD chipset takes about 1.5mA, always. So my question is, can I power...
Wed. Feb 18, 2009 - 02:05 PM
optimize and merge duplicate strings?
say I have code like this: sprintf_P(buf1, PSTR("%s V"), str1); sprintf_P(buf2, PSTR("%s V"), str2); sprintf_P(buf3, PSTR("%s V"), str3); The string "%s V" is stored 3 times in...
Thu. Feb 12, 2009 - 12:58 AM