Whoops - the delay should be 250mS (Thanks).
Type: Posts; User: Click_here
Whoops - the delay should be 250mS (Thanks).
DDRB is the "data direction register" for port B
1 is output, 0 is input.
Write to this once before your main loop.
DDRB = 0b11000000;
For your leds put a 500mS delay in your loop -...
>looks good Malcom, I will study this code tonight. Great use of the use of assert() function, thanks.
It's all fun and games until NDEBUG is defined :P
What has happened to the C board?
It used to have a new thread every couple of hours, sometimes minutes, but it looks so quiet...
Are there plans to promote the forum? Can it be brought back...
This feels like a "post hoc ergo propter hoc" argument - You are saying that some programmer's had a problem with pointers and unsigned ints, therefore the problem is with pointers and unsigned ints....
The good thing about having those small things as functions is that they can be passed to another function via a pointer and make flexible functions
Consider the implementation of qsort where the...
What are you having trouble with exactly?
Your question sounds like you want us to do your homework for you.
What have you tried so far?
This might be an obvious question, but do you know how to solve it by hand?
Once you have it in a data structure, can you work out how to solve it? a.k.a this cell can't be a 1,2,3,5,6,7,8,9 so it...
...
printf("\n");
fflush(stdout);
}
Fun fact - the '\n' flushes the output buffer, so the fflush will never do anything.
When you give the answer like that you make dumber programmers.
That is correct
Ask yourself what do the child_t pointers in parent_t point to when you try to copy data to it?
// using printf() in all tests for consistency
printf("%s", line);
It is printing what is in "line"
At my work, it's ALWAYS 2! lol
I find it strange that it didn't mention the standard errno.h header file...
And don't "=0" the first enum element - The standards say if it is not initialised,...
I think that there is something missing there, because they are in no way the same
>Within several subroutines, there's a conditional test that, when met, leads to a graceful exit from the subroutine back to where it had been called from.
That sounds normal - Did you mean...
>OK - so what I'll do at this point is try and figure out the calls made to the timer chip and the PIA, then start a separate project from scratch.
Sounds good - You'd have to do that anyway
...
Sorry, I haven't been able to download the pdf, as I've only been on my mobile phone.
If were me and my work place, I'd never be able to justify the amount of hours needed to go through and...
You're right in that the branching commands in the 68s are like a goto statement, as it is a shorter version of the jump statement (unlike the branching statements on a PIC that only skip the next...
I used to program the motorola 68hc11 if that helps
Think of it like cut and paste.
If I type...
LED_Off();
... it will "cut" the "LED_Off" leaving the "();"
LED_Off();
becomes...
LED_Set();
which becomes
ISO/IEC 9899:TC3
7.20.3.2:
"The free function causes the space pointed to by ptr to be deallocated, that is, made
available for further allocation. If ptr is a null pointer, no action occurs..."
Get a line of text from the user/keyboard (C) - Cprogramming.com
Why haven't you just named the variables "guestNumber", "length", "isSmoker", "CreditCardNumber"?
That way your code will be self documenting.
If you don't want to do that, at least change...