Type in the full discussion title or a part of it.
Discussion Title Created date
Best Practice for Globals in C
Bear with me while I explain this. Let's say have three source files, lcd.c, menu.c and measurements.c. Now I have a LCD related global that others source files need to know about...
Thursday, 20 May 2010 - 14:33
License Free midi synthesizer in C
This is not directly GCC related is C related and it's a bit of a random shot but... I've already written code to play basic beeps of varying pitch and volume, but they way I use...
Thursday, 21 January 2010 - 10:45
Order of Port Initlisation ( __low_level_init() )
I'm using the IAR function __low_level_init() but I'm sure this is applicable to any compiler/IDE. This section of code is inherited from a colleague (perhaps from IAR directly)...
Monday, 2 November 2009 - 14:24
Differences between a Mega8 and and a Mega8A
I've recently been looking at an old project, which used a Mega8, I've noticed that the Mega8 (and 8L) is in the process of being replaced by the Mega8A. Usually when a product is...
Friday, 2 October 2009 - 13:07
Reducing number of pad / pack bytes required?
I'm using IAR and ATMega 128. I've been debugging my code and I founf I kept gettign stack warnign messages. I thought "that's strange - I should be nowehere near using the full...
Monday, 8 December 2008 - 12:10
Drawing a vector on an LCD
I'm trying to draw a vector/line on an LCD. Given two points (e.g. (3,5) and (7,7)) - how do I calculate which pixels require "filling in". I've tried working it out myself but my...
Monday, 23 June 2008 - 11:24
C++
This is a bit of a genric question but... I would like to asses the general suitability of usign C++ instead of C in ceartain applications. However, I have not even looked at C++...
Wednesday, 28 May 2008 - 11:28
Is it valid to cast a char as a bool?
I have a function that returns a bitfield. I later pass this variable to other functions that require only a boolean. In these functions all that is needed is whether the variable...
Thursday, 15 May 2008 - 11:07
Casting (getting inside of...)
•I am in a function - passing a pointer to a structure. •my_param is and unsigned 8-bit int (uint8_t). The following gives an incorrect result: #define SECONDS_IN_A_DAY 86400...
Thursday, 1 May 2008 - 15:42
Converting a UNIX time / date stamp to human readable form.
I need to store a time/date stamp (accurate to 1 second) in four bytes. So I am attenmpting to use a UNIX style time & date stamp. (I.e. the date stamp is x seconds from an...
Wednesday, 30 April 2008 - 13:38
using a bool in normal maths
I have a bool defined in stdbool.h as: #define bool _Bool #define true 1 #define false 0 Now if a bool called negative. Can I do: bool negative; uint8_t k = 0; uint8_t...
Wednesday, 16 April 2008 - 09:21
Rounding Numbers (floats as signed ints)
Perhaps it's because it's Friday afternoon - but I just can't get my head around this one. How can I "round" numbers. E.g 40.4 = 40 and 40.5 = 41 I'm askign this because I want...
Friday, 11 April 2008 - 13:59

Pages