Post Created date
Converting uint32_t iv[2] array to uint64_t and back?
I was thinking that might not work since I believed uint64_t wasn't a natively supported type (a struct of some kind). However in stdint.h it defines uint64_t as   typedef...
Thursday, 29 November 2018 - 14:14
Converting uint32_t iv[2] array to uint64_t and back?
Wait a minute, this doesn't work:   n = (u32_2 << 32UL) | u32_1;  Since the uint32_t is only 32 bits wide, shifting it 32-bit to the left would result in the high...
Thursday, 29 November 2018 - 13:59
Converting uint32_t iv[2] array to uint64_t and back?
Thanks for your elaborate answer.   I've ended up with this:   uint64_t iv64 = (iv[1]<<32) | iv[0]; iv64++; iv[0] = 0>>32 | iv64; iv[1] = iv64...
Wednesday, 28 November 2018 - 15:25
Does sleep_mode() even work?
I use both INT0 and PCINT0 for my buttons and both work great. Why should I be wasting CPU time and power polling buttons (whether with a timer or a delay) when it's so much more...
Wednesday, 5 September 2018 - 12:54
Does sleep_mode() even work?
John_A_Brown wrote:Also, although it may not be relevant to your question, I would suggest a 55mS delay in an ISR is a bad idea.   The 55ms is not a random value. I got it...
Wednesday, 5 September 2018 - 12:01
Does sleep_mode() even work?
I've changed the code a bit:   int main( void ) { cli(); // turn off global interrupts //usb_init(); // init usb port to send debugging information...
Wednesday, 5 September 2018 - 11:51
Does sleep_mode() even work?
That's what I thought.   So I modified the code so it turns the built-in LED on and off:   void GotoSleep( void ) { LED_OFF; set_sleep_mode(SLEEP_MODE_IDLE...
Wednesday, 5 September 2018 - 08:30
Can't get external interrupt button working
Finally got it working!   I needed an external pull-up resistor between de INT0 pin (PD0 on Teensy) and the VCC.   Relevant source code below:   DDRD = 0<<...
Monday, 27 August 2018 - 18:46
Can't get external interrupt button working
I didn't write print() but here's the source code:   void print_P(const char *s) { char c; while (1) { c = pgm_read_byte(s++); if (!c) break; if (c == '\n')...
Thursday, 9 June 2016 - 15:04
Can't get external interrupt button working
The stream is continious, I haven't counted them.   As I understand it from the documentation, the clearing of the flag is ussually done by the ISR code.
Tuesday, 7 June 2016 - 12:59
[TUT] Newbie's Guide to AVR Interrupts
Quote: The interrupt source flag is usually cleared when the ISR fires.   How does one know when this is / isn't the case?
Tuesday, 7 June 2016 - 12:58
Can't get external interrupt button working
steve17 wrote: If you are using interrupts, you should disable it in the ISR.  Otherwise you will get a lot of interrupts because of contact bounce.   I know, but right...
Monday, 6 June 2016 - 17:05