Hope anyone has the time to help me. I am really stuck.
The canonical way to change bits in ports in C language is not through
the use of bitfields. You need to learn to use the C language's bitwise
operators, in conjunction with a simple macro include in avr-libc:
#include <avr/io.h>
PORTA |= _BV(1); // Set bit 1
PORTA &= ~_BV(1); // Clear bit 1
See this thread on the AVR Freaks website on how to use these operators:
<http://www.avrfreaks.net/phpBB2/viewtopic.php?t=8764&highlight=programming+101>
Go to the post that starts with "Programming 101", which should be
highlighted.
If I wanted to do it the "canonical way" would I have ask for it. But I
didn't, did I?
I do wonder how your brain work. I wish I would have taken a degree in
philosophy instead of my master degree in computer science.
But hey, thanks for the link. Here is a link so you can learn some
"Reading 101"
http://www.fisher-price.com/us/ms5/learn-to-read.asp
Enjoy.