Debouncing in interupts problem Not so I am afraid...
if (xxx & (1 << 7))
actually performs the bitwise AND and the condition is "true" if the bit is set in variable "xxx".
if (xxx && (1 << 7...
Wednesday, 6 June 2007 - 13:10
Embedded System & AVR I am sorry Heydarchi, but I (for one) cannot understand your post.
What is your native language? Perhaps somebody here could help you with a better translation.
Best regards
Andy
Wednesday, 6 June 2007 - 12:58
Debouncing in interupts problem Not quite...
if (PINE & (1 << PINE7))
is what you need I think.
Note the single "bitwise" &.
Wednesday, 6 June 2007 - 12:52
USB device & AVR connection @lemings
I would be very interested to hear what you find out and how you get on with the Viniculum chip.
It's something I have just been talking to a colleague about. We have a...
Wednesday, 6 June 2007 - 11:51
Debouncing in interupts problem My approach would be to run a timer interrupt every (say) 2 milliseconds, during which I would sample the raw pin state.
If the raw pin state was the same for (say) 5 consecutive...
Pack two byte to word This works fine under Visual Studio without "struct".
typedef union
{
unsigned short a ;
unsigned char b[2] ;
} BertType ;
int _tmain(int argc, _TCHAR* argv[])
{
BertType...
Wednesday, 6 June 2007 - 09:48
Need Help. I would use a lookup table in flash, assuming that you can spare 256 bytes.
Pre-emptive help, Cliff. Cool. 8)
Make your variable inc_counter_1 volatile?
Now Bob you're only showing off as he's edited the original post 4 times now. :D (No offence meant to Heydarchi)
Thanks Vinsenge.
Not so I am afraid... if (xxx & (1 << 7)) actually performs the bitwise AND and the condition is "true" if the bit is set in variable "xxx". if (xxx && (1 << 7...
I am sorry Heydarchi, but I (for one) cannot understand your post. What is your native language? Perhaps somebody here could help you with a better translation. Best regards Andy
Not quite... if (PINE & (1 << PINE7)) is what you need I think. Note the single "bitwise" &.
@lemings I would be very interested to hear what you find out and how you get on with the Viniculum chip. It's something I have just been talking to a colleague about. We have a...
My approach would be to run a timer interrupt every (say) 2 milliseconds, during which I would sample the raw pin state. If the raw pin state was the same for (say) 5 consecutive...
Declare your variables volatile. (Beaten to it by Cliff!)
This works fine under Visual Studio without "struct". typedef union { unsigned short a ; unsigned char b[2] ; } BertType ; int _tmain(int argc, _TCHAR* argv[]) { BertType...
I would use a lookup table in flash, assuming that you can spare 256 bytes.
Pages